generated from t/malachite
add: full working chats
This commit is contained in:
parent
b360c5e737
commit
3f8171938e
7 changed files with 77 additions and 13 deletions
|
@ -45,8 +45,24 @@
|
|||
(div
|
||||
("class" "flex w_full gap_ch message {%- if user.id == message.owner %} justify_right mine {%- endif %}")
|
||||
("id" "message_{{ message.id }}")
|
||||
(text "{% if message.owner == user.id -%}")
|
||||
(div
|
||||
("class" "inner no_p_margin")
|
||||
("class" "dropdown")
|
||||
(button
|
||||
("onclick" "open_dropdown(event)")
|
||||
("exclude" "dropdown")
|
||||
("class" "button")
|
||||
(text "{{ icon \"ellipsis\" }}"))
|
||||
(div
|
||||
("class" "inner surface")
|
||||
(button
|
||||
("class" "button surface red")
|
||||
("onclick" "delete_message('{{ message.id }}')")
|
||||
(text "delete"))))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(div
|
||||
("class" "body no_p_margin")
|
||||
(text "{{ message.content|markdown|safe }}"))
|
||||
(text "{{ self::avatar(id=message.owner) }}"))
|
||||
(text "{%- endmacro %}")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
(div
|
||||
("class" "hidden")
|
||||
("id" "msgs_data_{{ id }}")
|
||||
("data-first-message-time" "{{ first_message_time }}"))
|
||||
("data-first-message-time" "{{ last_message_time }}"))
|
||||
|
||||
(text "{% if messages|length == 0 -%}")
|
||||
(div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue