update embed

This commit is contained in:
Mathium05
2026-07-28 22:27:38 -05:00
parent 7e2217bc4c
commit d4e9e80ee8
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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 {
+1
View File
@@ -464,6 +464,7 @@
"invite": {
"accept": "Accept",
"alreadyJoined": "Already joined",
"joining": "Joining...",
"channel:": "Channel:",
"createInvite": "Create invite",
"createdAt": "Created at $1",