From 5c5c8ceaf0a0797100899af5119a00407f2045dc Mon Sep 17 00:00:00 2001 From: f0x52 Date: Fri, 25 Nov 2022 16:37:57 +0100 Subject: [PATCH] [chore] Fix frogend admin emoji patch (#1148) * fix className * fix unable to set category on new emoji * wrap emoji groups --- web/source/settings/admin/emoji/detail.js | 2 +- web/source/settings/components/fake-profile.jsx | 4 ++-- web/source/settings/style.css | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/source/settings/admin/emoji/detail.js b/web/source/settings/admin/emoji/detail.js index 266084718..51e291448 100644 --- a/web/source/settings/admin/emoji/detail.js +++ b/web/source/settings/admin/emoji/detail.js @@ -81,7 +81,7 @@ function EmojiDetail({emoji}) { } React.useEffect(() => { - if (category != emoji.category && !categoryState.open && !isNewCategory && emoji.category != undefined) { + if (category != emoji.category && !categoryState.open && !isNewCategory && category.trim().length > 0) { console.log("updating to", category); modifyEmoji({id: emoji.id, category: category.trim()}); } diff --git a/web/source/settings/components/fake-profile.jsx b/web/source/settings/components/fake-profile.jsx index decd65d83..c69e52b76 100644 --- a/web/source/settings/components/fake-profile.jsx +++ b/web/source/settings/components/fake-profile.jsx @@ -33,10 +33,10 @@ module.exports = function FakeProfile({}) {
{account.avatar
{account.display_name.trim().length > 0 ? account.display_name : account.username}
-
+
@{account.username}
{(account.role && account.role != "user") && -
{account.role}
+
{account.role}
}
diff --git a/web/source/settings/style.css b/web/source/settings/style.css index 7922a4053..590db1982 100644 --- a/web/source/settings/style.css +++ b/web/source/settings/style.css @@ -410,6 +410,7 @@ span.form-info { .emoji-group { display: flex; + flex-wrap: wrap; a { border-radius: $br;