about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-04-29 16:24:15 +0200
committerThibaut Girka <thib@sitedethib.com>2018-04-29 18:48:45 +0200
commit356d0214c93da79f0583a62a6ca748828d721326 (patch)
treeb3441fa221f9e6d470a52de337227d952ae3cf53 /app/javascript/flavours/glitch/reducers
parent91fb82a4ddfc13fb916d1b539f6a8fcb164166f5 (diff)
Implement tootsuite-style account fields
glitch-soc-style still in backup, both sharing the same SCSS style
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r--app/javascript/flavours/glitch/reducers/accounts.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/accounts.js b/app/javascript/flavours/glitch/reducers/accounts.js
index 61354f2e1..23fbd999c 100644
--- a/app/javascript/flavours/glitch/reducers/accounts.js
+++ b/app/javascript/flavours/glitch/reducers/accounts.js
@@ -69,6 +69,14 @@ const normalizeAccount = (state, account) => {
   account.display_name_html = emojify(escapeTextContentForBrowser(displayName));
   account.note_emojified = emojify(account.note);
 
+  if (account.fields) {
+    account.fields = account.fields.map(pair => ({
+      ...pair,
+      name_emojified: emojify(escapeTextContentForBrowser(pair.name)),
+      value_emojified: emojify(pair.value),
+    }));
+  }
+
   if (account.moved) {
     state = normalizeAccount(state, account.moved);
     account.moved = account.moved.id;