generated from t/malachite
add: message replies
This commit is contained in:
parent
dfa1abe2d9
commit
ca1eca967c
13 changed files with 113 additions and 22 deletions
|
@ -41,10 +41,11 @@
|
|||
(text "{%- endif %}")
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro message(message, is_pinned=false) -%}")
|
||||
(text "{% macro message(message, replying_to=false, is_pinned=false, hide_actions=false) -%}")
|
||||
(div
|
||||
("class" "flex w_full gap_ch message {%- if user.id == message.owner %} justify_right mine {%- endif %}")
|
||||
("id" "message_{{ message.id }}")
|
||||
("id" "{% if not hide_actions -%} message_{{ message.id }} {%- endif %}")
|
||||
(text "{% if not hide_actions -%}")
|
||||
(div
|
||||
("class" "dropdown hidden")
|
||||
(button
|
||||
|
@ -61,6 +62,11 @@
|
|||
(text "pin"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(button
|
||||
("class" "button surface")
|
||||
("onclick" "reply_to_message('{{ message.id }}')")
|
||||
(text "reply"))
|
||||
|
||||
(text "{% if message.owner == user.id -%}")
|
||||
(button
|
||||
("class" "button surface")
|
||||
|
@ -71,6 +77,7 @@
|
|||
("onclick" "delete_message('{{ message.id }}')")
|
||||
(text "delete"))
|
||||
(text "{%- endif %}")))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(div
|
||||
("class" "body no_p_margin")
|
||||
|
@ -101,6 +108,12 @@
|
|||
("href" "/@{{ message.owner }}?redirect=true")
|
||||
("target" "_blank")
|
||||
(text "{{ self::avatar(id=message.owner) }}")))
|
||||
|
||||
(text "{% if replying_to -%}")
|
||||
(div
|
||||
("style" "transform: scale(0.8); opacity: 75%; width: 110%")
|
||||
(text "{{ self::message(message=replying_to, hide_actions=true) }}"))
|
||||
(text "{%- endif %}")
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro theme(user, theme_preference) -%} {% if user %} {% if user.settings.theme_hue -%}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue