add: more mod panel stats add: show user invite in mod panel add:
ability to share to twitter/bluesky
This commit is contained in:
parent
66beef6b1d
commit
2676340fba
8 changed files with 201 additions and 22 deletions
|
@ -132,6 +132,7 @@
|
|||
("class" "card flex flex-col post gap-2 post:{{ post.id }} {% if secondary -%}secondary{%- endif %}")
|
||||
("data-community" "{{ post.community }}")
|
||||
("data-ownsup" "{{ owner.permissions|has_supporter }}")
|
||||
("data-id" "{{ post.id }}")
|
||||
("hook" "verify_emojis")
|
||||
(div
|
||||
("class" "w-full flex gap-2")
|
||||
|
@ -214,7 +215,7 @@
|
|||
("class" "flush")
|
||||
("href" "/post/{{ post.id }}")
|
||||
(h2
|
||||
("id" "post-content:{{ post.id }}")
|
||||
("id" "post_content:{{ post.id }}")
|
||||
("class" "no_p_margin post_content")
|
||||
("hook" "long")
|
||||
(text "{{ post.title }}"))
|
||||
|
@ -223,7 +224,6 @@
|
|||
(text "{% else %}")
|
||||
(text "{% if not post.context.content_warning -%}")
|
||||
(span
|
||||
("id" "post-content:{{ post.id }}")
|
||||
("class" "no_p_margin post_content")
|
||||
("hook" "long")
|
||||
|
||||
|
@ -234,7 +234,8 @@
|
|||
(text "{%- endif %}")
|
||||
|
||||
; content
|
||||
(text "{{ post.content|markdown|safe }} {% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}")
|
||||
(span ("id" "post_content:{{ post.id }}") (text "{{ post.content|markdown|safe }}"))
|
||||
(text "{% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}")
|
||||
(div
|
||||
("class" "card lowered red flex items-center gap-2")
|
||||
(text "{{ icon \"frown\" }}")
|
||||
|
@ -251,7 +252,6 @@
|
|||
(div
|
||||
("class" "flex flex-col gap-2")
|
||||
(span
|
||||
("id" "post-content:{{ post.id }}")
|
||||
("class" "no_p_margin post_content")
|
||||
("hook" "long")
|
||||
|
||||
|
@ -261,7 +261,8 @@
|
|||
(text "{% endif %}")
|
||||
|
||||
; content
|
||||
(text "{{ post.content|markdown|safe }} {% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}")
|
||||
(span ("id" "post_content:{{ post.id }}") (text "{{ post.content|markdown|safe }}"))
|
||||
(text "{% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}")
|
||||
(div
|
||||
("class" "card lowered red flex items-center gap-2")
|
||||
(text "{{ icon \"frown\" }}")
|
||||
|
@ -338,7 +339,32 @@
|
|||
(text "{{ icon \"quote\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.quote_post\" }}")))
|
||||
(button
|
||||
("onclick" "trigger('me::intent_twitter', [trigger('me::gen_share', [{ q: '{{ post.context.answering }}', p: '{{ post.id }}' }, 280, true])])")
|
||||
(icon (text "bird"))
|
||||
(span
|
||||
(text "Twitter")))
|
||||
(button
|
||||
("onclick" "trigger('me::intent_bluesky', [trigger('me::gen_share', [{ q: '{{ post.context.answering }}', p: '{{ post.id }}' }, 280, true])])")
|
||||
(icon (text "cloud"))
|
||||
(span
|
||||
(text "BlueSky")))
|
||||
(text "{%- endif %}")
|
||||
(text "{% if user.id != post.owner -%}")
|
||||
(b
|
||||
("class" "title")
|
||||
(text "{{ text \"general:label.safety\" }}"))
|
||||
(button
|
||||
("class" "red")
|
||||
("onclick" "trigger('me::report', ['{{ post.id }}', 'post'])")
|
||||
(text "{{ icon \"flag\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.report\" }}")))
|
||||
(text "{%- endif %} {% if (user.id == post.owner) or is_helper or can_manage_post %}")
|
||||
(b
|
||||
("class" "title")
|
||||
(text "{{ text \"general:action.manage\" }}"))
|
||||
; forge stuff
|
||||
(text "{% if community and community.is_forge -%} {% if post.is_open -%}")
|
||||
(button
|
||||
("class" "green")
|
||||
|
@ -354,20 +380,7 @@
|
|||
(span
|
||||
(text "{{ text \"forge:action.reopen\" }}")))
|
||||
(text "{%- endif %} {%- endif %}")
|
||||
(text "{% if user.id != post.owner -%}")
|
||||
(b
|
||||
("class" "title")
|
||||
(text "{{ text \"general:label.safety\" }}"))
|
||||
(button
|
||||
("class" "red")
|
||||
("onclick" "trigger('me::report', ['{{ post.id }}', 'post'])")
|
||||
(text "{{ icon \"flag\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.report\" }}")))
|
||||
(text "{%- endif %} {% if (user.id == post.owner) or is_helper or can_manage_post %}")
|
||||
(b
|
||||
("class" "title")
|
||||
(text "{{ text \"general:action.manage\" }}"))
|
||||
; owner stuff
|
||||
(text "{% if user.id == post.owner -%}")
|
||||
(a
|
||||
("href" "/post/{{ post.id }}#/edit")
|
||||
|
@ -675,6 +688,7 @@
|
|||
(span
|
||||
("class" "no_p_margin")
|
||||
("style" "font-weight: 500")
|
||||
("id" "question_content:{{ question.id }}")
|
||||
(text "{{ question.content|markdown|safe }}"))
|
||||
; question drawings
|
||||
(text "{{ self::post_media(upload_ids=question.drawings) }}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue