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 "{{ self::username(user=user) }}")
(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
("title" "Verified")
("style" "color: var(--color-primary)")
@ -131,7 +131,7 @@
("style" "color: var(--color-primary);")
("class" "flex items_center")
(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) -%}")
(div
("style" "display: contents")

View file

@ -11,7 +11,13 @@
(span
("class" "flex items_center gap_2")
(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
("class" "card lowered flex flex_col gap_4")
(button

View file

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

View file

@ -362,6 +362,9 @@ pub struct UserSettings {
/// If your profile has the "Shop" tab enabled.
#[serde(default)]
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 {