This commit is contained in:
mr. M 2024-10-24 21:46:12 +02:00
commit 8db952694e
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB

View file

@ -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}`);
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')