From 8cc425206211f82bbe3ffbd873312a383835a3a8 Mon Sep 17 00:00:00 2001 From: sujal shah Date: Mon, 22 Jul 2024 19:04:36 +0530 Subject: [PATCH] settings: Convert name to pills in custom emoji section. previously, author names are displayed in plain text, now they are converted to pills. Fixes #30990. --- web/src/settings_emoji.ts | 5 ++++- web/templates/settings/admin_emoji_list.hbs | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/settings_emoji.ts b/web/src/settings_emoji.ts index 2327eb35c9..776bd01144 100644 --- a/web/src/settings_emoji.ts +++ b/web/src/settings_emoji.ts @@ -126,12 +126,15 @@ export function populate_emoji(): void { name: "emoji_list", get_item: ListWidget.default_get_item, modifier_html(item) { + const author = item.author + ? {...item.author, is_active: people.is_person_active(item.author_id)} + : ""; return render_admin_emoji_list({ emoji: { name: item.name, display_name: item.name.replaceAll("_", " "), source_url: item.source_url, - author: item.author ?? "", + author, can_delete_emoji: can_delete_emoji(item), }, }); diff --git a/web/templates/settings/admin_emoji_list.hbs b/web/templates/settings/admin_emoji_list.hbs index 40e86f4e00..f2ffeb1911 100644 --- a/web/templates/settings/admin_emoji_list.hbs +++ b/web/templates/settings/admin_emoji_list.hbs @@ -12,7 +12,9 @@ {{#if author}} - {{author.full_name}} + {{#with author}} + {{> ../user_display_only_pill display_value=full_name img_src=avatar_url}} + {{/with}} {{else}} {{t "Unknown author" }} {{/if}}