diff --git a/.dist/channel.js b/.dist/channel.js index 3f03995..dfd3de5 100644 --- a/.dist/channel.js +++ b/.dist/channel.js @@ -8,6 +8,7 @@ import { Settings, RoleList } from "./settings.js"; import { Role } from "./role.js"; import { InfiniteScroller } from "./infiniteScroller.js"; import { SnowFlake } from "./snowflake.js"; +import { MarkDown } from "./markdown.js"; class Channel { editing; type; @@ -652,6 +653,12 @@ class Channel { const prom = this.infinite.delete(); history.pushState(null, "", "/channels/" + this.guild_id + "/" + this.snowflake); document.getElementById("channelname").textContent = "#" + this.name; + if (this.topic) { + document.getElementById("channelTopic").innerHTML = new MarkDown(this.topic, this).makeHTML().innerHTML; + document.getElementById("channelTopic").removeAttribute("hidden"); + } + else + document.getElementById("channelTopic").setAttribute("hidden", ""); const loading = document.getElementById("loadingdiv"); Channel.regenLoadingMessages(); loading.classList.add("loading"); diff --git a/.dist/direct.js b/.dist/direct.js index 6acd216..afc49c9 100644 --- a/.dist/direct.js +++ b/.dist/direct.js @@ -136,6 +136,7 @@ class Group extends Channel { this.buildmessages(); history.pushState(null, null, "/channels/" + this.guild_id + "/" + this.snowflake); document.getElementById("channelname").textContent = "@" + this.name; + document.getElementById("channelTopic").setAttribute("hidden", ""); document.getElementById("typebox").contentEditable = "" + true; } messageCreate(messagep) {