add: profile and full search

This commit is contained in:
trisua 2025-05-18 16:43:56 -04:00
parent b8b0ef7f21
commit 3e4ee8126a
52 changed files with 897 additions and 484 deletions

View file

@ -7,15 +7,15 @@ hide_user_menu=true) }}
class="flex gap-2 items-center active"
onclick="toggle_sidebars(event)"
>
{{ icon "panel-left" }} {% if community %}
{{ icon "panel-left" }} {% if community -%}
<b class="name shorter">
{% if community.context.display_name %} {{
{% if community.context.display_name -%} {{
community.context.display_name }} {% else %} {{ community.title }}
{% endif %}
{%- endif %}
</b>
{% else %}
<b>{{ text "chats:label.my_chats" }}</b>
{% endif %}
{%- endif %}
</button>
</nav>
@ -27,36 +27,36 @@ hide_user_menu=true) }}
>
<a
href="/chats/0/0"
class="button quaternary channel_icon {% if selected_community == 0 %}selected{% endif %}"
class="button quaternary channel_icon {% if selected_community == 0 -%}selected{%- endif %}"
data-turbo="false"
>
{{ icon "message-circle" }}
</a>
{% for community in communities %} {% if community.id != 0 %}
{% for community in communities %} {% if community.id != 0 -%}
<a
href="/chats/{{ community.id }}/0"
class="button quaternary channel_icon {% if selected_community == community.id %}selected{% endif %}"
class="button quaternary channel_icon {% if selected_community == community.id -%}selected{%- endif %}"
data-turbo="false"
>
{{ components::community_avatar(id=community.id,
community=community, size="48px") }}
</a>
{% endif %} {% endfor %}
{%- endif %} {% endfor %}
</div>
<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 items-center justify-between channel_header">
{% if community %}
{% if community -%}
<b class="name shorter">
{% if community.context.display_name %} {{
{% if community.context.display_name -%} {{
community.context.display_name }} {% else %} {{
community.title }} {% endif %}
community.title }} {%- endif %}
</b>
{% else %}
<b>{{ text "chats:label.my_chats" }}</b>
{% endif %} {% if selected_community != 0 %}
{%- endif %} {% if selected_community != 0 -%}
<div class="dropdown">
<button
class="camo small"
@ -74,18 +74,18 @@ hide_user_menu=true) }}
}}</span
>
</a>
{% if can_manage_channels %}
{% if can_manage_channels -%}
<a href="/community/{{ selected_community }}/manage">
{{ icon "settings" }}
<span>{{ text "general:action.manage" }}</span>
</a>
{% endif %}
{%- endif %}
</div>
</div>
{% endif %}
{%- endif %}
</div>
{% if can_manage_channels %}
{% if can_manage_channels -%}
<a
class="button w-full justify-start quaternary"
href="/community/{{ selected_community }}/manage#/channels"
@ -93,7 +93,7 @@ hide_user_menu=true) }}
{{ icon "plus" }}
<span>{{ text "communities:action.create_channel" }}</span>
</a>
{% endif %}
{%- endif %}
<turbo-frame
id="channels_list_frame"
@ -105,7 +105,7 @@ hide_user_menu=true) }}
{{ components::user_plate(user=user, show_menu=true) }}
</div>
{% if channel %}
{% if channel -%}
<div class="w-full flex flex-col gap-2" id="stream" style="padding: 1rem">
<turbo-frame
id="stream_body_frame"
@ -132,7 +132,7 @@ hide_user_menu=true) }}
</button>
</form>
</div>
{% endif %}
{%- endif %}
<style>
:root {
@ -695,7 +695,7 @@ hide_user_menu=true) }}
};
</script>
{% if selected_channel %}
{% if selected_channel -%}
<script>
window.SUBSCRIBE_CHANNEL = "{{ selected_community }}" === "0";
@ -713,6 +713,6 @@ hide_user_menu=true) }}
}
}, 100);
</script>
{% endif %}
{%- endif %}
</div>
{% endblock %}

View file

@ -1,12 +1,12 @@
{%- import "components.html" as components -%}
<turbo-frame id="channels_list_frame">
<div
class="channels_list_half flex flex-col gap-2 {% if selected_community != 0 or selected_channel == 0%}no_members{% endif %}"
class="channels_list_half flex flex-col gap-2 {% if selected_community != 0 or selected_channel == 0%}no_members{%- endif -%}"
>
{% for channel in channels %}
<div class="flex flex-row gap-1">
<a
class="w-full justify-start button {% if selected_channel == channel.id %}quaternary{% else %}camo{% endif %}"
class="w-full justify-start button {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}"
href="/chats/{{ selected_community }}/{{ channel.id }}"
data-turbo="{{ selected_community == '0' }}"
>
@ -16,7 +16,7 @@
<div class="dropdown">
<button
class="big_icon {% if selected_channel == channel.id %}quaternary{% else %}camo{% endif %}"
class="big_icon {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}"
onclick="trigger('atto::hooks::dropdown', [event])"
exclude="dropdown"
style="width: 32px"
@ -25,7 +25,7 @@
</button>
<div class="inner">
{% if user.id == channel.owner %} {% if selected_community
{% if user.id == channel.owner -%} {% if selected_community
== 0 %}
<button
class="quaternary small"
@ -34,7 +34,7 @@
{{ icon "user-plus" }}
<span>{{ text "chats:action.add_someone" }}</span>
</button>
{% endif %}
{%- endif %}
<button
class="quaternary small"
@ -59,17 +59,17 @@
{{ icon "door-open" }}
<span>{{ text "chats:action.leave" }}</span>
</button>
{% endif %}
{%- endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% if selected_community == 0 and selected_channel %}
{% if selected_community == 0 and selected_channel -%}
<div class="members_list_half flex flex-col gap-2">
{% for member in members %} {{ components::user_plate(user=member,
show_kick=user.id == channel.owner) }} {% endfor %}
</div>
{% endif %}
{%- endif %}
</turbo-frame>

View file

@ -2,16 +2,16 @@
<turbo-frame id="stream_body_frame">
<!-- prettier-ignore -->
<div class="gap-2" id="stream_body">
{% if page != 0 %}
{% if page != 0 -%}
<div class="card flex gap-2 small tertiary flex-wrap">
<b>{{ text "chats:label.viewing_old_messages" }}</b>
<a href="/chats/{{ community }}/{{ channel }}/_stream?page={{ page - 1}}" class="button small" onclick="window.CURRENT_PAGE -= 1">
{{ text "chats:label.go_back" }}
</a>
</div>
{% endif %}
{%- endif %}
{% if message %}
{% if message -%}
<div class="card flex gap-2 small tertiary flex-wrap">
<b>{{ text "chats:label.viewing_single_message" }}</b>
<a href="/chats/{{ community }}/{{ channel }}?page={{ page }}" class="button small" onclick="window.VIEWING_SINGLE = false" target="_top">
@ -24,23 +24,23 @@
{% for message in messages %}
{{ components::message(user=message[1], message=message[0], grouped=message[2]) }}
{% endfor %}
{% endif %}
{%- endif %}
{% if messages|length > 0 %}
{% if messages|length > 0 -%}
<div class="flex gap-2 w-full justify-center">
<a class="button" href="/chats/{{ community }}/{{ channel }}/_stream?page={{ page + 1 }}" onclick="window.CURRENT_PAGE += 1">
{{ icon "clock" }}
<span>{{ text "chats:label.view_older" }}</span>
</a>
{% if page != 0 %}
{% if page != 0 -%}
<a class="button quaternary" href="/chats/{{ community }}/{{ channel }}/_stream?page={{ page - 1 }}" onclick="window.CURRENT_PAGE -= 1">
{{ icon "rewind" }}
<span>{{ text "chats:label.view_more_recent" }}</span>
</a>
{% endif %}
{%- endif %}
</div>
{% endif %}
{%- endif %}
</div>
<style>