From 3fda862ea004c1c417a442b2a8f38a67d0535979 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 19 Jul 2019 14:53:13 -0500 Subject: add badge to ui for locked accounts --- .../flavours/glitch/features/account/components/header.js | 4 +++- app/javascript/flavours/glitch/styles/accounts.scss | 6 ++++++ app/javascript/mastodon/locales/en.json | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 2b4adb4f5..0f03770b7 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -189,6 +189,8 @@ class Header extends ImmutablePureComponent { const content = { __html: account.get('note_emojified') }; const displayNameHtml = { __html: account.get('display_name_html') }; const fields = account.get('fields'); + + const badge_locked = account.get('locked') ? (
) : null; const badge_bot = account.get('bot') ? (
) : null; const badge_ac = account.get('adult_content') ? (
) : null; const badge_gently = account.get('gently') ? (
) : null; @@ -226,7 +228,7 @@ class Header extends ImmutablePureComponent {

@{acct} {lockedIcon} -
{badge_admin}{badge_mod}{badge_ac}{badge_bot}{badge_gently}{badge_kobold}
+
{badge_locked}{badge_admin}{badge_mod}{badge_ac}{badge_bot}{badge_gently}{badge_kobold}

diff --git a/app/javascript/flavours/glitch/styles/accounts.scss b/app/javascript/flavours/glitch/styles/accounts.scss index 65c7fc80c..49236fe4c 100644 --- a/app/javascript/flavours/glitch/styles/accounts.scss +++ b/app/javascript/flavours/glitch/styles/accounts.scss @@ -234,6 +234,12 @@ background-color: rgba(lighten(orange, 33%), 0.1); border-color: rgba(lighten(orange, 33%), 0.1); } + + &.locked { + color: lighten($warning-red, 12%); + background-color: rgba(lighten($warning-red, 12%), 0.1); + border-color: rgba(lighten($warning-red, 12%), 0.5); + } } .account__header__fields { diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 53166a19b..d61277d76 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -4,6 +4,7 @@ "account.badges.adult": "🔞 Adult content", "account.badges.gently": "Gentlies kobolds", "account.badges.kobold": "Gently the kobold", + "account.badges.locked": "🔒 Locked", "account.block": "Block @{name}", "account.block_domain": "Hide {domain}", "account.blocked": "Blocked", -- cgit