@codingame/monaco-vscode-user-data-sync-service-override 10.1.4 → 11.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -3
- package/vscode/src/vs/platform/userDataSync/common/userDataAutoSyncService.js +7 -7
- package/vscode/src/vs/platform/userDataSync/common/userDataProfilesManifestMerge.js +1 -2
- package/vscode/src/vs/platform/userDataSync/common/userDataProfilesManifestSync.js +4 -10
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncLog.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncResourceProvider.js +7 -7
- package/vscode/src/vs/platform/userDataSync/common/userDataSyncService.js +30 -32
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSync.js +97 -104
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView.js +8 -8
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.js +30 -30
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.js +39 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-user-data-sync-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
30
|
-
"@codingame/monaco-vscode-user-data-profile-service-override": "
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@11.0.1",
|
|
30
|
+
"@codingame/monaco-vscode-user-data-profile-service-override": "11.0.1",
|
|
31
|
+
"@codingame/monaco-vscode-user-data-profile-user-data-sync-common": "11.0.1"
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -407,20 +407,20 @@ class AutoSync extends Disposable {
|
|
|
407
407
|
if (this.hasSyncServiceChanged()) {
|
|
408
408
|
if (await this.hasDefaultServiceChanged()) {
|
|
409
409
|
throw ( new UserDataAutoSyncError(
|
|
410
|
-
localize(
|
|
410
|
+
localize(3496, "Cannot sync because default service has changed"),
|
|
411
411
|
"DefaultServiceChanged"
|
|
412
412
|
));
|
|
413
413
|
}
|
|
414
414
|
else {
|
|
415
415
|
throw ( new UserDataAutoSyncError(
|
|
416
|
-
localize(
|
|
416
|
+
localize(3497, "Cannot sync because sync service has changed"),
|
|
417
417
|
"ServiceChanged"
|
|
418
418
|
));
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
else {
|
|
422
422
|
throw ( new UserDataAutoSyncError(
|
|
423
|
-
localize(
|
|
423
|
+
localize(3498, "Cannot sync because syncing is turned off in the cloud"),
|
|
424
424
|
"TurnedOff"
|
|
425
425
|
));
|
|
426
426
|
}
|
|
@@ -430,20 +430,20 @@ class AutoSync extends Disposable {
|
|
|
430
430
|
if (this.hasSyncServiceChanged()) {
|
|
431
431
|
if (await this.hasDefaultServiceChanged()) {
|
|
432
432
|
throw ( new UserDataAutoSyncError(
|
|
433
|
-
localize(
|
|
433
|
+
localize(3496, "Cannot sync because default service has changed"),
|
|
434
434
|
"DefaultServiceChanged"
|
|
435
435
|
));
|
|
436
436
|
}
|
|
437
437
|
else {
|
|
438
438
|
throw ( new UserDataAutoSyncError(
|
|
439
|
-
localize(
|
|
439
|
+
localize(3497, "Cannot sync because sync service has changed"),
|
|
440
440
|
"ServiceChanged"
|
|
441
441
|
));
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
else {
|
|
445
445
|
throw ( new UserDataAutoSyncError(
|
|
446
|
-
localize(
|
|
446
|
+
localize(3499, "Cannot sync because current session is expired"),
|
|
447
447
|
"SessionExpired"
|
|
448
448
|
));
|
|
449
449
|
}
|
|
@@ -455,7 +455,7 @@ class AutoSync extends Disposable {
|
|
|
455
455
|
const currentMachine = machines.find(machine => machine.isCurrent);
|
|
456
456
|
if (currentMachine?.disabled) {
|
|
457
457
|
throw ( new UserDataAutoSyncError(localize(
|
|
458
|
-
|
|
458
|
+
3500,
|
|
459
459
|
"Cannot sync because syncing is turned off on this machine from another machine."
|
|
460
460
|
), "TurnedOff" ));
|
|
461
461
|
}
|
|
@@ -73,14 +73,13 @@ function compare(from, to, ignoredProfiles) {
|
|
|
73
73
|
const added = toKeys.filter(key => !fromKeys.includes(key));
|
|
74
74
|
const removed = fromKeys.filter(key => !toKeys.includes(key));
|
|
75
75
|
const updated = [];
|
|
76
|
-
for (const { id, name,
|
|
76
|
+
for (const { id, name, icon, useDefaultFlags } of from) {
|
|
77
77
|
if (removed.includes(id)) {
|
|
78
78
|
continue;
|
|
79
79
|
}
|
|
80
80
|
const toProfile = to.find(p => p.id === id);
|
|
81
81
|
if (!toProfile
|
|
82
82
|
|| toProfile.name !== name
|
|
83
|
-
|| toProfile.shortName !== shortName
|
|
84
83
|
|| toProfile.icon !== icon
|
|
85
84
|
|| !equals(toProfile.useDefaultFlags, useDefaultFlags)) {
|
|
86
85
|
updated.push(id);
|
|
@@ -34,12 +34,6 @@ let UserDataProfilesManifestSynchroniser = class UserDataProfilesManifestSynchro
|
|
|
34
34
|
return remoteUserData?.syncData ? parseUserDataProfilesManifest(remoteUserData.syncData) : null;
|
|
35
35
|
}
|
|
36
36
|
async generateSyncPreview(remoteUserData, lastSyncUserData, isRemoteDataFromCurrentMachine) {
|
|
37
|
-
if (!this.userDataProfilesService.isEnabled()) {
|
|
38
|
-
throw ( new UserDataSyncError(
|
|
39
|
-
'Cannot sync profiles because they are disabled',
|
|
40
|
-
"LocalError"
|
|
41
|
-
));
|
|
42
|
-
}
|
|
43
37
|
const remoteProfiles = remoteUserData.syncData ? parseUserDataProfilesManifest(remoteUserData.syncData) : null;
|
|
44
38
|
const lastSyncProfiles = lastSyncUserData?.syncData ? parseUserDataProfilesManifest(lastSyncUserData.syncData) : null;
|
|
45
39
|
const localProfiles = this.getLocalUserDataProfiles();
|
|
@@ -152,14 +146,14 @@ let UserDataProfilesManifestSynchroniser = class UserDataProfilesManifestSynchro
|
|
|
152
146
|
})));
|
|
153
147
|
await Promise.all(( local.added.map(async (profile) => {
|
|
154
148
|
this.logService.trace(`${this.syncResourceLogLabel}: Creating '${profile.name}' profile...`);
|
|
155
|
-
await this.userDataProfilesService.createProfile(profile.id, profile.name, {
|
|
149
|
+
await this.userDataProfilesService.createProfile(profile.id, profile.name, { icon: profile.icon, useDefaultFlags: profile.useDefaultFlags });
|
|
156
150
|
this.logService.info(`${this.syncResourceLogLabel}: Created profile '${profile.name}'.`);
|
|
157
151
|
})));
|
|
158
152
|
await Promise.all(( local.updated.map(async (profile) => {
|
|
159
153
|
const localProfile = this.userDataProfilesService.profiles.find(p => p.id === profile.id);
|
|
160
154
|
if (localProfile) {
|
|
161
155
|
this.logService.trace(`${this.syncResourceLogLabel}: Updating '${profile.name}' profile...`);
|
|
162
|
-
await this.userDataProfilesService.updateProfile(localProfile, { name: profile.name,
|
|
156
|
+
await this.userDataProfilesService.updateProfile(localProfile, { name: profile.name, icon: profile.icon, useDefaultFlags: profile.useDefaultFlags });
|
|
163
157
|
this.logService.info(`${this.syncResourceLogLabel}: Updated profile '${profile.name}'.`);
|
|
164
158
|
}
|
|
165
159
|
else {
|
|
@@ -175,7 +169,7 @@ let UserDataProfilesManifestSynchroniser = class UserDataProfilesManifestSynchro
|
|
|
175
169
|
for (const profile of remote?.added || []) {
|
|
176
170
|
const collection = await this.userDataSyncStoreService.createCollection(this.syncHeaders);
|
|
177
171
|
addedCollections.push(collection);
|
|
178
|
-
remoteProfiles.push({ id: profile.id, name: profile.name, collection,
|
|
172
|
+
remoteProfiles.push({ id: profile.id, name: profile.name, collection, icon: profile.icon, useDefaultFlags: profile.useDefaultFlags });
|
|
179
173
|
}
|
|
180
174
|
}
|
|
181
175
|
else {
|
|
@@ -187,7 +181,7 @@ let UserDataProfilesManifestSynchroniser = class UserDataProfilesManifestSynchro
|
|
|
187
181
|
for (const profile of remote?.updated || []) {
|
|
188
182
|
const profileToBeUpdated = remoteProfiles.find(({ id }) => profile.id === id);
|
|
189
183
|
if (profileToBeUpdated) {
|
|
190
|
-
remoteProfiles.splice(remoteProfiles.indexOf(profileToBeUpdated), 1, { ...profileToBeUpdated, id: profile.id, name: profile.name,
|
|
184
|
+
remoteProfiles.splice(remoteProfiles.indexOf(profileToBeUpdated), 1, { ...profileToBeUpdated, id: profile.id, name: profile.name, icon: profile.icon, useDefaultFlags: profile.useDefaultFlags });
|
|
191
185
|
}
|
|
192
186
|
}
|
|
193
187
|
try {
|
|
@@ -9,7 +9,7 @@ import { USER_DATA_SYNC_LOG_ID } from 'vscode/vscode/vs/platform/userDataSync/co
|
|
|
9
9
|
let UserDataSyncLogService = class UserDataSyncLogService extends AbstractLogger {
|
|
10
10
|
constructor(loggerService, environmentService) {
|
|
11
11
|
super();
|
|
12
|
-
this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${USER_DATA_SYNC_LOG_ID}.log`), { id: USER_DATA_SYNC_LOG_ID, name: ( localize(
|
|
12
|
+
this.logger = this._register(loggerService.createLogger(joinPath(environmentService.logsHome, `${USER_DATA_SYNC_LOG_ID}.log`), { id: USER_DATA_SYNC_LOG_ID, name: ( localize(3501, "Settings Sync")) }));
|
|
13
13
|
}
|
|
14
14
|
trace(message, ...args) {
|
|
15
15
|
this.logger.trace(message, ...args);
|
|
@@ -10,13 +10,13 @@ import { CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM, USER_DATA_SYNC_SCHEME, UserDataSy
|
|
|
10
10
|
import { IUserDataSyncStoreService, IUserDataSyncLocalStoreService, IUserDataSyncLogService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
11
11
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
12
12
|
import { isSyncData } from 'vscode/vscode/vs/platform/userDataSync/common/abstractSynchronizer';
|
|
13
|
-
import { parseSnippets } from '@codingame/monaco-vscode-user-data-profile-
|
|
14
|
-
import { parseSettingsSyncContent } from '@codingame/monaco-vscode-user-data-profile-
|
|
15
|
-
import { getKeybindingsContentFromSyncContent } from '@codingame/monaco-vscode-user-data-profile-
|
|
13
|
+
import { parseSnippets } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/snippetsSync';
|
|
14
|
+
import { parseSettingsSyncContent } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/settingsSync';
|
|
15
|
+
import { getKeybindingsContentFromSyncContent } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/keybindingsSync';
|
|
16
16
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
17
|
-
import { getTasksContentFromSyncContent } from '@codingame/monaco-vscode-user-data-profile-
|
|
18
|
-
import { stringify, parseExtensions, LocalExtensionsProvider } from '@codingame/monaco-vscode-user-data-profile-
|
|
19
|
-
import { stringify as stringify$1, LocalGlobalStateProvider } from '@codingame/monaco-vscode-user-data-profile-
|
|
17
|
+
import { getTasksContentFromSyncContent } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/tasksSync';
|
|
18
|
+
import { stringify, parseExtensions, LocalExtensionsProvider } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/extensionsSync';
|
|
19
|
+
import { stringify as stringify$1, LocalGlobalStateProvider } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/globalStateSync';
|
|
20
20
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
21
21
|
import { parseUserDataProfilesManifest, stringifyLocalProfiles } from './userDataProfilesManifestSync.js';
|
|
22
22
|
import { toFormattedString } from 'vscode/vscode/vs/base/common/jsonFormatter';
|
|
@@ -428,7 +428,7 @@ let UserDataSyncResourceProviderService = class UserDataSyncResourceProviderServ
|
|
|
428
428
|
this.logService.error(error);
|
|
429
429
|
}
|
|
430
430
|
throw ( new UserDataSyncError(localize(
|
|
431
|
-
|
|
431
|
+
3502,
|
|
432
432
|
"Cannot parse sync data as it is not compatible with the current version."
|
|
433
433
|
), "IncompatibleRemoteContent" , syncResource));
|
|
434
434
|
}
|
|
@@ -15,12 +15,12 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
|
|
|
15
15
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
16
16
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
17
17
|
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
18
|
-
import { ExtensionsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-
|
|
19
|
-
import { GlobalStateSynchroniser } from '@codingame/monaco-vscode-user-data-profile-
|
|
20
|
-
import { KeybindingsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-
|
|
21
|
-
import { SettingsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-
|
|
22
|
-
import { SnippetsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-
|
|
23
|
-
import { TasksSynchroniser } from '@codingame/monaco-vscode-user-data-profile-
|
|
18
|
+
import { ExtensionsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/extensionsSync';
|
|
19
|
+
import { GlobalStateSynchroniser } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/globalStateSync';
|
|
20
|
+
import { KeybindingsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/keybindingsSync';
|
|
21
|
+
import { SettingsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/settingsSync';
|
|
22
|
+
import { SnippetsSynchroniser } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/snippetsSync';
|
|
23
|
+
import { TasksSynchroniser } from '@codingame/monaco-vscode-user-data-profile-user-data-sync-common/vscode/vs/platform/userDataSync/common/tasksSync';
|
|
24
24
|
import { UserDataProfilesManifestSynchroniser } from './userDataProfilesManifestSync.js';
|
|
25
25
|
import { createSyncHeaders, UserDataSyncError, ALL_SYNC_RESOURCES, USER_DATA_SYNC_CONFIGURATION_SCOPE, UserDataSyncStoreError } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync';
|
|
26
26
|
import { IUserDataSyncStoreService, IUserDataSyncStoreManagementService, IUserDataSyncLogService, IUserDataSyncEnablementService, IUserDataSyncResourceProviderService, IUserDataSyncLocalStoreService } from 'vscode/vscode/vs/platform/userDataSync/common/userDataSync.service';
|
|
@@ -208,25 +208,31 @@ let UserDataSyncService = class UserDataSyncService extends Disposable {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
async applyManualSync(manifest, executionId, token) {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
try {
|
|
212
|
+
this.setStatus("syncing" );
|
|
213
|
+
const profileSynchronizers = this.getActiveProfileSynchronizers();
|
|
214
|
+
for (const profileSynchronizer of profileSynchronizers) {
|
|
215
|
+
if (token.isCancellationRequested) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
await profileSynchronizer.apply(executionId, token);
|
|
219
|
+
}
|
|
220
|
+
const defaultProfileSynchronizer = profileSynchronizers.find(s => s.profile.isDefault);
|
|
221
|
+
if (!defaultProfileSynchronizer) {
|
|
214
222
|
return;
|
|
215
223
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
const userDataProfileManifestSynchronizer = defaultProfileSynchronizer.enabled.find(s => s.resource === "profiles" );
|
|
225
|
+
if (!userDataProfileManifestSynchronizer) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const remoteProfiles = (await userDataProfileManifestSynchronizer.getRemoteSyncedProfiles(manifest?.latest ?? null)) || [];
|
|
229
|
+
const remoteProfilesToSync = remoteProfiles.filter(remoteProfile => profileSynchronizers.every(s => s.profile.id !== remoteProfile.id));
|
|
230
|
+
if (remoteProfilesToSync.length) {
|
|
231
|
+
await this.syncRemoteProfiles(remoteProfilesToSync, manifest, false, executionId, token);
|
|
232
|
+
}
|
|
225
233
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (remoteProfilesToSync.length) {
|
|
229
|
-
await this.syncRemoteProfiles(remoteProfilesToSync, manifest, false, executionId, token);
|
|
234
|
+
finally {
|
|
235
|
+
this.setStatus("idle" );
|
|
230
236
|
}
|
|
231
237
|
}
|
|
232
238
|
async syncProfile(profileSynchronizer, manifest, merge, executionId, token) {
|
|
@@ -441,9 +447,6 @@ let UserDataSyncService = class UserDataSyncService extends Disposable {
|
|
|
441
447
|
const result = await this.performActionWithProfileSynchronizer(defaultProfileSynchronizer, action, disposables);
|
|
442
448
|
return isUndefined(result) ? null : result;
|
|
443
449
|
}
|
|
444
|
-
if (this.userDataProfilesService.isEnabled()) {
|
|
445
|
-
return null;
|
|
446
|
-
}
|
|
447
450
|
const userDataProfileManifestSynchronizer = disposables.add(this.instantiationService.createInstance(UserDataProfilesManifestSynchroniser, profile, undefined));
|
|
448
451
|
const manifest = await this.userDataSyncStoreService.manifest(null);
|
|
449
452
|
const syncProfiles = (await userDataProfileManifestSynchronizer.getRemoteSyncedProfiles(manifest?.latest ?? null)) || [];
|
|
@@ -551,7 +554,7 @@ let ProfileSynchronizer = class ProfileSynchronizer extends Disposable {
|
|
|
551
554
|
get disabled() { return ALL_SYNC_RESOURCES.filter(syncResource => !this.userDataSyncEnablementService.isResourceEnabled(syncResource)); }
|
|
552
555
|
get status() { return this._status; }
|
|
553
556
|
get conflicts() { return this._conflicts; }
|
|
554
|
-
constructor(profile, collection, userDataSyncEnablementService, instantiationService, extensionGalleryService, userDataSyncStoreManagementService, telemetryService, logService,
|
|
557
|
+
constructor(profile, collection, userDataSyncEnablementService, instantiationService, extensionGalleryService, userDataSyncStoreManagementService, telemetryService, logService, configurationService) {
|
|
555
558
|
super();
|
|
556
559
|
this.profile = profile;
|
|
557
560
|
this.collection = collection;
|
|
@@ -561,7 +564,6 @@ let ProfileSynchronizer = class ProfileSynchronizer extends Disposable {
|
|
|
561
564
|
this.userDataSyncStoreManagementService = userDataSyncStoreManagementService;
|
|
562
565
|
this.telemetryService = telemetryService;
|
|
563
566
|
this.logService = logService;
|
|
564
|
-
this.userDataProfilesService = userDataProfilesService;
|
|
565
567
|
this.configurationService = configurationService;
|
|
566
568
|
this._enabled = [];
|
|
567
569
|
this._status = "idle" ;
|
|
@@ -600,9 +602,6 @@ let ProfileSynchronizer = class ProfileSynchronizer extends Disposable {
|
|
|
600
602
|
if (!this.profile.isDefault) {
|
|
601
603
|
return;
|
|
602
604
|
}
|
|
603
|
-
if (!this.userDataProfilesService.isEnabled()) {
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
605
|
}
|
|
607
606
|
if (syncResource === "workspaceState" ) {
|
|
608
607
|
return;
|
|
@@ -791,8 +790,7 @@ ProfileSynchronizer = ( __decorate([
|
|
|
791
790
|
( __param(5, IUserDataSyncStoreManagementService)),
|
|
792
791
|
( __param(6, ITelemetryService)),
|
|
793
792
|
( __param(7, IUserDataSyncLogService)),
|
|
794
|
-
( __param(8,
|
|
795
|
-
( __param(9, IConfigurationService))
|
|
793
|
+
( __param(8, IConfigurationService))
|
|
796
794
|
], ProfileSynchronizer));
|
|
797
795
|
function canBailout(e) {
|
|
798
796
|
if (e instanceof UserDataSyncError) {
|
|
@@ -29,12 +29,12 @@ let UserDataSyncReportIssueContribution = class UserDataSyncReportIssueContribut
|
|
|
29
29
|
switch (error.code) {
|
|
30
30
|
case "LocalTooManyRequests" : {
|
|
31
31
|
const message = isWeb ? ( localize(
|
|
32
|
-
|
|
32
|
+
3528,
|
|
33
33
|
"Settings sync is suspended temporarily because the current device is making too many requests. Please reload {0} to resume.",
|
|
34
34
|
this.productService.nameLong
|
|
35
35
|
))
|
|
36
36
|
: ( localize(
|
|
37
|
-
|
|
37
|
+
3529,
|
|
38
38
|
"Settings sync is suspended temporarily because the current device is making too many requests. Please restart {0} to resume.",
|
|
39
39
|
this.productService.nameLong
|
|
40
40
|
));
|
|
@@ -43,26 +43,26 @@ let UserDataSyncReportIssueContribution = class UserDataSyncReportIssueContribut
|
|
|
43
43
|
message,
|
|
44
44
|
actions: {
|
|
45
45
|
primary: [
|
|
46
|
-
( (new Action('Show Sync Logs', ( localize(
|
|
47
|
-
( (new Action('Restart', isWeb ? ( localize(
|
|
46
|
+
( (new Action('Show Sync Logs', ( localize(3530, "Show Log")), undefined, true, () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)))),
|
|
47
|
+
( (new Action('Restart', isWeb ? ( localize(3531, "Reload")) : ( localize(3532, "Restart")), undefined, true, () => this.hostService.restart())))
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
case "RemoteTooManyRequests" : {
|
|
54
|
-
const operationId = error.operationId ? ( localize(
|
|
54
|
+
const operationId = error.operationId ? ( localize(3533, "Operation Id: {0}", error.operationId)) : undefined;
|
|
55
55
|
const message = ( localize(
|
|
56
|
-
|
|
56
|
+
3534,
|
|
57
57
|
"Settings sync is disabled because the current device is making too many requests. Please wait for 10 minutes and turn on sync."
|
|
58
58
|
));
|
|
59
59
|
this.notificationService.notify({
|
|
60
60
|
severity: Severity$1.Error,
|
|
61
61
|
message: operationId ? `${message} ${operationId}` : message,
|
|
62
|
-
source: error.operationId ? ( localize(
|
|
62
|
+
source: error.operationId ? ( localize(3535, "Settings Sync. Operation Id: {0}", error.operationId)) : undefined,
|
|
63
63
|
actions: {
|
|
64
64
|
primary: [
|
|
65
|
-
( (new Action('Show Sync Logs', ( localize(
|
|
65
|
+
( (new Action('Show Sync Logs', ( localize(3530, "Show Log")), undefined, true, () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)))),
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
});
|