Better Css

This commit is contained in:
2023-12-16 16:14:46 +01:00
parent d03f90367f
commit 92221926a1
6 changed files with 39 additions and 79 deletions

View File

@ -45,7 +45,9 @@ export default class extends AbstractView {
// chat
if (logged && client.me.user_id != user.user_id) {
let add_chat = document.createElement("a");
add_chat.id = "add_chat_off";
add_chat.addEventListener("click", async () => {
add_chat.id = "add_chat_off";
if (client.channel != undefined) {
client.channel.members_id.forEach((member_id) => {
if (member_id == user.user_id)
@ -60,24 +62,20 @@ export default class extends AbstractView {
client.channel = await client.channels.createChannel([client.me.user_id , user.user_id], this.chat);
this.chat();
add_chat.id = "add_chat_on";
});
add_chat.appendChild(document.createTextNode("Chat"));
new_user.appendChild(add_chat);
/*new_user.appendChild(document.createTextNode(" "));
new_user.appendChild(document.createTextNode(" "));
let remove = document.createElement("a");
remove.addEventListener("click", async () => {
let block = document.createElement("a");
block.addEventListener("click", async () => {
if (client.me.user_id != user.user_id) {
await client.channels.deleteChannel([client.me.user_id , user.user_id]);
if
client.channel.disconnect();
client.channel = undefined;
this.chat()
}
});
remove.appendChild(document.createTextNode("Remove"));
new_user.appendChild(remove);*/
block.appendChild(document.createTextNode("Block"));
new_user.appendChild(block);
}
// break line