generated from t/malachite
add: ability to mute chats
This commit is contained in:
parent
ff1c739367
commit
01fa758e63
11 changed files with 121 additions and 7 deletions
|
@ -41,7 +41,20 @@
|
|||
(a
|
||||
("class" "button surface")
|
||||
("href" "/chats/{{ chat.id }}/pins")
|
||||
(text "{{ icon \"pin\" }} view pins")))
|
||||
(text "{{ icon \"pin\" }} view pins"))
|
||||
|
||||
; mute
|
||||
(text "{% if not user.id in chat.mutes -%}")
|
||||
(button
|
||||
("class" "button surface")
|
||||
("onclick" "mute_chat()")
|
||||
(text "{{ icon \"bell-off\" }} mute"))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("class" "button surface")
|
||||
("onclick" "unmute_chat()")
|
||||
(text "{{ icon \"bell-ring\" }} unmute"))
|
||||
(text "{%- endif %}"))
|
||||
|
||||
(ul
|
||||
(li (b (text "Chat name: ")) (span (text "{{ components::chat_name(chat=chat, members=members) }}")))
|
||||
|
@ -78,7 +91,10 @@
|
|||
("class" "flush flex items_center gap_ch")
|
||||
("href" "/@{{ member.username }}")
|
||||
(text "{{ components::avatar(id=member.id) }}")
|
||||
(text "{{ components::username(user=member) }}"))
|
||||
(text "{{ components::username(user=member) }}")
|
||||
(text "{% if member.id in chat.mutes -%}")
|
||||
(text "{{ icon \"bell-off\" }}")
|
||||
(text "{%- endif %}"))
|
||||
(span (text "{% if member.settings.status|length > 0 -%} {{ member.settings.status|markdown|safe }} {%- else -%} No status {%- endif %}"))
|
||||
(text "{% if is_owner -%}")
|
||||
(button
|
||||
|
@ -121,4 +137,5 @@
|
|||
(datalist ("id" "users_search"))
|
||||
|
||||
(script ("src" "/public/messages.js"))
|
||||
(script (text "STATE.chat_id = '{{ chat.id }}';"))
|
||||
(text "{% endblock %}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue