Implement tootsuite-style account fields

glitch-soc-style still in backup, both sharing the same SCSS style
This commit is contained in:
Thibaut Girka
2018-04-29 16:24:15 +02:00
parent 91fb82a4dd
commit 356d0214c9
5 changed files with 52 additions and 30 deletions

View File

@ -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;