feat: Properly disable folders on private mode, b=no-bug, c=workspaces

This commit is contained in:
mr. m
2025-09-01 13:14:54 +02:00
parent 432ae29bcd
commit 4420d0df8c

View File

@@ -2626,7 +2626,15 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
_initializeWorkspaceTabContextMenus() {
if (this.privateWindowOrDisabled) {
document.getElementById('cmd_zenOpenWorkspaceCreation').setAttribute('disabled', true);
const commandsToDisable = [
'cmd_zenOpenFolderCreation',
'cmd_zenOpenWorkspaceCreation',
'zen-context-menu-new-folder',
'zen-context-menu-new-folder-toolbar',
];
commandsToDisable.forEach((cmd) => {
document.getElementById(cmd).setAttribute('disabled', true);
});
return;
}
const menu = document.createXULElement('menu');