mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 00:49:58 +02:00
Merge branch 'main' of https://github.com/zen-browser/components
This commit is contained in:
commit
8db952694e
1 changed files with 5 additions and 4 deletions
|
@ -279,7 +279,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
this._workspaceEditIconsContainer.setAttribute('data-initial-value', workspaceData.icon);
|
||||
this.onIconChangeConnectedCallback = (...args) => {
|
||||
this.onWorkspaceIconChangeInner('edit', ...args);
|
||||
this.onWorkspaceEditChange();
|
||||
this.onWorkspaceEditChange(...args);
|
||||
};
|
||||
document.querySelectorAll('#PanelUI-zen-workspaces-icon-picker-wrapper toolbarbutton').forEach((button) => {
|
||||
if (button.label === workspaceData.icon) {
|
||||
|
@ -295,7 +295,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
|
||||
onWorkspaceIconChangeInner(type = 'create', icon) {
|
||||
const container = document.querySelector(`.PanelUI-zen-workspaces-icons-container.${type}`);
|
||||
container.textContent = icon;
|
||||
if (container.textContent !== icon) {
|
||||
container.textContent = icon;
|
||||
}
|
||||
this.goToPreviousSubView();
|
||||
}
|
||||
|
||||
|
@ -843,10 +845,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
|||
button.removeAttribute('disabled');
|
||||
}
|
||||
|
||||
onWorkspaceEditChange() {
|
||||
onWorkspaceEditChange(icon) {
|
||||
let button = document.getElementById('PanelUI-zen-workspaces-edit-save');
|
||||
let name = this._workspaceEditInput.value;
|
||||
let icon = document.querySelector('#PanelUI-zen-workspaces-icon-picker-wrapper [selected]')?.label;
|
||||
if (
|
||||
name === this._workspaceEditInput.getAttribute('data-initial-value') &&
|
||||
icon === this._workspaceEditIconsContainer.getAttribute('data-initial-value')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue