add: hide_username_badges

This commit is contained in:
trisua 2025-08-08 21:05:56 -04:00
parent 98426d0989
commit 077e9252e3
4 changed files with 20 additions and 3 deletions

View file

@ -107,7 +107,7 @@
(text "{% else %}") (text "{% else %}")
(text "{{ self::username(user=user) }}") (text "{{ self::username(user=user) }}")
(text "{%- endif %}")) (text "{%- endif %}"))
(text "{{ self::online_indicator(user=user) }} {% if user.is_verified -%}") (text "{{ self::online_indicator(user=user) }} {% if not user.settings.hide_username_badges -%} {% if user.is_verified -%}")
(span (span
("title" "Verified") ("title" "Verified")
("style" "color: var(--color-primary)") ("style" "color: var(--color-primary)")
@ -131,7 +131,7 @@
("style" "color: var(--color-primary);") ("style" "color: var(--color-primary);")
("class" "flex items_center") ("class" "flex items_center")
(text "{{ icon \"shield-user\" }}")) (text "{{ icon \"shield-user\" }}"))
(text "{%- endif %}")) (text "{%- endif %} {%- endif %}"))
(text "{%- endif %} {%- endmacro %} {% macro repost(repost, post, owner, secondary=false, community=false, show_community=true, can_manage_post=false) -%}") (text "{%- endif %} {%- endmacro %} {% macro repost(repost, post, owner, secondary=false, community=false, show_community=true, can_manage_post=false) -%}")
(div (div
("style" "display: contents") ("style" "display: contents")

View file

@ -11,7 +11,13 @@
(span (span
("class" "flex items_center gap_2") ("class" "flex items_center gap_2")
(icon (text "piggy-bank")) (icon (text "piggy-bank"))
(span (str (text "general:link.wallet"))))) (span (str (text "general:link.wallet"))))
(button
("class" "lowered small square tiny big_icon")
("onclick" "document.getElementById('buy_dialog').showModal()")
("title" "Buy coins")
(icon (text "plus"))))
(div (div
("class" "card lowered flex flex_col gap_4") ("class" "card lowered flex flex_col gap_4")
(button (button

View file

@ -1906,6 +1906,14 @@
\"{{ profile.settings.hide_social_follows }}\", \"{{ profile.settings.hide_social_follows }}\",
\"checkbox\", \"checkbox\",
], ],
[
[
\"hide_username_badges\",
\"Hide badges from your username (outside of your profile)\",
],
\"{{ profile.settings.hide_username_badges }}\",
\"checkbox\",
],
[[], \"Questions\", \"title\"], [[], \"Questions\", \"title\"],
[ [
[ [

View file

@ -362,6 +362,9 @@ pub struct UserSettings {
/// If your profile has the "Shop" tab enabled. /// If your profile has the "Shop" tab enabled.
#[serde(default)] #[serde(default)]
pub enable_shop: bool, pub enable_shop: bool,
/// Hide all badges from your username (everywhere but on profile).
#[serde(default)]
pub hide_username_badges: bool,
} }
fn mime_avif() -> String { fn mime_avif() -> String {