Skip to content

Commit 383ae36

Browse files
committed
restricted mode hover: added a link to manage trust. For microsoft#125408
1 parent f8c061e commit 383ae36

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -449,26 +449,29 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon
449449
ariaLabel = trusted ? localize('status.ariaTrustedWindow', "This window is trusted.") :
450450
localize('status.ariaUntrustedWindow', "Restricted Mode: Some features are disabled because this window is not trusted.");
451451
toolTip = trusted ? ariaLabel : {
452-
value: localize('status.tooltipUntrustedWindow', "Restricted Mode: [Some features](command:{1}) are disabled because this window is not trusted.", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID),
453-
isTrusted: true
452+
value: localize('status.tooltipUntrustedWindow', "Running in Restricted Mode\n\n\Some [features are disabled](command:{0}) because this [window is not trusted](command:{1}).", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, MANAGE_TRUST_COMMAND_ID),
453+
isTrusted: true,
454+
supportThemeIcons: true
454455
};
455456
break;
456457
}
457458
case WorkbenchState.FOLDER: {
458459
ariaLabel = trusted ? localize('status.ariaTrustedFolder', "This folder is trusted.") :
459460
localize('status.ariaUntrustedFolder', "Restricted Mode: Some features are disabled because this folder is not trusted.");
460461
toolTip = trusted ? ariaLabel : {
461-
value: localize('status.tooltipUntrustedFolder', "Restricted Mode: [Some features](command:{1}) are disabled because this folder is not trusted", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID),
462-
isTrusted: true
462+
value: localize('status.tooltipUntrustedFolder', "Running in Restricted Mode\n\n\Some [features are disabled](command:{0}) because this [folder is not trusted](command:{1}).", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, MANAGE_TRUST_COMMAND_ID),
463+
isTrusted: true,
464+
supportThemeIcons: true
463465
};
464466
break;
465467
}
466468
case WorkbenchState.WORKSPACE: {
467469
ariaLabel = trusted ? localize('status.ariaTrustedWorkspace', "This workspace is trusted.") :
468470
localize('status.ariaUntrustedWorkspace', "Restricted Mode: Some features are disabled because this workspace is not trusted.");
469471
toolTip = trusted ? ariaLabel : {
470-
value: localize('status.tooltipUntrustedWorkspace', "Restricted Mode: [Some features](command:{1}) are disabled because this workspace is not trusted", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID),
471-
isTrusted: true
472+
value: localize('status.tooltipUntrustedWorkspace', "Running in Restricted Mode\n\n\Some [features are disabled](command:{0}) because this [workspace is not trusted](command:{1}).", LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID, MANAGE_TRUST_COMMAND_ID),
473+
isTrusted: true,
474+
supportThemeIcons: true
472475
};
473476
break;
474477
}
@@ -631,11 +634,13 @@ Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
631634
* Actions
632635
*/
633636

637+
const MANAGE_TRUST_COMMAND_ID = 'workbench.trust.manage';
638+
634639
// Manage Workspace Trust
635640
registerAction2(class extends Action2 {
636641
constructor() {
637642
super({
638-
id: 'workbench.trust.manage',
643+
id: MANAGE_TRUST_COMMAND_ID,
639644
title: {
640645
original: 'Manage Workspace Trust',
641646
value: localize('manageWorkspaceTrust', "Manage Workspace Trust")

0 commit comments

Comments
 (0)