提交 856277c8 编写于 作者: J Jackson Kearl

Github Login => Setting Sync

上级 ad3974ad
......@@ -54,6 +54,7 @@ import { UserDataSyncDataViews } from 'vs/workbench/contrib/userDataSync/browser
import { IUserDataSyncWorkbenchService, getSyncAreaLabel, AccountStatus, CONTEXT_SYNC_STATE, CONTEXT_SYNC_ENABLEMENT, CONTEXT_ACCOUNT_STATE, CONFIGURE_SYNC_COMMAND_ID, SHOW_SYNC_LOG_COMMAND_ID, SYNC_VIEW_CONTAINER_ID, SYNC_TITLE, SYNC_VIEW_ICON } from 'vs/workbench/services/userDataSync/common/userDataSync';
import { Codicon } from 'vs/base/common/codicons';
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
import { IGettingStartedService } from 'vs/workbench/services/gettingStarted/common/gettingStartedService';
const CONTEXT_CONFLICTS_SOURCES = new RawContextKey<string>('conflictsSources', '');
......@@ -117,6 +118,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
@ITelemetryService private readonly telemetryService: ITelemetryService,
@IProductService private readonly productService: IProductService,
@IStorageService private readonly storageService: IStorageService,
@IGettingStartedService private readonly gettingStartedService: IGettingStartedService,
@IOpenerService private readonly openerService: IOpenerService,
@IAuthenticationService private readonly authenticationService: IAuthenticationService,
@IUserDataSyncStoreManagementService private readonly userDataSyncStoreManagementService: IUserDataSyncStoreManagementService,
......@@ -447,6 +449,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
await this.selectSettingsSyncService(this.userDataSyncStoreManagementService.userDataSyncStore);
}
await this.userDataSyncWorkbenchService.turnOn();
this.gettingStartedService.progressByEvent('sync-enabled');
this.storageService.store('sync.donotAskPreviewConfirmation', true, StorageScope.GLOBAL, StorageTarget.MACHINE);
} catch (e) {
if (isPromiseCanceledError(e)) {
......
......@@ -134,15 +134,15 @@ export const content: GettingStartedContent = [
media: { type: 'image', altText: 'Language extensions', path: 'languageExtensions.jpg', }
},
{
id: 'githubLogin',
title: localize('gettingStarted.githubLogin.title', "Use GitHub in VS Code"),
description: localize('gettingStarted.githubLogin.description', "Integrated GitHub makes it easier for you to manage projects from inside your code editor, including authentication, publishing repos, and viewing your repo timeline."),
when: '!githubBrowser:hasProviders',
id: 'settingsSync',
title: localize('gettingStarted.settingsSync.title', "Syncronize Settings"),
description: localize('gettingStarted.settingsSync.description', "Sign in to syncronize things like settings, extensions, and more, across your devices."),
when: '!syncEnabled && !userDataSyncTurningOn && syncStatus != uninitialized && userDataSyncAccountStatus != uninitialized',
button: {
title: localize('gettingStarted.githubLogin.button', "Sign in to GitHub"),
command: 'githubsignIn',
title: localize('gettingStarted.settingsSync.button', "Sign in to Sync"),
command: 'workbench.userDataSync.actions.turnOn',
},
doneOn: { commandExecuted: 'workbench.extensions.action.showLanguageExtensions' },
doneOn: { eventFired: 'sync-enabled' },
media: { type: 'image', altText: 'Commiting a change via Git in VS Code.', path: 'github.jpg', }
},
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册