about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-20 14:35:29 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-10-28 19:24:02 +0200
commit9363e5c24e48952ddb9a57a5b7d8cc8fe862fbd5 (patch)
tree9bb91719f90dfc791f50469a18e1aa28bf14db2d /app/javascript/flavours/glitch/features/account
parent6013eeea4c3492ac219bc8221396aa687775bf44 (diff)
[Glitch] Change public accounts pages to mount the web UI
Port 839f893168ab221b08fa439012189e6c29a2721a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/account')
-rw-r--r--app/javascript/flavours/glitch/features/account/components/header.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js
index 9c7e62fc2..9aca72172 100644
--- a/app/javascript/flavours/glitch/features/account/components/header.js
+++ b/app/javascript/flavours/glitch/features/account/components/header.js
@@ -273,7 +273,9 @@ 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 acct            = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
+    const isLocal         = account.get('acct').indexOf('@') === -1;
+    const acct            = isLocal && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
+    const isIndexable     = !account.get('noindex');
 
     let badge;
 
@@ -353,6 +355,7 @@ class Header extends ImmutablePureComponent {
 
         <Helmet>
           <title>{titleFromAccount(account)}</title>
+          <meta name='robots' content={(isLocal && isIndexable) ? 'all' : 'noindex'} />
         </Helmet>
       </div>
     );