mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 1ec43773e37997841c5af42b33ddb180e9735bf2
This commit is contained in:
@@ -52,7 +52,6 @@ import { fromNow } from 'vs/base/common/date';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { timeout } from 'vs/base/common/async';
|
||||
import { distinct } from 'vs/base/common/arrays';
|
||||
|
||||
const enum AuthStatus {
|
||||
@@ -605,7 +604,17 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
case 0: this.openerService.open(URI.parse('https://aka.ms/vscode-settings-sync-help')); return;
|
||||
case 2: return;
|
||||
}
|
||||
} else if (skipAccountPick) {
|
||||
const result = await this.dialogService.confirm({
|
||||
type: 'info',
|
||||
message: localize('turn on sync confirmation', "Do you want to turn on preferences sync?"),
|
||||
primaryButton: localize('turn on', "Turn On")
|
||||
});
|
||||
if (!result.confirmed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise((c, e) => {
|
||||
const disposables: DisposableStore = new DisposableStore();
|
||||
const quickPick = this.quickInputService.createQuickPick<ConfigureSyncQuickPickItem>();
|
||||
@@ -890,7 +899,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
group: '5_sync',
|
||||
command: {
|
||||
id: turnOnSyncCommand.id,
|
||||
title: localize('global activity turn on sync', "Preferences Sync: Turn on...")
|
||||
title: localize('global activity turn on sync', "Turn on Preferences Sync...")
|
||||
},
|
||||
when: turnOnSyncWhenContext,
|
||||
order: 1
|
||||
@@ -903,7 +912,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
group: '5_sync',
|
||||
command: {
|
||||
id: turnOnSyncCommand.id,
|
||||
title: localize('global activity turn on sync', "Preferences Sync: Turn on...")
|
||||
title: localize('global activity turn on sync', "Turn on Preferences Sync...")
|
||||
},
|
||||
when: turnOnSyncWhenContext,
|
||||
});
|
||||
@@ -1025,7 +1034,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.userData.actions.syncStatus',
|
||||
title: localize('sync is on', "Preferences Sync: On"),
|
||||
title: localize('sync is on', "Preferences sync is on"),
|
||||
menu: [
|
||||
{
|
||||
id: MenuId.GlobalActivity,
|
||||
@@ -1074,8 +1083,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
quickPick.items = items;
|
||||
disposables.add(quickPick.onDidAccept(() => {
|
||||
if (quickPick.selectedItems[0] && quickPick.selectedItems[0].id) {
|
||||
// Introduce timeout as workaround - #91661 #91740
|
||||
timeout(0).then(() => commandService.executeCommand(quickPick.selectedItems[0].id!));
|
||||
commandService.executeCommand(quickPick.selectedItems[0].id);
|
||||
}
|
||||
quickPick.hide();
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user