add: chat pins

This commit is contained in:
trisua 2025-09-03 17:12:26 -04:00
parent 9546c580e7
commit 82eafdadb3
21 changed files with 330 additions and 56 deletions

View file

@ -9,7 +9,7 @@
(a
("class" "button tab camo")
("href" "/chats")
(text "chats"))
(text "{{ icon \"castle\" }} chats"))
(a
("class" "button tab camo")
("href" "/chats/{{ chat.id }}")
@ -17,24 +17,31 @@
(a
("class" "button tab")
("href" "/chats/{{ chat.id }}/manage")
(text "{{ icon \"settings-2\" }} Manage"))))
(text "{{ icon \"settings-2\" }} manage"))))
(div
("class" "flex flex_col gap_4 card")
("style" "flex: 1 0 auto")
(text "{% if chat.style != \"Direct\" -%}")
; gc only
(button
("class" "button surface")
("onclick" "rename_chat('{{ chat.id }}', GC_INFO)")
(text "{{ icon \"pencil\" }} rename chat"))
(div
("class" "flex gap_2 flex_wrap")
(text "{% if chat.style != \"Direct\" -%}")
; gc only
(button
("class" "button surface")
("onclick" "rename_chat('{{ chat.id }}', GC_INFO)")
(text "{{ icon \"pencil\" }} rename chat"))
(script
("type" "application/json")
("id" "gc_info")
(text "{{ chat.style.Group|json_encode() }}"))
(script
(text "globalThis.GC_INFO = JSON.parse(document.getElementById(\"gc_info\").innerHTML)"))
(text "{%- endif %}")
(script
("type" "application/json")
("id" "gc_info")
(text "{{ chat.style.Group|json_encode() }}"))
(script
(text "globalThis.GC_INFO = JSON.parse(document.getElementById(\"gc_info\").innerHTML)"))
(text "{%- endif %}")
; every chat
(a
("class" "button surface")
("href" "/chats/{{ chat.id }}/pins")
(text "{{ icon \"pin\" }} view pins")))
(ul
(li (b (text "Chat name: ")) (span (text "{{ components::chat_name(chat=chat, members=members) }}")))