From d9a078e6d35b54804cfa696f1b2989b9769b8488 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 26 Jan 2023 23:35:23 +0100 Subject: Add role badges to WebUI (#2096) * [Glitch] Add role badges to WebUI Signed-off-by: Claire * [Glitch] Ensure role name remains readable Signed-off-by: Claire Signed-off-by: Claire --- .../flavours/glitch/features/account/components/header.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/javascript/flavours/glitch/features') diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index 071d00bb4..963ce7bf3 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -321,6 +321,11 @@ class Header extends ImmutablePureComponent { badge = null; } + let role = null; + if (account.getIn(['roles', 0])) { + role = (
{account.getIn(['roles', 0, 'name'])}
); + } + return (
{!(suspended || hidden || account.get('moved')) && account.getIn(['relationship', 'requested_by']) && } @@ -337,6 +342,7 @@ class Header extends ImmutablePureComponent {
{!suspended && ( -- cgit