]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Add basic support for group actors
authorTakeshi Umeda <noel.yoshiba@gmail.com>
Wed, 4 Dec 2019 19:36:33 +0000 (04:36 +0900)
committerThibaut Girka <thib@sitedethib.com>
Sat, 7 Dec 2019 14:48:26 +0000 (15:48 +0100)
Port f43f1e01840cd0bad7a88c90d9ea44b183a2a15d to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/account/components/header.js

index e65a68b4d299802cff20f3c3988281c4d831e336..6b4aff6161cd3a1898c78bcb38505618e1281257 100644 (file)
@@ -232,9 +232,18 @@ 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           = account.get('bot') ? (<div className='account-role bot'><FormattedMessage id='account.badges.bot' defaultMessage='Bot' /></div>) : null;
     const acct            = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
 
+    let badge;
+
+    if (account.get('bot')) {
+      badge = (<div className='account-role bot'><FormattedMessage id='account.badges.bot' defaultMessage='Bot' /></div>);
+    } else if (account.get('group')) {
+      badge = (<div className='account-role group'><FormattedMessage id='account.badges.group' defaultMessage='Group' /></div>);
+    } else {
+      badge = null;
+    }
+
     return (
       <div className={classNames('account__header', { inactive: !!account.get('moved') })} ref={this.setRef}>
         <div className='account__header__image'>