mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-05-12 13:04:51 +00:00
updates
This commit is contained in:
+19
-2
@@ -1368,7 +1368,18 @@ class Channel extends SnowFlake {
|
||||
};
|
||||
live.classList.add("callVoiceIcon");
|
||||
|
||||
buttonRow.append(mute, video, live, call);
|
||||
const chat = document.createElement("div");
|
||||
const chatspan = document.createElement("span");
|
||||
chatspan.classList.add("svg-frmessage");
|
||||
chat.append(chatspan);
|
||||
updateLiveIcon();
|
||||
chat.onclick = async () => {
|
||||
this.voiceMode = this.voiceMode === "VoiceOnly" ? "ChatAndVoice" : "VoiceOnly";
|
||||
this.getHTML(true);
|
||||
};
|
||||
chat.classList.add("callVoiceIcon");
|
||||
|
||||
buttonRow.append(mute, video, live, call, chat);
|
||||
|
||||
const users = document.createElement("div");
|
||||
const mut = new MutationObserver(() => {
|
||||
@@ -1466,7 +1477,11 @@ class Channel extends SnowFlake {
|
||||
if (getMessages) {
|
||||
chatArea.style.removeProperty("display");
|
||||
} else {
|
||||
chatArea.style.setProperty("display", "none");
|
||||
if (this.voiceMode === "VoiceOnly") {
|
||||
chatArea.style.setProperty("display", "none");
|
||||
} else {
|
||||
chatArea.style.removeProperty("display");
|
||||
}
|
||||
this.setUpVoiceArea();
|
||||
}
|
||||
|
||||
@@ -2372,6 +2387,7 @@ class Channel extends SnowFlake {
|
||||
});
|
||||
notification.addEventListener("click", (_) => {
|
||||
window.focus();
|
||||
|
||||
this.getHTML(true, true);
|
||||
});
|
||||
} else if (Notification.permission !== "denied") {
|
||||
@@ -2383,6 +2399,7 @@ class Channel extends SnowFlake {
|
||||
});
|
||||
}
|
||||
}
|
||||
voiceMode: "VoiceOnly" | "ChatAndVoice" = "VoiceOnly";
|
||||
async addRoleToPerms(role: Role) {
|
||||
await fetch(this.info.api + "/channels/" + this.id + "/permissions/" + role.id, {
|
||||
method: "PUT",
|
||||
|
||||
@@ -182,7 +182,20 @@ class Message extends SnowFlake {
|
||||
color: "red",
|
||||
},
|
||||
);
|
||||
|
||||
Message.contextmenu.addSeperator();
|
||||
Message.contextmenu.addButton(
|
||||
() => I18n.usedFermi(),
|
||||
() => {},
|
||||
{
|
||||
visable: function () {
|
||||
return this.nonce.length <= 9;
|
||||
},
|
||||
enabled: () => false,
|
||||
},
|
||||
);
|
||||
}
|
||||
nonce: string = "";
|
||||
setEdit() {
|
||||
const prev = this.channel.editing;
|
||||
this.channel.editing = this;
|
||||
|
||||
@@ -229,6 +229,7 @@ body {
|
||||
#voiceArea {
|
||||
background: var(--black);
|
||||
position: relative;
|
||||
min-width: 60%;
|
||||
}
|
||||
.voiceUsers {
|
||||
padding: 20px;
|
||||
|
||||
@@ -225,6 +225,7 @@
|
||||
"left":"Left voice chat"
|
||||
}
|
||||
},
|
||||
"usedFermi":"Used Fermi",
|
||||
"delete": "Delete",
|
||||
"webhooks": {
|
||||
"createdAt": "Created at $1",
|
||||
|
||||
Reference in New Issue
Block a user