describe the context key for workspace trust

This commit is contained in:
SteVen Batten 2021-04-21 10:01:54 -07:00
parent a9f70f7919
commit 43d2efaab6

View file

@ -7,6 +7,7 @@ import { Emitter } from 'vs/base/common/event';
import { Disposable } from 'vs/base/common/lifecycle';
import { Schemas } from 'vs/base/common/network';
import { URI } from 'vs/base/common/uri';
import { localize } from 'vs/nls';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
@ -23,7 +24,7 @@ export const WORKSPACE_TRUST_STORAGE_KEY = 'content.trust.model.key';
export const WorkspaceTrustContext = {
PendingRequest: new RawContextKey<boolean>('workspaceTrustPendingRequest', false),
IsTrusted: new RawContextKey<boolean>('isWorkspaceTrusted', false)
IsTrusted: new RawContextKey<boolean>('isWorkspaceTrusted', false, localize('workspaceTrustCtx', "Whether the current workspace has been trusted by the user."))
};
export function isWorkspaceTrustEnabled(configurationService: IConfigurationService): boolean {