add: user status

This commit is contained in:
trisua 2025-05-03 11:29:31 -04:00
parent 1724f798ca
commit a009ef9e34
10 changed files with 259 additions and 138 deletions

View file

@ -1,6 +1,7 @@
{% extends "root.html" %} {% block head %}
<title>Chats - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav(selected="chats") }}
{% endblock %} {% block body %} {{ macros::nav(selected="chats",
hide_user_menu=true) }}
<nav class="chats_nav">
<button
class="flex gap-2 items-center active"
@ -44,59 +45,64 @@
{% endif %} {% endfor %}
</div>
<div class="sidebar flex flex-col gap-2" id="channels_list">
<div class="title flex justify-between">
{% if community %}
<b class="name shorter">
{% if community.context.display_name %} {{
community.context.display_name }} {% else %} {{ community.title
}} {% endif %}
</b>
{% else %}
<b>{{ text "chats:label.my_chats" }}</b>
{% endif %}
<div class="dropdown">
<button
class="camo small"
onclick="trigger('atto::hooks::dropdown', [event])"
exclude="dropdown"
>
{{ icon "ellipsis" }}
</button>
<div class="sidebar flex flex-col gap-2 justify-between" id="channels_list">
<div class="flex flex-col gap-2 w-full">
<div class="title flex justify-between">
{% if community %}
<b class="name shorter">
{% if community.context.display_name %} {{
community.context.display_name }} {% else %} {{
community.title }} {% endif %}
</b>
{% else %}
<b>{{ text "chats:label.my_chats" }}</b>
{% endif %}
<div class="dropdown">
<button
class="camo small"
onclick="trigger('atto::hooks::dropdown', [event])"
exclude="dropdown"
>
{{ icon "ellipsis" }}
</button>
<div class="inner">
{% if selected_community != 0 %}
<a href="/community/{{ selected_community }}">
{{ icon "book-heart" }}
<span
>{{ text "communities:label.show_community" }}</span
>
</a>
{% endif %} {% if can_manage_channels %}
<a href="/community/{{ selected_community }}/manage">
{{ icon "settings" }}
<span>{{ text "general:action.manage" }}</span>
</a>
{% endif %}
<div class="inner">
{% if selected_community != 0 %}
<a href="/community/{{ selected_community }}">
{{ icon "book-heart" }}
<span
>{{ text "communities:label.show_community"
}}</span
>
</a>
{% endif %} {% if can_manage_channels %}
<a href="/community/{{ selected_community }}/manage">
{{ icon "settings" }}
<span>{{ text "general:action.manage" }}</span>
</a>
{% endif %}
</div>
</div>
</div>
{% if can_manage_channels %}
<a
class="button w-full justify-start quaternary"
href="/community/{{ selected_community }}/manage#/channels"
>
{{ icon "plus" }}
<span>{{ text "communities:action.create_channel" }}</span>
</a>
{% endif %}
<turbo-frame
id="channels_list_frame"
src="/chats/{{ selected_community }}/{{ selected_channel }}/_channels"
target="_top"
></turbo-frame>
</div>
{% if can_manage_channels %}
<a
class="button w-full justify-start quaternary"
href="/community/{{ selected_community }}/manage#/channels"
>
{{ icon "plus" }}
<span>{{ text "communities:action.create_channel" }}</span>
</a>
{% endif %}
<turbo-frame
id="channels_list_frame"
src="/chats/{{ selected_community }}/{{ selected_channel }}/_channels"
target="_top"
></turbo-frame>
{{ components::user_plate(user=user, show_menu=true) }}
</div>
{% if channel %}
@ -253,7 +259,7 @@
z-index: 1;
}
.sidebar .title {
.sidebar .title:not(.dropdown *) {
padding: 1rem;
border-bottom: solid 1px var(--color-super-lowered);
}
@ -321,6 +327,10 @@
.chats_nav {
display: flex;
}
.sidebar {
height: calc(100dvh - 42px * 2);
}
}
</style>