mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-30 04:11:51 +00:00
fix: Hide folder icon remove action when no icon is set, b=closes #12401, p=#12481, c=folders, common
Co-authored-by: andre <andre@localhost> Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -218,23 +218,21 @@ class nsZenWorkspaceCreation extends MozXULElement {
|
||||
}
|
||||
|
||||
onIconCommand(event) {
|
||||
gZenEmojiPicker
|
||||
.open(event.target)
|
||||
.then(async (emoji) => {
|
||||
const isSvg = emoji && emoji.endsWith(".svg");
|
||||
gZenEmojiPicker.open(event.target, {
|
||||
closeOnSelect: false,
|
||||
onSelect: async (icon) => {
|
||||
const isSvg = icon && icon.endsWith(".svg");
|
||||
if (isSvg) {
|
||||
this.inputIcon.label = "";
|
||||
this.inputIcon.image = emoji;
|
||||
this.inputIcon.image = icon;
|
||||
this.inputIcon.setAttribute("has-svg-icon", "true");
|
||||
} else {
|
||||
this.inputIcon.image = "";
|
||||
this.inputIcon.label = emoji || "";
|
||||
this.inputIcon.label = icon || "";
|
||||
this.inputIcon.removeAttribute("has-svg-icon");
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("Error changing workspace icon:", error);
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
set currentProfile(profile) {
|
||||
|
||||
Reference in New Issue
Block a user