add rules channel and move settings arround

This commit is contained in:
MathMan05 2025-04-10 14:38:03 -05:00
parent 47d9db2e5b
commit 4af765c16a
7 changed files with 101 additions and 34 deletions

View file

@ -656,7 +656,15 @@ class Channel extends SnowFlake {
if (this.type === 0) {
const decoration = document.createElement("span");
button.appendChild(decoration);
decoration.classList.add("space", "svgicon", this.nsfw ? "svg-channelnsfw" : "svg-channel");
if (this.guild.properties.rules_channel_id === this.id) {
decoration.classList.add("space", "svgicon", "svg-rules");
} else {
decoration.classList.add(
"space",
"svgicon",
this.nsfw ? "svg-channelnsfw" : "svg-channel",
);
}
} else if (this.type === 2) {
//
const decoration = document.createElement("span");
@ -1038,7 +1046,10 @@ class Channel extends SnowFlake {
d.options.addHTMLArea(new MarkDown(this.topic, this).makeHTML());
d.show();
};
} else channelTopic.setAttribute("hidden", "");
} else {
channelTopic.setAttribute("hidden", "");
channelTopic.onclick = () => {};
}
if (this.guild !== this.localuser.lookingguild) {
this.guild.loadGuild();
}