Skip to content

Commit

Permalink
[chore] Fix frogend admin emoji patch (#1148)
Browse files Browse the repository at this point in the history
* fix className

* fix unable to set category on new emoji

* wrap emoji groups
  • Loading branch information
f0x52 committed Nov 25, 2022
1 parent 665d902 commit 5c5c8ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/source/settings/admin/emoji/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()});
}
Expand Down
4 changes: 2 additions & 2 deletions web/source/settings/components/fake-profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ module.exports = function FakeProfile({}) {
<div id="profile-basic-filler2"></div>
<span className="avatar"><img className="avatarpreview" src={account.avatar} alt={account.avatar ? `avatar image for ${account.username}` : "None set"} /></span>
<div className="displayname">{account.display_name.trim().length > 0 ? account.display_name : account.username}</div>
<div class="usernamecontainer">
<div className="usernamecontainer">
<div className="username"><span>@{account.username}</span></div>
{(account.role && account.role != "user") &&
<div class={`role ${account.role}`}>{account.role}</div>
<div className={`role ${account.role}`}>{account.role}</div>
}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions web/source/settings/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ span.form-info {

.emoji-group {
display: flex;
flex-wrap: wrap;

a {
border-radius: $br;
Expand Down

0 comments on commit 5c5c8ce

Please sign in to comment.