tawny/app/templates_src/read_receipt.lisp

17 lines
736 B
Common Lisp

(text "{%- import \"components.lisp\" as components -%}")
(text "{% if chat.last_message_created > 0 -%}")
(div
("class" "flex gap_ch items_center")
("id" "delivered_read_status")
(text "{% if chat.last_message_read_by|length <= 1 -%}")
; just delivered
(text "{{ icon \"check\" }}")
(text "{{ chat.last_message_created|int|date(format=\"%H:%M\", timezone=\"Etc/UTC\") }} UTC")
(text "{%- else -%}")
; delivered and read by at least two people
(text "{{ icon \"check-check\" }}")
(text "{% for uid in chat.last_message_read_by -%}")
(a ("href" "/@{{ uid }}?redirect=true") (text "{{ components::avatar(id=uid) }}"))
(text "{%- endfor %}")
(text "{%- endif %}"))
(text "{%- endif %}")