mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 23:59:43 +01:00
109 lines
5.0 KiB
TypeScript
109 lines
5.0 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { isWeb, isWindows } from '../../../base/common/platform.js';
|
|
import { PolicyCategory } from '../../../base/common/policy.js';
|
|
import { localize } from '../../../nls.js';
|
|
import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationRegistry } from '../../configuration/common/configurationRegistry.js';
|
|
import { Registry } from '../../registry/common/platform.js';
|
|
|
|
const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);
|
|
configurationRegistry.registerConfiguration({
|
|
id: 'update',
|
|
order: 15,
|
|
title: localize('updateConfigurationTitle', "Update"),
|
|
type: 'object',
|
|
properties: {
|
|
'update.mode': {
|
|
type: 'string',
|
|
enum: ['none', 'manual', 'start', 'default'],
|
|
default: 'default',
|
|
scope: ConfigurationScope.APPLICATION,
|
|
description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."),
|
|
tags: ['usesOnlineServices'],
|
|
enumDescriptions: [
|
|
localize('none', "Disable updates."),
|
|
localize('manual', "Disable automatic background update checks. Updates will be available if you manually check for updates."),
|
|
localize('start', "Check for updates only on startup. Disable automatic background update checks."),
|
|
localize('default', "Enable automatic update checks. Code will check for updates automatically and periodically.")
|
|
],
|
|
policy: {
|
|
name: 'UpdateMode',
|
|
category: PolicyCategory.Update,
|
|
minimumVersion: '1.67',
|
|
localization: {
|
|
description: { key: 'updateMode', value: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."), },
|
|
enumDescriptions: [
|
|
{
|
|
key: 'none',
|
|
value: localize('none', "Disable updates."),
|
|
},
|
|
{
|
|
key: 'manual',
|
|
value: localize('manual', "Disable automatic background update checks. Updates will be available if you manually check for updates."),
|
|
},
|
|
{
|
|
key: 'start',
|
|
value: localize('start', "Check for updates only on startup. Disable automatic background update checks."),
|
|
},
|
|
{
|
|
key: 'default',
|
|
value: localize('default', "Enable automatic update checks. Code will check for updates automatically and periodically."),
|
|
}
|
|
]
|
|
},
|
|
}
|
|
},
|
|
'update.channel': {
|
|
type: 'string',
|
|
default: 'default',
|
|
scope: ConfigurationScope.APPLICATION,
|
|
description: localize('updateMode', "Configure whether you receive automatic updates. Requires a restart after change. The updates are fetched from a Microsoft online service."),
|
|
deprecationMessage: localize('deprecated', "This setting is deprecated, please use '{0}' instead.", 'update.mode')
|
|
},
|
|
'update.enableWindowsBackgroundUpdates': {
|
|
type: 'boolean',
|
|
default: true,
|
|
scope: ConfigurationScope.APPLICATION,
|
|
title: localize('enableWindowsBackgroundUpdatesTitle', "Enable Background Updates"),
|
|
description: localize('enableWindowsBackgroundUpdates', "Enable to download and install new VS Code versions in the background."),
|
|
included: isWindows && !isWeb
|
|
},
|
|
'update.showReleaseNotes': {
|
|
type: 'boolean',
|
|
default: true,
|
|
scope: ConfigurationScope.APPLICATION,
|
|
description: localize('showReleaseNotes', "Show Release Notes after an update. The Release Notes are fetched from a Microsoft online service."),
|
|
tags: ['usesOnlineServices']
|
|
},
|
|
'update.statusBar': {
|
|
type: 'string',
|
|
enum: ['hidden', 'actionable', 'detailed'],
|
|
default: 'detailed',
|
|
scope: ConfigurationScope.APPLICATION,
|
|
description: localize('statusBar', "Controls the visibility of the update status bar entry."),
|
|
enumDescriptions: [
|
|
localize('hidden', "The status bar entry is never shown."),
|
|
localize('actionable', "The status bar entry is shown when an action is required (e.g., download, install, or restart)."),
|
|
localize('detailed', "The status bar entry is shown for all update states including progress.")
|
|
]
|
|
},
|
|
'update.titleBar': {
|
|
type: 'string',
|
|
enum: ['none', 'actionable', 'detailed'],
|
|
default: 'none',
|
|
scope: ConfigurationScope.APPLICATION,
|
|
tags: ['experimental'],
|
|
experiment: { mode: 'startup' },
|
|
description: localize('titleBar', "Controls the experimental update title bar entry."),
|
|
enumDescriptions: [
|
|
localize('titleBarNone', "The title bar entry is never shown."),
|
|
localize('titleBarActionable', "The title bar entry is shown when an action is required (e.g., download, install, or restart)."),
|
|
localize('titleBarDetailed', "The title bar entry is shown for all update states including progress.")
|
|
]
|
|
}
|
|
}
|
|
});
|