This commit is contained in:
retoor 2025-03-08 20:27:05 +01:00
parent a219ce4d79
commit d6061cb45b
2 changed files with 9 additions and 2 deletions

View File

@ -6,7 +6,13 @@
<aside class="sidebar" id="channelSidebar">
<h2 class="no-select">Channels</h2>
<ul>
{% for channel in channels %}
{% for channel in channels if not channel['is_private'] %}
<li id="channel-list-item-{{channel['uid']}}"><a class="no-select" href="/channel/{{channel['uid']}}.html">{{channel['name']}} <span class="message-count"></span></a></li>
{% endfor %}
</ul>
<h2 class="no-select">Private</h2>
<ul>
{% for channel in channels if channel['is_private'] %}
<li id="channel-list-item-{{channel['uid']}}"><a class="no-select" href="/channel/{{channel['uid']}}.html">{{channel['name']}} <span class="message-count"></span></a></li>
{% endfor %}
</ul>
@ -61,4 +67,4 @@
}
const channelSidebar = new ChannelSidebar(document.getElementById("channelSidebar"))
</script>
</script>

View File

@ -61,6 +61,7 @@ class WebView(BaseView):
parent_object = await subscribed_channel.get_channel()
last_message =await parent_object.get_last_message()
item["last_message_on"] = parent_object["last_message_on"]
item["is_private"] = parent_object["tag"] == "dm"
if other_user:
item["name"] = other_user["nick"]
item["uid"] = subscribed_channel["channel_uid"]