lang: translation of profile page
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import AbstractView from "./abstracts/AbstractView.js";
|
||||
import { client } from "../index.js"
|
||||
import { client, lang } from "../index.js"
|
||||
|
||||
export default class extends AbstractView {
|
||||
constructor(params) {
|
||||
@ -65,9 +65,9 @@ export default class extends AbstractView {
|
||||
this.blockButton();
|
||||
};
|
||||
if (this.profile.isBlocked)
|
||||
block.textContent = "Deblock";
|
||||
block.textContent = lang.get('profileUnblock', 'Unblock');
|
||||
else
|
||||
block.textContent = "Block";
|
||||
block.textContent = lang.get('profileBlock', 'Block');
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,13 +86,13 @@ export default class extends AbstractView {
|
||||
friend.remove();
|
||||
|
||||
yes.id = "yes";
|
||||
yes.textContent = "Accept Friend";
|
||||
yes.textContent = lang.get('profileAcceptRequest', 'Accept Friend');
|
||||
yes.onclick = async () => {
|
||||
client.notice.accept_friend(this.user_id);
|
||||
}
|
||||
|
||||
no.id = "no";
|
||||
no.textContent = "Refuse Friend";
|
||||
no.textContent = lang.get('profileDenyRequest', 'Decline Friend');
|
||||
no.onclick = async () => {
|
||||
client.notice.refuse_friend(this.user_id);
|
||||
}
|
||||
@ -117,9 +117,9 @@ export default class extends AbstractView {
|
||||
this.friendButton();
|
||||
};
|
||||
if (this.profile.isFriend)
|
||||
friend.textContent = "Remove Friend";
|
||||
friend.textContent = lang.get('profileRemoveFriend', 'Remove Friend');
|
||||
else {
|
||||
friend.textContent = "Ask Friend";
|
||||
friend.textContent = lang.get('profileAddFriend', 'Ask Friend');
|
||||
}
|
||||
this.info.appendChild(friend);
|
||||
}
|
||||
|
Reference in New Issue
Block a user