add: user status
This commit is contained in:
parent
1724f798ca
commit
a009ef9e34
10 changed files with 259 additions and 138 deletions
|
@ -1,4 +1,4 @@
|
|||
{% macro nav(selected="", show_lhs=true) -%}
|
||||
{% macro nav(selected="", show_lhs=true, hide_user_menu=false) -%}
|
||||
<nav>
|
||||
<div class="content_container">
|
||||
<div class="flex nav_side">
|
||||
|
@ -72,79 +72,21 @@
|
|||
>
|
||||
</a>
|
||||
|
||||
{% if not hide_user_menu %}
|
||||
<div class="dropdown">
|
||||
<!-- prettier-ignore -->
|
||||
<button
|
||||
class="flex-row title"
|
||||
onclick="trigger('atto::hooks::dropdown', [event])"
|
||||
exclude="dropdown"
|
||||
style="gap: 0.25rem !important"
|
||||
>
|
||||
{{ components::avatar(username=user.username, size="24px") }}
|
||||
{{ icon "chevron-down" c(dropdown-arrow) }}
|
||||
{{ components::avatar(username=user.username, size="24px")
|
||||
}} {{ icon "chevron-down" c(dropdown-arrow) }}
|
||||
</button>
|
||||
|
||||
<div class="inner">
|
||||
<b class="title">{{ user.username }}</b>
|
||||
<a href="/@{{ user.username }}">
|
||||
{{ icon "circle-user-round" }}
|
||||
<span>{{ text "auth:link.my_profile" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/settings">
|
||||
{{ icon "settings" }}
|
||||
<span>{{ text "auth:link.settings" }}</span>
|
||||
</a>
|
||||
|
||||
{% if is_helper %}
|
||||
<b class="title">{{ text "general:label.mod" }}</b>
|
||||
|
||||
<a href="/mod_panel/audit_log">
|
||||
{{ icon "scroll-text" }}
|
||||
<span>{{ text "general:link.audit_log" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/mod_panel/reports">
|
||||
{{ icon "flag" }}
|
||||
<span>{{ text "general:link.reports" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/mod_panel/ip_bans">
|
||||
{{ icon "ban" }}
|
||||
<span>{{ text "general:link.ip_bans" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/mod_panel/stats">
|
||||
{{ icon "chart-line" }}
|
||||
<span>{{ text "general:link.stats" }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<b class="title">{{ config.name }}</b>
|
||||
|
||||
<a href="https://github.com/trisuaso/tetratto">
|
||||
{{ icon "code" }}
|
||||
<span>{{ text "general:link.source_code" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="https://trisuaso.github.io/tetratto">
|
||||
{{ icon "book" }}
|
||||
<span>{{ text "general:link.reference" }}</span>
|
||||
</a>
|
||||
|
||||
<div class="title"></div>
|
||||
<button onclick="trigger('me::switch_account')">
|
||||
{{ icon "ellipsis" }}
|
||||
<span>{{ text "general:action.switch_account" }}</span>
|
||||
</button>
|
||||
|
||||
<button class="red" onclick="trigger('me::logout')">
|
||||
{{ icon "log-out" }}
|
||||
<span>{{ text "auth:action.logout" }}</span>
|
||||
</button>
|
||||
</div>
|
||||
{{ components::user_menu() }}
|
||||
</div>
|
||||
{% else %}
|
||||
{% endif %} {% else %}
|
||||
<div class="dropdown">
|
||||
<button
|
||||
class="title"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue