add: make hide_dislikes disable post dislikes entirely
This commit is contained in:
parent
42421bd906
commit
1aab2f1b97
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@
|
||||||
("style" "display: contents")
|
("style" "display: contents")
|
||||||
(text "{% if user.settings.display_name -%} {{ user.settings.display_name }} {% else %} {{ user.username }} {%- endif %}"))
|
(text "{% if user.settings.display_name -%} {{ user.settings.display_name }} {% else %} {{ user.username }} {%- endif %}"))
|
||||||
|
|
||||||
(text "{%- endmacro %} {% macro likes(id, asset_type, likes=0, dislikes=0, secondary=false) -%}")
|
(text "{%- endmacro %} {% macro likes(id, asset_type, likes=0, dislikes=0, secondary=false, disable_dislikes=false) -%}")
|
||||||
(button
|
(button
|
||||||
("title" "Like")
|
("title" "Like")
|
||||||
("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small")
|
("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small")
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
(text "{{ likes }}"))
|
(text "{{ likes }}"))
|
||||||
(text "{%- endif %}"))
|
(text "{%- endif %}"))
|
||||||
|
|
||||||
(text "{% if not user or not user.settings.hide_dislikes -%}")
|
(text "{% if not user or not user.settings.hide_dislikes and not disable_dislikes -%}")
|
||||||
(button
|
(button
|
||||||
("title" "Dislike")
|
("title" "Dislike")
|
||||||
("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small")
|
("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small")
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
("class" "flex gap-1 reactions_box")
|
("class" "flex gap-1 reactions_box")
|
||||||
("hook" "check_reactions")
|
("hook" "check_reactions")
|
||||||
("hook-arg:id" "{{ post.id }}")
|
("hook-arg:id" "{{ post.id }}")
|
||||||
(text "{% if post.context.reactions_enabled -%} {% if post.content|length > 0 or post.uploads|length > 0 -%} {{ self::likes(id=post.id, asset_type=\"Post\", likes=post.likes, dislikes=post.dislikes) }} {%- endif %} {%- endif %} {% if post.context.repost and post.context.repost.reposting -%}")
|
(text "{% if post.context.reactions_enabled -%} {% if post.content|length > 0 or post.uploads|length > 0 -%} {{ self::likes(id=post.id, asset_type=\"Post\", likes=post.likes, dislikes=post.dislikes, disable_dislikes=owner.settings.hide_dislikes) }} {%- endif %} {%- endif %} {% if post.context.repost and post.context.repost.reposting -%}")
|
||||||
(a
|
(a
|
||||||
("href" "/post/{{ post.context.repost.reposting }}")
|
("href" "/post/{{ post.context.repost.reposting }}")
|
||||||
("class" "button small camo")
|
("class" "button small camo")
|
||||||
|
|
|
@ -1398,7 +1398,7 @@
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[],
|
[],
|
||||||
\"Hides dislikes on all posts. Users can still dislike your posts, you just won't be able to see it.\",
|
\"Hides dislikes on all posts. Users will also no longer be able to dislike your posts.\",
|
||||||
\"text\",
|
\"text\",
|
||||||
],
|
],
|
||||||
[[], \"Fun\", \"title\"],
|
[[], \"Fun\", \"title\"],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue