mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 04:39:59 +02:00
Do not show default container context menu if disabled
This commit is contained in:
parent
9cce473af8
commit
cb24052969
1 changed files with 11 additions and 0 deletions
|
@ -251,6 +251,11 @@ var ZenWorkspaces = {
|
||||||
return workspace.name[0].toUpperCase();
|
return workspace.name[0].toUpperCase();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get shouldShowContainers() {
|
||||||
|
return Services.prefs.getBoolPref('privacy.userContext.ui.enabled') &&
|
||||||
|
ContextualIdentityService.getPublicIdentities().length > 0;
|
||||||
|
},
|
||||||
|
|
||||||
async _propagateWorkspaceData({
|
async _propagateWorkspaceData({
|
||||||
ignoreStrip = false
|
ignoreStrip = false
|
||||||
} = {}) {
|
} = {}) {
|
||||||
|
@ -721,6 +726,12 @@ var ZenWorkspaces = {
|
||||||
} else {
|
} else {
|
||||||
openMenuItem.removeAttribute('disabled');
|
openMenuItem.removeAttribute('disabled');
|
||||||
}
|
}
|
||||||
|
const openInContainerMenuItem = document.getElementById('context_zenWorkspacesOpenInContainerTab');
|
||||||
|
if (this.shouldShowContainers) {
|
||||||
|
openInContainerMenuItem.removeAttribute('hidden');
|
||||||
|
} else {
|
||||||
|
openInContainerMenuItem.setAttribute('hidden', 'true');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async contextChangeContainerTab(event) {
|
async contextChangeContainerTab(event) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue