forked from retoor/snek
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:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user