Version 0.7.2c - Fix des utilisateurs
This commit is contained in:
parent
1364601ccf
commit
3a4d060060
@ -60,31 +60,34 @@ settingsBtn.addEventListener("click", () => {
|
||||
for(var user of data) {
|
||||
|
||||
|
||||
const adminBtn = document.getElementById(data.indexOf(user) + "_admin")
|
||||
const deleteBtn = document.getElementById(data.indexOf(user) + "_delete")
|
||||
var adminBtn = document.getElementById(data.indexOf(user) + "_admin")
|
||||
var deleteBtn = document.getElementById(data.indexOf(user) + "_delete")
|
||||
|
||||
if(adminBtn) {
|
||||
|
||||
if(data[data.indexOf(user)].admin == true) {
|
||||
|
||||
adminBtn.style.color = "#19a7d2"
|
||||
|
||||
}
|
||||
|
||||
adminBtn.addEventListener("click", () => {
|
||||
|
||||
send("USERS/ADMIN", data[adminBtn.id.replace("_admin", "")])
|
||||
|
||||
socket.emit("GET/USERS")
|
||||
})
|
||||
|
||||
deleteBtn.addEventListener("click", () => {
|
||||
|
||||
|
||||
send("USERS/DELETE", data[adminBtn.id.replace("_admin", "")])
|
||||
|
||||
if(data[data.indexOf(user)].admin == true) {
|
||||
|
||||
adminBtn.style.color = "#19a7d2"
|
||||
|
||||
socket.emit("GET/USERS")
|
||||
})
|
||||
}
|
||||
|
||||
adminBtn.addEventListener("click", () => {
|
||||
|
||||
send("USERS/ADMIN", data[adminBtn.id.replace("_admin", "")])
|
||||
|
||||
socket.emit("GET/USERS")
|
||||
})
|
||||
|
||||
deleteBtn.addEventListener("click", () => {
|
||||
|
||||
|
||||
send("USERS/DELETE", data[adminBtn.id.replace("_admin", "")])
|
||||
|
||||
socket.emit("GET/USERS")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user