about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/account
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-07-31 11:44:12 +0200
committerThibG <thib@sitedethib.com>2018-07-31 16:26:36 +0200
commit88b593a63ff3d607d6f98553654c46bc7cfc0b7b (patch)
tree458ac146f6fcc2264e6d96b1e2f3677b527b0ea9 /app/javascript/flavours/glitch/features/account
parentc4bec9263cabdd141d5e83e57869dec97426c0d9 (diff)
Drop glitch-style account bio fields
Upstream's implementation has been merged a while ago and is the preferred
way to set fields, as it is the only one compatible with upstream and is
more user-friendly.

This commit deletes the legacy glitch-soc FrontMatter functionality in order
to clean up the code and make it easier to maintain.
Diffstat (limited to 'app/javascript/flavours/glitch/features/account')
-rw-r--r--app/javascript/flavours/glitch/features/account/components/header.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js
index 59d9477d6..174df0cc9 100644
--- a/app/javascript/flavours/glitch/features/account/components/header.js
+++ b/app/javascript/flavours/glitch/features/account/components/header.js
@@ -7,9 +7,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
 import Avatar from 'flavours/glitch/components/avatar';
 import IconButton from 'flavours/glitch/components/icon_button';
 
-import emojify from 'flavours/glitch/util/emoji';
 import { me } from 'flavours/glitch/util/initial_state';
-import { processBio } from 'flavours/glitch/util/bio_metadata';
 import classNames from 'classnames';
 
 const messages = defineMessages({
@@ -83,7 +81,7 @@ export default class Header extends ImmutablePureComponent {
       actionBtn = '';
     }
 
-    const { text, metadata } = processBio(account.get('note_emojified'));
+    const content = { __html: account.get('note_emojified') };
 
     return (
       <div className='account__header__wrapper'>
@@ -104,7 +102,7 @@ export default class Header extends ImmutablePureComponent {
 
             {badge}
 
-            <div className='account__header__content' dangerouslySetInnerHTML={{ __html: emojify(text) }} />
+            <div className='account__header__content' dangerouslySetInnerHTML={content} />
 
             {fields.size > 0 && (
               <div className='account__header__fields'>
@@ -117,17 +115,6 @@ export default class Header extends ImmutablePureComponent {
               </div>
             )}
 
-            {fields.size == 0 && metadata.length && (
-              <div className='account__header__fields'>
-                {metadata.map((pair, i) => (
-                  <dl key={i}>
-                    <dt dangerouslySetInnerHTML={{ __html: pair[0] }} title={pair[0]} />
-                    <dd dangerouslySetInnerHTML={{ __html: pair[1] }} title={pair[1]} />
-                  </dl>
-                ))}
-              </div>
-            ) || null}
-
             {info}
             {mutingInfo}
             {actionBtn}