add: chat notifications

use sql_chanes/notifications_tag.sql; ignore first statement if you never used a preview commit
This commit is contained in:
trisua 2025-05-03 17:51:36 -04:00
parent a009ef9e34
commit 59cfec4819
22 changed files with 267 additions and 136 deletions

View file

@ -910,8 +910,7 @@ if state and state.data %}
{%- endmacro %} {% macro connection_url(key, value) -%} {% if value[0].data.url
%} {{ value[0].data.url }} {% elif key == "LastFm" %} https://last.fm/user/{{
value[0].data.name }} {% endif %} {%- endmacro %} {% macro
message_actions(can_manage_message, user, message) -%} {% if can_manage_message
or (user and user.id == message.owner) %}
message_actions(can_manage_message, user, message) -%}
<div class="dropdown">
<button
class="camo small"
@ -922,14 +921,30 @@ or (user and user.id == message.owner) %}
</button>
<div class="inner">
{% if can_manage_message or (user and user.id == message.owner) %}
<button class="red" onclick="delete_message('{{ message.id }}')">
{{ icon "trash" }}
<span>{{ text "general:action.delete" }}</span>
</button>
{% endif %}
<button
onclick="window.location.href = `${window.location.origin}/chats/{{ community }}/{{ channel }}?message={{ message.id }}`"
>
{{ icon "external-link" }}
<span>{{ text "general:action.open" }}</span>
</button>
<button
onclick="trigger('atto::copy_text', [`${window.location.origin}/chats/{{ community }}/{{ channel }}?message={{ message.id }}`])"
>
{{ icon "copy" }}
<span>{{ text "general:action.copy_link" }}</span>
</button>
</div>
</div>
{% endif %} {%- endmacro %} {% macro message(user, message,
can_manage_message=false, grouped=false) -%}
{%- endmacro %} {% macro message(user, message, can_manage_message=false,
grouped=false) -%}
<div
class="card secondary message flex gap-2 {% if grouped %}grouped{% endif %}"
id="message-{{ message.id }}"