clean: respect es11

This commit is contained in:
2024-02-20 09:22:11 +01:00
parent 54ef19a340
commit c143d96443
36 changed files with 163 additions and 163 deletions

View File

@ -1,5 +1,5 @@
import AbstractView from "./abstracts/AbstractView.js";
import { client, lang } from "../index.js"
import { client, lang } from "../index.js";
export default class extends AbstractView {
constructor(params) {
@ -37,9 +37,9 @@ export default class extends AbstractView {
client.notice.rewrite_profile = async () => {
let result = await this.profile.getFriend();
await this.profile.getBlock()
await this.profile.getBlock();
await this.friendButton();
}
};
}
async blockButton() {
@ -80,7 +80,7 @@ export default class extends AbstractView {
let no = document.getElementById("no") || document.createElement("p");
let friend = document.getElementById("friend") || document.createElement("p");
if (client.notice.data["asker"].includes(this.user_id)) {
if (client.notice.data.asker.includes(this.user_id)) {
if (friend)
friend.remove();
@ -89,13 +89,13 @@ export default class extends AbstractView {
yes.textContent = lang.get('profileAcceptRequest', 'Accept Friend');
yes.onclick = async () => {
client.notice.accept_friend(this.user_id);
}
};
no.id = "no";
no.textContent = lang.get('profileDenyRequest', 'Decline Friend');
no.onclick = async () => {
client.notice.refuse_friend(this.user_id);
}
};
this.info.appendChild(yes);
this.info.appendChild(document.createTextNode(" "));
@ -107,7 +107,7 @@ export default class extends AbstractView {
if (yes && no)
yes.remove(); no.remove();
friend.id = "friend"
friend.id = "friend";
friend.onclick = async () => {
if (this.profile.isFriend)
await client.notice.remove_friend(this.user_id);