feat: add dynamic channel list rendering and get_for_user service method

Implement `ChannelService.get_for_user` to fetch non-banned, non-deleted channels for a given user by iterating through channel memberships. Replace hardcoded sidebar links in `app.html` with Jinja2 template loop rendering channels from the context, enabling dynamic display of user-accessible chat rooms.
This commit is contained in:
2025-02-13 18:47:05 +00:00
parent f26748ee79
commit 06107c2c92
3 changed files with 17 additions and 123 deletions
+3 -5
View File
@@ -33,11 +33,9 @@
<aside class="sidebar">
<h2 class="no-select">Chat Rooms</h2>
<ul>
<li><a class="no-select" href="#">General</a></li>
<li><a class="no-select" href="#">Development</a></li>
<li><a class="no-select" href="#">Support</a></li>
<li><a class="no-select" href="#">Random</a></li>
{% for channel in channels %}
<li><a class="no-select" href="/web/{{channel['channel_uid']}}.html">{{channel['label']}}</a></li>
{% endfor %}
</ul>
</aside>
{% endblock %}