Skip to content

Commit d54ac9f

Browse files
committed
microsoft#85216 reduce options for first time sync dialog
1 parent 090ff12 commit d54ac9f

1 file changed

Lines changed: 9 additions & 20 deletions

File tree

src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { IOutputService } from 'vs/workbench/contrib/output/common/output';
3535
import * as Constants from 'vs/workbench/contrib/logs/common/logConstants';
3636
import { IAuthenticationService, ChangeAccountEventData } from 'vs/workbench/services/authentication/browser/authenticationService';
3737
import { Account } from 'vs/editor/common/modes';
38-
import { canceled, isPromiseCanceledError } from 'vs/base/common/errors';
38+
import { isPromiseCanceledError } from 'vs/base/common/errors';
3939

4040
const enum MSAAuthStatus {
4141
Initializing = 'Initializing',
@@ -415,26 +415,15 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
415415
const hasPreviouslySynced = await this.userDataSyncService.hasPreviouslySynced();
416416

417417
if (hasRemote && !hasPreviouslySynced) {
418-
const result = await this.dialogService.show(
419-
Severity.Info,
420-
localize('firs time sync', "First time Sync"),
421-
[
422-
localize('continue', "Continue"),
423-
localize('cancel', "Cancel"),
424-
localize('download', "Download"),
425-
localize('upload', "Upload"),
426-
],
427-
{
428-
cancelId: 1,
429-
detail: localize('first time sync detail', "Synchronising from this device for the first time. Would you like to \nDownload and replace with the data from cloud or \nUpload and replace with the data from this device?")
430-
}
431-
);
418+
const result = await this.dialogService.confirm({
419+
type: 'info',
420+
message: localize('firs time sync', "First time Sync"),
421+
primaryButton: localize('download', "Download"),
422+
detail: localize('first time sync detail', "Would you like to download and replace with the data from cloud?"),
423+
});
432424

433-
switch (result.choice) {
434-
case 1: return Promise.reject(canceled());
435-
case 2: return this.userDataSyncService.pull();
436-
// case 3: return this.userDataSyncService.push();
437-
case 3: return this.notificationService.info('Upload: Not yet supported');
425+
if (result.confirmed) {
426+
await this.userDataSyncService.pull();
438427
}
439428
}
440429
}

0 commit comments

Comments
 (0)