mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 6fded8a497cd0142de3a1c607649a5423a091a25
This commit is contained in:
@@ -251,7 +251,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
return new Promise((resolve, _) => {
|
||||
const quickPick = this.quickInputService.createQuickPick<{ label: string, session: AuthenticationSession }>();
|
||||
quickPick.title = localize('chooseAccountTitle', "Preferences Sync: Choose Account");
|
||||
quickPick.placeholder = localize('chooseAccount', "Choose an account you would like to use for settings sync");
|
||||
quickPick.placeholder = localize('chooseAccount', "Choose an account you would like to use for preferences sync");
|
||||
const dedupedSessions = distinct(sessions, (session) => session.accountName);
|
||||
quickPick.items = dedupedSessions.map(session => {
|
||||
return {
|
||||
@@ -287,10 +287,16 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
if (this.activeAccount) {
|
||||
if (event.removed.length) {
|
||||
const activeWasRemoved = !!event.removed.find(removed => removed === this.activeAccount!.id);
|
||||
// If the current account was removed, offer to turn off sync
|
||||
if (activeWasRemoved) {
|
||||
await this.turnOff();
|
||||
this.setActiveAccount(undefined);
|
||||
this.notificationService.notify({
|
||||
severity: Severity.Info,
|
||||
message: localize('turned off on logout', "Sync has stopped because you are no longer signed in."),
|
||||
actions: {
|
||||
primary: [new Action('turn on sync', localize('turn on sync', "Turn on Sync"), undefined, true, () => this.turnOn())]
|
||||
}
|
||||
});
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -683,7 +689,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
|
||||
}
|
||||
await this.handleFirstTimeSync();
|
||||
this.userDataSyncEnablementService.setEnablement(true);
|
||||
this.notificationService.info(localize('sync turned on', "Sync will happen automatically from now on."));
|
||||
this.notificationService.info(localize('sync turned on', "Preferences sync is turned on"));
|
||||
this.storageService.store('sync.donotAskPreviewConfirmation', true, StorageScope.GLOBAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { FolderThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
import { fromNow } from 'vs/base/common/date';
|
||||
import { pad } from 'vs/base/common/strings';
|
||||
import { pad, uppercaseFirstLetter } from 'vs/base/common/strings';
|
||||
import { ViewPaneContainer } from 'vs/workbench/browser/parts/views/viewPaneContainer';
|
||||
|
||||
export class UserDataSyncViewContribution implements IWorkbenchContribution {
|
||||
@@ -101,7 +101,7 @@ export class UserDataSyncViewContribution implements IWorkbenchContribution {
|
||||
constructor() {
|
||||
super({
|
||||
id: `workbench.actions.sync.resolveResource`,
|
||||
title: localize('workbench.actions.sync.resolveResourceRef', "Show full content"),
|
||||
title: localize('workbench.actions.sync.resolveResourceRef', "Show raw JSON sync data"),
|
||||
menu: {
|
||||
id: MenuId.ViewItemContext,
|
||||
when: ContextKeyExpr.and(ContextKeyEqualsExpr.create('view', viewId), ContextKeyExpr.regex('viewItem', /sync-resource-.*/i))
|
||||
@@ -156,7 +156,7 @@ class UserDataSyncHistoryViewDataProvider implements ITreeViewDataProvider {
|
||||
return ALL_SYNC_RESOURCES.map(resourceKey => ({
|
||||
handle: resourceKey,
|
||||
collapsibleState: TreeItemCollapsibleState.Collapsed,
|
||||
label: { label: resourceKey },
|
||||
label: { label: uppercaseFirstLetter(resourceKey) },
|
||||
themeIcon: FolderThemeIcon,
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user