From 356d0214c93da79f0583a62a6ca748828d721326 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 29 Apr 2018 16:24:15 +0200 Subject: Implement tootsuite-style account fields glitch-soc-style still in backup, both sharing the same SCSS style --- app/javascript/flavours/glitch/reducers/accounts.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/javascript/flavours/glitch/reducers') 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; -- cgit