add: outbox tab on profile

tab is only visible to profile owner and mods
This commit is contained in:
trisua 2025-06-01 19:26:55 -04:00
parent 5dec98d698
commit 7bda718082
12 changed files with 264 additions and 9 deletions

View file

@ -202,8 +202,9 @@
(text "{%- endif %} {%- endif %}"))
(text "{{ self::post_media(upload_ids=post.uploads) }} {% else %}")
(details
("class" "card tiny tertiary w-full")
(summary
("class" "card flex gap-2 flex-wrap items-center tertiary red w-full")
("class" "flex gap-2 flex-wrap items-center red w-full")
(text "{{ icon \"triangle-alert\" }}")
(b
(text "{{ post.context.content_warning }}")))
@ -541,7 +542,7 @@
(text "{%- endif %} {%- endmacro %} {% macro question(question, owner, show_community=true, secondary=false, profile=false) -%}")
(div
("class" "card{% if secondary -%} secondary{%- endif %} flex gap-2")
("class" "card {% if secondary -%}secondary{%- endif %} flex gap-2")
(text "{% if owner.id == 0 -%}")
(span
(text "{% if profile and profile.settings.anonymous_avatar_url -%}")
@ -558,7 +559,7 @@
(text "{{ self::avatar(username=owner.username, selector_type=\"username\", size=\"52px\") }}"))
(text "{%- endif %}")
(div
("class" "flex flex-col gap-1")
("class" "flex flex-col gap-1 w-full")
(div
("class" "flex items-center gap-2 flex-wrap")
(span
@ -606,6 +607,21 @@
("class" "no_p_margin")
("style" "font-weight: 500")
(text "{{ question.content|markdown|safe }}"))
; anonymous user ip thing
; this is only shown if the post author is anonymous AND we are a helper
(text "{% if is_helper and owner.id == 0 %}")
(details
("class" "card tiny tertiary w-full")
(summary
("class" "w-full flex gap-2 flex-wrap items-center")
(icon (text "shield"))
(span (text "View IP")))
(div
("class" "card secondary")
(pre (code (text "{{ question.ip }}")))))
(text "{% endif %}")
; ...
(div
("class" "flex gap-2 items-center justify-between"))))