mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-08-21 22:59:55 +00:00
update embed
This commit is contained in:
@@ -398,6 +398,8 @@ class Embed {
|
||||
div.append(button);
|
||||
button.onclick = (_) => {
|
||||
if (this.localuser.info.api.startsWith(info.api)) {
|
||||
button.textContent = I18n.invite.joining();
|
||||
button.disabled = true;
|
||||
fetch(this.localuser.info.api + "/invites/" + json.code, {
|
||||
method: "POST",
|
||||
headers: this.localuser.headers,
|
||||
@@ -406,6 +408,10 @@ class Embed {
|
||||
.then((_) => {
|
||||
if (_.message) {
|
||||
alert(_.message);
|
||||
button.textContent = I18n.invite.accept();
|
||||
button.disabled = false;
|
||||
} else {
|
||||
button.textContent = I18n.invite.alreadyJoined();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -464,6 +464,7 @@
|
||||
"invite": {
|
||||
"accept": "Accept",
|
||||
"alreadyJoined": "Already joined",
|
||||
"joining": "Joining...",
|
||||
"channel:": "Channel:",
|
||||
"createInvite": "Create invite",
|
||||
"createdAt": "Created at $1",
|
||||
|
||||
Reference in New Issue
Block a user