@codingame/monaco-vscode-user-data-sync-service-override 23.0.2 → 23.0.4
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 +14 -14
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSync.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSync.js +77 -77
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView.js +8 -8
- package/vscode/src/vs/workbench/contrib/userDataSync/browser/userDataSyncViews.js +32 -32
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.js +27 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-user-data-sync-service-override",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - user-data-sync service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-05c09f77-cd1d-5960-b387-e7023df3160b-common": "23.0.
|
|
19
|
-
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "23.0.
|
|
20
|
-
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "23.0.
|
|
21
|
-
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.
|
|
22
|
-
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "23.0.
|
|
23
|
-
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.0.
|
|
24
|
-
"@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common": "23.0.
|
|
25
|
-
"@codingame/monaco-vscode-a022e9a8-b522-5ea2-97c7-f3dda2b0b597-common": "23.0.
|
|
26
|
-
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "23.0.
|
|
27
|
-
"@codingame/monaco-vscode-api": "23.0.
|
|
28
|
-
"@codingame/monaco-vscode-dd5b2d07-86ca-557c-8510-224a400e258d-common": "23.0.
|
|
29
|
-
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "23.0.
|
|
30
|
-
"@codingame/monaco-vscode-user-data-profile-service-override": "23.0.
|
|
18
|
+
"@codingame/monaco-vscode-05c09f77-cd1d-5960-b387-e7023df3160b-common": "23.0.4",
|
|
19
|
+
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "23.0.4",
|
|
20
|
+
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "23.0.4",
|
|
21
|
+
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.4",
|
|
22
|
+
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "23.0.4",
|
|
23
|
+
"@codingame/monaco-vscode-4bf376c2-03c7-58cb-8303-c67aeefa3d3d-common": "23.0.4",
|
|
24
|
+
"@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common": "23.0.4",
|
|
25
|
+
"@codingame/monaco-vscode-a022e9a8-b522-5ea2-97c7-f3dda2b0b597-common": "23.0.4",
|
|
26
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "23.0.4",
|
|
27
|
+
"@codingame/monaco-vscode-api": "23.0.4",
|
|
28
|
+
"@codingame/monaco-vscode-dd5b2d07-86ca-557c-8510-224a400e258d-common": "23.0.4",
|
|
29
|
+
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "23.0.4",
|
|
30
|
+
"@codingame/monaco-vscode-user-data-profile-service-override": "23.0.4"
|
|
31
31
|
},
|
|
32
32
|
"main": "index.js",
|
|
33
33
|
"module": "index.js",
|
|
@@ -32,12 +32,12 @@ let UserDataSyncReportIssueContribution = class UserDataSyncReportIssueContribut
|
|
|
32
32
|
switch (error.code) {
|
|
33
33
|
case UserDataSyncErrorCode.LocalTooManyRequests: {
|
|
34
34
|
const message = isWeb ? ( localize(
|
|
35
|
-
|
|
35
|
+
12830,
|
|
36
36
|
"Settings sync is suspended temporarily because the current device is making too many requests. Please reload {0} to resume.",
|
|
37
37
|
this.productService.nameLong
|
|
38
38
|
))
|
|
39
39
|
: ( localize(
|
|
40
|
-
|
|
40
|
+
12831,
|
|
41
41
|
"Settings sync is suspended temporarily because the current device is making too many requests. Please restart {0} to resume.",
|
|
42
42
|
this.productService.nameLong
|
|
43
43
|
));
|
|
@@ -48,12 +48,12 @@ let UserDataSyncReportIssueContribution = class UserDataSyncReportIssueContribut
|
|
|
48
48
|
primary: [
|
|
49
49
|
toAction({
|
|
50
50
|
id: 'Show Sync Logs',
|
|
51
|
-
label: ( localize(
|
|
51
|
+
label: ( localize(12832, "Show Log")),
|
|
52
52
|
run: () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)
|
|
53
53
|
}),
|
|
54
54
|
toAction({
|
|
55
55
|
id: 'Restart',
|
|
56
|
-
label: isWeb ? ( localize(
|
|
56
|
+
label: isWeb ? ( localize(12833, "Reload")) : ( localize(12834, "Restart")),
|
|
57
57
|
run: () => this.hostService.restart()
|
|
58
58
|
})
|
|
59
59
|
]
|
|
@@ -62,20 +62,20 @@ let UserDataSyncReportIssueContribution = class UserDataSyncReportIssueContribut
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
case UserDataSyncErrorCode.TooManyRequests: {
|
|
65
|
-
const operationId = error.operationId ? ( localize(
|
|
65
|
+
const operationId = error.operationId ? ( localize(12835, "Operation Id: {0}", error.operationId)) : undefined;
|
|
66
66
|
const message = ( localize(
|
|
67
|
-
|
|
67
|
+
12836,
|
|
68
68
|
"Settings sync is disabled because the current device is making too many requests. Please wait for 10 minutes and turn on sync."
|
|
69
69
|
));
|
|
70
70
|
this.notificationService.notify({
|
|
71
71
|
severity: Severity.Error,
|
|
72
72
|
message: operationId ? `${message} ${operationId}` : message,
|
|
73
|
-
source: error.operationId ? ( localize(
|
|
73
|
+
source: error.operationId ? ( localize(12837, "Settings Sync. Operation Id: {0}", error.operationId)) : undefined,
|
|
74
74
|
actions: {
|
|
75
75
|
primary: [
|
|
76
76
|
toAction({
|
|
77
77
|
id: 'Show Sync Logs',
|
|
78
|
-
label: ( localize(
|
|
78
|
+
label: ( localize(12832, "Show Log")),
|
|
79
79
|
run: () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)
|
|
80
80
|
})
|
|
81
81
|
]
|
|
@@ -49,24 +49,24 @@ import { IUserDataProfileService } from '@codingame/monaco-vscode-api/vscode/vs/
|
|
|
49
49
|
import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
50
50
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
51
51
|
|
|
52
|
-
const turnOffSyncCommand = { id: 'workbench.userDataSync.actions.turnOff', title: ( localize2(
|
|
53
|
-
const configureSyncCommand = { id: CONFIGURE_SYNC_COMMAND_ID, title: ( localize2(
|
|
52
|
+
const turnOffSyncCommand = { id: 'workbench.userDataSync.actions.turnOff', title: ( localize2(12838, 'Turn Off')) };
|
|
53
|
+
const configureSyncCommand = { id: CONFIGURE_SYNC_COMMAND_ID, title: ( localize2(12839, 'Configure...')) };
|
|
54
54
|
const showConflictsCommandId = 'workbench.userDataSync.actions.showConflicts';
|
|
55
55
|
const syncNowCommand = {
|
|
56
56
|
id: 'workbench.userDataSync.actions.syncNow',
|
|
57
|
-
title: ( localize2(
|
|
57
|
+
title: ( localize2(12840, 'Sync Now')),
|
|
58
58
|
description(userDataSyncService) {
|
|
59
59
|
if (userDataSyncService.status === SyncStatus.Syncing) {
|
|
60
|
-
return localize(
|
|
60
|
+
return localize(12841, "syncing");
|
|
61
61
|
}
|
|
62
62
|
if (userDataSyncService.lastSyncTime) {
|
|
63
|
-
return localize(
|
|
63
|
+
return localize(12842, "synced {0}", fromNow(userDataSyncService.lastSyncTime, true));
|
|
64
64
|
}
|
|
65
65
|
return undefined;
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
const showSyncSettingsCommand = { id: 'workbench.userDataSync.actions.settings', title: ( localize2(
|
|
69
|
-
const showSyncedDataCommand = { id: 'workbench.userDataSync.actions.showSyncedData', title: ( localize2(
|
|
68
|
+
const showSyncSettingsCommand = { id: 'workbench.userDataSync.actions.settings', title: ( localize2(12843, 'Show Settings')), };
|
|
69
|
+
const showSyncedDataCommand = { id: 'workbench.userDataSync.actions.showSyncedData', title: ( localize2(12844, 'Show Synced Data')), };
|
|
70
70
|
const CONTEXT_TURNING_ON_STATE = ( new RawContextKey('userDataSyncTurningOn', false));
|
|
71
71
|
let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution extends Disposable {
|
|
72
72
|
constructor(userDataSyncEnablementService, userDataSyncService, userDataSyncWorkbenchService, contextKeyService, activityService, notificationService, editorService, userDataProfileService, dialogService, quickInputService, instantiationService, outputService, userDataAutoSyncService, textModelResolverService, preferencesService, telemetryService, productService, openerService, authenticationService, userDataSyncStoreManagementService, hostService, commandService, workbenchIssueService) {
|
|
@@ -144,24 +144,24 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
144
144
|
if (!( this.conflictsDisposables.has(key))) {
|
|
145
145
|
const conflictsArea = getSyncAreaLabel(conflict.syncResource);
|
|
146
146
|
const handle = this.notificationService.prompt(Severity.Warning, ( localize(
|
|
147
|
-
|
|
147
|
+
12845,
|
|
148
148
|
"Unable to sync due to conflicts in {0}. Please resolve them to continue.",
|
|
149
149
|
conflictsArea.toLowerCase()
|
|
150
150
|
)), [
|
|
151
151
|
{
|
|
152
|
-
label: ( localize(
|
|
152
|
+
label: ( localize(12846, "Replace Remote")),
|
|
153
153
|
run: () => {
|
|
154
154
|
this.acceptLocal(conflict, conflict.conflicts[0]);
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
|
-
label: ( localize(
|
|
158
|
+
label: ( localize(12847, "Replace Local")),
|
|
159
159
|
run: () => {
|
|
160
160
|
this.acceptRemote(conflict, conflict.conflicts[0]);
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
|
-
label: ( localize(
|
|
164
|
+
label: ( localize(12848, "Show Conflicts")),
|
|
165
165
|
run: () => {
|
|
166
166
|
this.telemetryService.publicLog2('sync/showConflicts', { source: conflict.syncResource });
|
|
167
167
|
this.userDataSyncWorkbenchService.showConflicts(conflict.conflicts[0]);
|
|
@@ -188,7 +188,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
188
188
|
}
|
|
189
189
|
catch (e) {
|
|
190
190
|
this.notificationService.error(( localize(
|
|
191
|
-
|
|
191
|
+
12849,
|
|
192
192
|
"Error while accepting changes. Please check [logs]({0}) for more details.",
|
|
193
193
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
194
194
|
)));
|
|
@@ -200,7 +200,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
200
200
|
}
|
|
201
201
|
catch (e) {
|
|
202
202
|
this.notificationService.error(( localize(
|
|
203
|
-
|
|
203
|
+
12849,
|
|
204
204
|
"Error while accepting changes. Please check [logs]({0}) for more details.",
|
|
205
205
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
206
206
|
)));
|
|
@@ -212,13 +212,13 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
212
212
|
this.notificationService.notify({
|
|
213
213
|
severity: Severity.Info,
|
|
214
214
|
message: ( localize(
|
|
215
|
-
|
|
215
|
+
12850,
|
|
216
216
|
"Settings sync was turned off because current session is expired, please sign in again to turn on sync."
|
|
217
217
|
)),
|
|
218
218
|
actions: {
|
|
219
219
|
primary: [toAction({
|
|
220
220
|
id: 'turn on sync',
|
|
221
|
-
label: ( localize(
|
|
221
|
+
label: ( localize(12851, "Turn on Settings Sync...")),
|
|
222
222
|
run: () => this.turnOn()
|
|
223
223
|
})]
|
|
224
224
|
}
|
|
@@ -228,13 +228,13 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
228
228
|
this.notificationService.notify({
|
|
229
229
|
severity: Severity.Info,
|
|
230
230
|
message: ( localize(
|
|
231
|
-
|
|
231
|
+
12852,
|
|
232
232
|
"Settings sync was turned off from another device, please turn on sync again."
|
|
233
233
|
)),
|
|
234
234
|
actions: {
|
|
235
235
|
primary: [toAction({
|
|
236
236
|
id: 'turn on sync',
|
|
237
|
-
label: ( localize(
|
|
237
|
+
label: ( localize(12851, "Turn on Settings Sync...")),
|
|
238
238
|
run: () => this.turnOn()
|
|
239
239
|
})]
|
|
240
240
|
}
|
|
@@ -245,7 +245,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
245
245
|
this.disableSync(error.resource);
|
|
246
246
|
const sourceArea = getSyncAreaLabel(error.resource);
|
|
247
247
|
this.handleTooLargeError(error.resource, ( localize(
|
|
248
|
-
|
|
248
|
+
12853,
|
|
249
249
|
"Disabled syncing {0} because size of the {1} file to sync is larger than {2}. Please open the file and reduce the size and enable sync",
|
|
250
250
|
sourceArea.toLowerCase(),
|
|
251
251
|
sourceArea.toLowerCase(),
|
|
@@ -256,7 +256,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
256
256
|
case UserDataSyncErrorCode.LocalTooManyProfiles:
|
|
257
257
|
this.disableSync(SyncResource.Profiles);
|
|
258
258
|
this.notificationService.error(( localize(
|
|
259
|
-
|
|
259
|
+
12854,
|
|
260
260
|
"Disabled syncing profiles because there are too many profiles to sync. Settings Sync supports syncing maximum 20 profiles. Please reduce the number of profiles and enable sync"
|
|
261
261
|
)));
|
|
262
262
|
break;
|
|
@@ -264,12 +264,12 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
264
264
|
case UserDataSyncErrorCode.Gone:
|
|
265
265
|
case UserDataSyncErrorCode.UpgradeRequired: {
|
|
266
266
|
const message = ( localize(
|
|
267
|
-
|
|
267
|
+
12855,
|
|
268
268
|
"Settings sync is disabled because the current version ({0}, {1}) is not compatible with the sync service. Please update before turning on sync.",
|
|
269
269
|
this.productService.version,
|
|
270
270
|
this.productService.commit
|
|
271
271
|
));
|
|
272
|
-
const operationId = error.operationId ? ( localize(
|
|
272
|
+
const operationId = error.operationId ? ( localize(12856, "Operation Id: {0}", error.operationId)) : undefined;
|
|
273
273
|
this.notificationService.notify({
|
|
274
274
|
severity: Severity.Error,
|
|
275
275
|
message: operationId ? `${message} ${operationId}` : message,
|
|
@@ -278,10 +278,10 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
278
278
|
}
|
|
279
279
|
case UserDataSyncErrorCode.MethodNotFound: {
|
|
280
280
|
const message = ( localize(
|
|
281
|
-
|
|
281
|
+
12857,
|
|
282
282
|
"Settings sync is disabled because the client is making invalid requests. Please report an issue with the logs."
|
|
283
283
|
));
|
|
284
|
-
const operationId = error.operationId ? ( localize(
|
|
284
|
+
const operationId = error.operationId ? ( localize(12856, "Operation Id: {0}", error.operationId)) : undefined;
|
|
285
285
|
this.notificationService.notify({
|
|
286
286
|
severity: Severity.Error,
|
|
287
287
|
message: operationId ? `${message} ${operationId}` : message,
|
|
@@ -289,12 +289,12 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
289
289
|
primary: [
|
|
290
290
|
toAction({
|
|
291
291
|
id: 'Show Sync Logs',
|
|
292
|
-
label: ( localize(
|
|
292
|
+
label: ( localize(12858, "Show Log")),
|
|
293
293
|
run: () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)
|
|
294
294
|
}),
|
|
295
295
|
toAction({
|
|
296
296
|
id: 'Report Issue',
|
|
297
|
-
label: ( localize(
|
|
297
|
+
label: ( localize(12859, "Report Issue")),
|
|
298
298
|
run: () => this.workbenchIssueService.openReporter()
|
|
299
299
|
})
|
|
300
300
|
]
|
|
@@ -306,19 +306,19 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
306
306
|
this.notificationService.notify({
|
|
307
307
|
severity: Severity.Error,
|
|
308
308
|
message: ( localize(
|
|
309
|
-
|
|
309
|
+
12860,
|
|
310
310
|
"Settings sync is disabled because your data in the cloud is older than that of the client. Please clear your data in the cloud before turning on sync."
|
|
311
311
|
)),
|
|
312
312
|
actions: {
|
|
313
313
|
primary: [
|
|
314
314
|
toAction({
|
|
315
315
|
id: 'reset',
|
|
316
|
-
label: ( localize(
|
|
316
|
+
label: ( localize(12861, "Clear Data in Cloud...")),
|
|
317
317
|
run: () => this.userDataSyncWorkbenchService.resetSyncedData()
|
|
318
318
|
}),
|
|
319
319
|
toAction({
|
|
320
320
|
id: 'show synced data',
|
|
321
|
-
label: ( localize(
|
|
321
|
+
label: ( localize(12862, "Show Synced Data")),
|
|
322
322
|
run: () => this.userDataSyncWorkbenchService.showSyncActivity()
|
|
323
323
|
})
|
|
324
324
|
]
|
|
@@ -329,8 +329,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
329
329
|
this.notificationService.notify({
|
|
330
330
|
severity: Severity.Info,
|
|
331
331
|
message: this.userDataSyncStoreManagementService.userDataSyncStore?.type === 'insiders' ?
|
|
332
|
-
( localize(
|
|
333
|
-
( localize(
|
|
332
|
+
( localize(12863, "Settings Sync has been switched to insiders service")) :
|
|
333
|
+
( localize(12864, "Settings Sync has been switched to stable service")),
|
|
334
334
|
});
|
|
335
335
|
return;
|
|
336
336
|
case UserDataSyncErrorCode.DefaultServiceChanged:
|
|
@@ -338,7 +338,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
338
338
|
this.notificationService.notify({
|
|
339
339
|
severity: Severity.Info,
|
|
340
340
|
message: ( localize(
|
|
341
|
-
|
|
341
|
+
12865,
|
|
342
342
|
"Settings sync now uses a separate service, more information is available in the [Settings Sync Documentation](https://aka.ms/vscode-settings-sync-help#_syncing-stable-versus-insiders)."
|
|
343
343
|
)),
|
|
344
344
|
});
|
|
@@ -347,14 +347,14 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
347
347
|
this.notificationService.notify({
|
|
348
348
|
severity: Severity.Info,
|
|
349
349
|
message: ( localize(
|
|
350
|
-
|
|
350
|
+
12866,
|
|
351
351
|
"Settings sync was turned off because {0} now uses a separate service. Please turn on sync again.",
|
|
352
352
|
this.productService.nameLong
|
|
353
353
|
)),
|
|
354
354
|
actions: {
|
|
355
355
|
primary: [toAction({
|
|
356
356
|
id: 'turn on sync',
|
|
357
|
-
label: ( localize(
|
|
357
|
+
label: ( localize(12851, "Turn on Settings Sync...")),
|
|
358
358
|
run: () => this.turnOn()
|
|
359
359
|
})]
|
|
360
360
|
}
|
|
@@ -364,14 +364,14 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
handleTooLargeError(resource, message, error) {
|
|
367
|
-
const operationId = error.operationId ? ( localize(
|
|
367
|
+
const operationId = error.operationId ? ( localize(12856, "Operation Id: {0}", error.operationId)) : undefined;
|
|
368
368
|
this.notificationService.notify({
|
|
369
369
|
severity: Severity.Error,
|
|
370
370
|
message: operationId ? `${message} ${operationId}` : message,
|
|
371
371
|
actions: {
|
|
372
372
|
primary: [toAction({
|
|
373
373
|
id: 'open sync file',
|
|
374
|
-
label: ( localize(
|
|
374
|
+
label: ( localize(12867, "Open {0} File", getSyncAreaLabel(resource))),
|
|
375
375
|
run: () => resource === SyncResource.Settings ? this.preferencesService.openUserSettings({ jsonEditor: true }) : this.preferencesService.openGlobalKeybindingSettings(true)
|
|
376
376
|
})]
|
|
377
377
|
}
|
|
@@ -425,14 +425,14 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
425
425
|
const handle = this.notificationService.notify({
|
|
426
426
|
severity: Severity.Error,
|
|
427
427
|
message: ( localize(
|
|
428
|
-
|
|
428
|
+
12868,
|
|
429
429
|
"Unable to sync {0} because the content in the file is not valid. Please open the file and correct it.",
|
|
430
430
|
errorArea.toLowerCase()
|
|
431
431
|
)),
|
|
432
432
|
actions: {
|
|
433
433
|
primary: [toAction({
|
|
434
434
|
id: 'open sync file',
|
|
435
|
-
label: ( localize(
|
|
435
|
+
label: ( localize(12867, "Open {0} File", errorArea)),
|
|
436
436
|
run: () => source === SyncResource.Settings ? this.preferencesService.openUserSettings({ jsonEditor: true }) : this.preferencesService.openGlobalKeybindingSettings(true)
|
|
437
437
|
})]
|
|
438
438
|
}
|
|
@@ -449,10 +449,10 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
449
449
|
this.globalActivityBadgeDisposable.clear();
|
|
450
450
|
let badge = undefined;
|
|
451
451
|
if (this.userDataSyncService.conflicts.length && this.userDataSyncEnablementService.isEnabled()) {
|
|
452
|
-
badge = ( new NumberBadge(this.getConflictsCount(), () => ( localize(
|
|
452
|
+
badge = ( new NumberBadge(this.getConflictsCount(), () => ( localize(12869, "{0}: Conflicts Detected", SYNC_TITLE.value))));
|
|
453
453
|
}
|
|
454
454
|
else if (this.turningOnSync) {
|
|
455
|
-
badge = ( new ProgressBadge(() => ( localize(
|
|
455
|
+
badge = ( new ProgressBadge(() => ( localize(12870, "Turning on Settings Sync..."))));
|
|
456
456
|
}
|
|
457
457
|
if (badge) {
|
|
458
458
|
this.globalActivityBadgeDisposable.value = this.activityService.showGlobalActivity({ badge });
|
|
@@ -462,7 +462,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
462
462
|
this.accountBadgeDisposable.clear();
|
|
463
463
|
let badge = undefined;
|
|
464
464
|
if (this.userDataSyncService.status !== SyncStatus.Uninitialized && this.userDataSyncEnablementService.isEnabled() && this.userDataSyncWorkbenchService.accountStatus === AccountStatus.Unavailable) {
|
|
465
|
-
badge = ( new NumberBadge(1, () => ( localize(
|
|
465
|
+
badge = ( new NumberBadge(1, () => ( localize(12871, "Sign in to Sync Settings"))));
|
|
466
466
|
}
|
|
467
467
|
if (badge) {
|
|
468
468
|
this.accountBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
@@ -471,7 +471,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
471
471
|
async turnOn() {
|
|
472
472
|
try {
|
|
473
473
|
if (!this.userDataSyncWorkbenchService.authenticationProviders.length) {
|
|
474
|
-
throw ( new Error(( localize(
|
|
474
|
+
throw ( new Error(( localize(12872, "No authentication providers are available."))));
|
|
475
475
|
}
|
|
476
476
|
const turnOn = await this.askToConfigure();
|
|
477
477
|
if (!turnOn) {
|
|
@@ -491,7 +491,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
491
491
|
case UserDataSyncErrorCode.TooLarge:
|
|
492
492
|
if (e.resource === SyncResource.Keybindings || e.resource === SyncResource.Settings || e.resource === SyncResource.Tasks) {
|
|
493
493
|
this.handleTooLargeError(e.resource, ( localize(
|
|
494
|
-
|
|
494
|
+
12873,
|
|
495
495
|
"Settings sync cannot be turned on because size of the {0} file to sync is larger than {1}. Please open the file and reduce the size and turn on sync",
|
|
496
496
|
getSyncAreaLabel(e.resource).toLowerCase(),
|
|
497
497
|
'100kb'
|
|
@@ -503,12 +503,12 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
503
503
|
case UserDataSyncErrorCode.Gone:
|
|
504
504
|
case UserDataSyncErrorCode.UpgradeRequired: {
|
|
505
505
|
const message = ( localize(
|
|
506
|
-
|
|
506
|
+
12874,
|
|
507
507
|
"Settings sync cannot be turned on because the current version ({0}, {1}) is not compatible with the sync service. Please update before turning on sync.",
|
|
508
508
|
this.productService.version,
|
|
509
509
|
this.productService.commit
|
|
510
510
|
));
|
|
511
|
-
const operationId = e.operationId ? ( localize(
|
|
511
|
+
const operationId = e.operationId ? ( localize(12856, "Operation Id: {0}", e.operationId)) : undefined;
|
|
512
512
|
this.notificationService.notify({
|
|
513
513
|
severity: Severity.Error,
|
|
514
514
|
message: operationId ? `${message} ${operationId}` : message,
|
|
@@ -519,19 +519,19 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
519
519
|
this.notificationService.notify({
|
|
520
520
|
severity: Severity.Error,
|
|
521
521
|
message: ( localize(
|
|
522
|
-
|
|
522
|
+
12875,
|
|
523
523
|
"Settings sync cannot be turned on because your data in the cloud is older than that of the client. Please clear your data in the cloud before turning on sync."
|
|
524
524
|
)),
|
|
525
525
|
actions: {
|
|
526
526
|
primary: [
|
|
527
527
|
toAction({
|
|
528
528
|
id: 'reset',
|
|
529
|
-
label: ( localize(
|
|
529
|
+
label: ( localize(12861, "Clear Data in Cloud...")),
|
|
530
530
|
run: () => this.userDataSyncWorkbenchService.resetSyncedData()
|
|
531
531
|
}),
|
|
532
532
|
toAction({
|
|
533
533
|
id: 'show synced data',
|
|
534
|
-
label: ( localize(
|
|
534
|
+
label: ( localize(12862, "Show Synced Data")),
|
|
535
535
|
run: () => this.userDataSyncWorkbenchService.showSyncActivity()
|
|
536
536
|
})
|
|
537
537
|
]
|
|
@@ -540,17 +540,17 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
540
540
|
return;
|
|
541
541
|
case UserDataSyncErrorCode.Unauthorized:
|
|
542
542
|
case UserDataSyncErrorCode.Forbidden:
|
|
543
|
-
this.notificationService.error(( localize(
|
|
543
|
+
this.notificationService.error(( localize(12876, "Error while turning on Settings Sync: Authentication failed.")));
|
|
544
544
|
return;
|
|
545
545
|
}
|
|
546
546
|
this.notificationService.error(( localize(
|
|
547
|
-
|
|
547
|
+
12877,
|
|
548
548
|
"Error while turning on Settings Sync. Please check [logs]({0}) for more details.",
|
|
549
549
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
550
550
|
)));
|
|
551
551
|
}
|
|
552
552
|
else {
|
|
553
|
-
this.notificationService.error(( localize(
|
|
553
|
+
this.notificationService.error(( localize(12878, "Error while turning on Settings Sync. {0}", getErrorMessage(e))));
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
@@ -562,8 +562,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
562
562
|
quickPick.title = SYNC_TITLE.value;
|
|
563
563
|
quickPick.ok = false;
|
|
564
564
|
quickPick.customButton = true;
|
|
565
|
-
quickPick.customLabel = ( localize(
|
|
566
|
-
quickPick.description = ( localize(
|
|
565
|
+
quickPick.customLabel = ( localize(12879, "Sign in"));
|
|
566
|
+
quickPick.description = ( localize(12880, "Please sign in to backup and sync your data across devices."));
|
|
567
567
|
quickPick.canSelectMany = true;
|
|
568
568
|
quickPick.ignoreFocusOut = true;
|
|
569
569
|
quickPick.hideInput = true;
|
|
@@ -638,8 +638,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
638
638
|
const disposables = ( new DisposableStore());
|
|
639
639
|
const quickPick = this.quickInputService.createQuickPick();
|
|
640
640
|
disposables.add(quickPick);
|
|
641
|
-
quickPick.title = ( localize(
|
|
642
|
-
quickPick.placeholder = ( localize(
|
|
641
|
+
quickPick.title = ( localize(12881, "{0}: Configure...", SYNC_TITLE.value));
|
|
642
|
+
quickPick.placeholder = ( localize(12882, "Choose what to sync"));
|
|
643
643
|
quickPick.canSelectMany = true;
|
|
644
644
|
quickPick.ignoreFocusOut = true;
|
|
645
645
|
quickPick.ok = true;
|
|
@@ -661,15 +661,15 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
661
661
|
}
|
|
662
662
|
async turnOff() {
|
|
663
663
|
const result = await this.dialogService.confirm({
|
|
664
|
-
message: ( localize(
|
|
664
|
+
message: ( localize(12883, "Do you want to turn off sync?")),
|
|
665
665
|
detail: ( localize(
|
|
666
|
-
|
|
666
|
+
12884,
|
|
667
667
|
"Your settings, keybindings, extensions, snippets and UI State will no longer be synced."
|
|
668
668
|
)),
|
|
669
|
-
primaryButton: ( localize(
|
|
669
|
+
primaryButton: ( localize(12885, "&&Turn off")),
|
|
670
670
|
checkbox: this.userDataSyncWorkbenchService.accountStatus === AccountStatus.Available ? {
|
|
671
671
|
label: ( localize(
|
|
672
|
-
|
|
672
|
+
12886,
|
|
673
673
|
"Turn off sync on all your devices and clear the data from the cloud."
|
|
674
674
|
))
|
|
675
675
|
} : undefined
|
|
@@ -696,9 +696,9 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
696
696
|
return (new Promise((c, e) => {
|
|
697
697
|
const disposables = ( new DisposableStore());
|
|
698
698
|
const quickPick = disposables.add(this.quickInputService.createQuickPick());
|
|
699
|
-
quickPick.title = ( localize(
|
|
699
|
+
quickPick.title = ( localize(12887, "{0}: Select Service", SYNC_TITLE.value));
|
|
700
700
|
quickPick.description = ( localize(
|
|
701
|
-
|
|
701
|
+
12888,
|
|
702
702
|
"Ensure you are using the same settings sync service when syncing with multiple environments"
|
|
703
703
|
));
|
|
704
704
|
quickPick.hideInput = true;
|
|
@@ -706,19 +706,19 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
706
706
|
const getDescription = (url) => {
|
|
707
707
|
const isDefault = isEqual(url, userDataSyncStore.defaultUrl);
|
|
708
708
|
if (isDefault) {
|
|
709
|
-
return localize(
|
|
709
|
+
return localize(12889, "Default");
|
|
710
710
|
}
|
|
711
711
|
return undefined;
|
|
712
712
|
};
|
|
713
713
|
quickPick.items = [
|
|
714
714
|
{
|
|
715
715
|
id: 'insiders',
|
|
716
|
-
label: ( localize(
|
|
716
|
+
label: ( localize(12890, "Insiders")),
|
|
717
717
|
description: getDescription(userDataSyncStore.insidersUrl)
|
|
718
718
|
},
|
|
719
719
|
{
|
|
720
720
|
id: 'stable',
|
|
721
|
-
label: ( localize(
|
|
721
|
+
label: ( localize(12891, "Stable")),
|
|
722
722
|
description: getDescription(userDataSyncStore.stableUrl)
|
|
723
723
|
}
|
|
724
724
|
];
|
|
@@ -767,7 +767,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
767
767
|
constructor() {
|
|
768
768
|
super({
|
|
769
769
|
id: 'workbench.userDataSync.actions.turnOn',
|
|
770
|
-
title: ( localize2(
|
|
770
|
+
title: ( localize2(12892, 'Backup and Sync Settings...')),
|
|
771
771
|
category: SYNC_TITLE,
|
|
772
772
|
f1: true,
|
|
773
773
|
precondition: when,
|
|
@@ -800,7 +800,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
800
800
|
constructor() {
|
|
801
801
|
super({
|
|
802
802
|
id: 'workbench.userData.actions.turningOn',
|
|
803
|
-
title: ( localize(
|
|
803
|
+
title: ( localize(12893, "Turning on Settings Sync...")),
|
|
804
804
|
precondition: ( ContextKeyExpr.false()),
|
|
805
805
|
menu: [{
|
|
806
806
|
group: '3_configuration',
|
|
@@ -823,7 +823,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
823
823
|
constructor() {
|
|
824
824
|
super({
|
|
825
825
|
id: 'workbench.userData.actions.cancelTurnOn',
|
|
826
|
-
title: ( localize(
|
|
826
|
+
title: ( localize(12894, "Cancel")),
|
|
827
827
|
icon: Codicon.stopCircle,
|
|
828
828
|
menu: {
|
|
829
829
|
id: MenuId.ViewContainerTitle,
|
|
@@ -846,7 +846,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
846
846
|
constructor() {
|
|
847
847
|
super({
|
|
848
848
|
id: 'workbench.userData.actions.signin',
|
|
849
|
-
title: ( localize(
|
|
849
|
+
title: ( localize(12895, "Sign in to Sync Settings")),
|
|
850
850
|
menu: {
|
|
851
851
|
group: '3_configuration',
|
|
852
852
|
id: MenuId.GlobalActivity,
|
|
@@ -868,13 +868,13 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
868
868
|
group: '1_settings',
|
|
869
869
|
command: {
|
|
870
870
|
id,
|
|
871
|
-
title: ( localize(
|
|
871
|
+
title: ( localize(12896, "Sign in to Sync Settings (1)")),
|
|
872
872
|
},
|
|
873
873
|
when
|
|
874
874
|
})));
|
|
875
875
|
}
|
|
876
876
|
getShowConflictsTitle() {
|
|
877
|
-
return localize2(
|
|
877
|
+
return localize2(12897, "Show Conflicts ({0})", this.getConflictsCount());
|
|
878
878
|
}
|
|
879
879
|
registerShowConflictsAction() {
|
|
880
880
|
this.conflictsActionDisposable.value = undefined;
|
|
@@ -912,7 +912,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
912
912
|
constructor() {
|
|
913
913
|
super({
|
|
914
914
|
id: 'workbench.userDataSync.actions.manage',
|
|
915
|
-
title: ( localize(
|
|
915
|
+
title: ( localize(12898, "Settings Sync is On")),
|
|
916
916
|
toggled: ContextKeyTrueExpr.INSTANCE,
|
|
917
917
|
menu: [
|
|
918
918
|
{
|
|
@@ -1033,7 +1033,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1033
1033
|
catch (e) {
|
|
1034
1034
|
if (!isCancellationError(e)) {
|
|
1035
1035
|
that.notificationService.error(( localize(
|
|
1036
|
-
|
|
1036
|
+
12899,
|
|
1037
1037
|
"Error while turning off Settings Sync. Please check [logs]({0}) for more details.",
|
|
1038
1038
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
1039
1039
|
)));
|
|
@@ -1052,7 +1052,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1052
1052
|
title: configureSyncCommand.title,
|
|
1053
1053
|
category: SYNC_TITLE,
|
|
1054
1054
|
icon: Codicon.settingsGear,
|
|
1055
|
-
tooltip: ( localize(
|
|
1055
|
+
tooltip: ( localize(12900, "Configure...")),
|
|
1056
1056
|
menu: [{
|
|
1057
1057
|
id: MenuId.CommandPalette,
|
|
1058
1058
|
when
|
|
@@ -1073,8 +1073,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1073
1073
|
constructor() {
|
|
1074
1074
|
super({
|
|
1075
1075
|
id: SHOW_SYNC_LOG_COMMAND_ID,
|
|
1076
|
-
title: ( localize(
|
|
1077
|
-
tooltip: ( localize(
|
|
1076
|
+
title: ( localize(12901, "{0}: Show Log", SYNC_TITLE.value)),
|
|
1077
|
+
tooltip: ( localize(12902, "Show Log")),
|
|
1078
1078
|
icon: Codicon.output,
|
|
1079
1079
|
menu: [{
|
|
1080
1080
|
id: MenuId.CommandPalette,
|
|
@@ -1139,7 +1139,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1139
1139
|
constructor() {
|
|
1140
1140
|
super({
|
|
1141
1141
|
id: 'workbench.userDataSync.actions.acceptMerges',
|
|
1142
|
-
title: ( localize(
|
|
1142
|
+
title: ( localize(12903, "Complete Merge")),
|
|
1143
1143
|
menu: [{
|
|
1144
1144
|
id: MenuId.EditorContent,
|
|
1145
1145
|
when: ( ContextKeyExpr.and(ctxIsMergeResultEditor, ( ContextKeyExpr.regex(ctxMergeBaseUri.key, ( new RegExp(`^${USER_DATA_SYNC_SCHEME}:`)))))),
|
|
@@ -1171,7 +1171,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1171
1171
|
const notificationService = accessor.get(INotificationService);
|
|
1172
1172
|
const folder = await userDataSyncWorkbenchService.downloadSyncActivity();
|
|
1173
1173
|
if (folder) {
|
|
1174
|
-
notificationService.info(( localize(
|
|
1174
|
+
notificationService.info(( localize(12904, "Successfully downloaded Settings Sync activity.")));
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
}));
|
|
@@ -1198,7 +1198,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1198
1198
|
constructor() {
|
|
1199
1199
|
super({
|
|
1200
1200
|
id: 'workbench.actions.syncData.reset',
|
|
1201
|
-
title: ( localize(
|
|
1201
|
+
title: ( localize(12905, "Clear Data in Cloud...")),
|
|
1202
1202
|
menu: [{
|
|
1203
1203
|
id: MenuId.ViewContainerTitle,
|
|
1204
1204
|
when: ( ContextKeyExpr.equals('viewContainer', SYNC_VIEW_CONTAINER_ID)),
|
|
@@ -43,7 +43,7 @@ let UserDataSyncConflictsViewPane = class UserDataSyncConflictsViewPane extends
|
|
|
43
43
|
renderTreeView(container) {
|
|
44
44
|
super.renderTreeView(append(container, $('')));
|
|
45
45
|
const that = this;
|
|
46
|
-
this.treeView.message = ( localize(
|
|
46
|
+
this.treeView.message = ( localize(12906, "Please go through each entry and merge to resolve conflicts."));
|
|
47
47
|
this.treeView.dataProvider = { getChildren() { return that.getTreeItems(); } };
|
|
48
48
|
}
|
|
49
49
|
async getTreeItems() {
|
|
@@ -107,7 +107,7 @@ let UserDataSyncConflictsViewPane = class UserDataSyncConflictsViewPane extends
|
|
|
107
107
|
constructor() {
|
|
108
108
|
super({
|
|
109
109
|
id: `workbench.actions.sync.openConflicts`,
|
|
110
|
-
title: ( localize(
|
|
110
|
+
title: ( localize(12907, "Show Conflicts")),
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
async run(accessor, handle) {
|
|
@@ -119,7 +119,7 @@ let UserDataSyncConflictsViewPane = class UserDataSyncConflictsViewPane extends
|
|
|
119
119
|
constructor() {
|
|
120
120
|
super({
|
|
121
121
|
id: `workbench.actions.sync.acceptRemote`,
|
|
122
|
-
title: ( localize(
|
|
122
|
+
title: ( localize(12908, "Accept Remote")),
|
|
123
123
|
icon: Codicon.cloudDownload,
|
|
124
124
|
menu: {
|
|
125
125
|
id: MenuId.ViewItemContext,
|
|
@@ -138,7 +138,7 @@ let UserDataSyncConflictsViewPane = class UserDataSyncConflictsViewPane extends
|
|
|
138
138
|
constructor() {
|
|
139
139
|
super({
|
|
140
140
|
id: `workbench.actions.sync.acceptLocal`,
|
|
141
|
-
title: ( localize(
|
|
141
|
+
title: ( localize(12909, "Accept Local")),
|
|
142
142
|
icon: Codicon.cloudUpload,
|
|
143
143
|
menu: {
|
|
144
144
|
id: MenuId.ViewItemContext,
|
|
@@ -160,11 +160,11 @@ let UserDataSyncConflictsViewPane = class UserDataSyncConflictsViewPane extends
|
|
|
160
160
|
))))) {
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
const remoteResourceName = ( localize(
|
|
164
|
-
const localResourceName = ( localize(
|
|
163
|
+
const remoteResourceName = ( localize(12910, "{0} (Remote)", basename(conflictToOpen.remoteResource)));
|
|
164
|
+
const localResourceName = ( localize(12911, "{0} (Local)", basename(conflictToOpen.remoteResource)));
|
|
165
165
|
await this.editorService.openEditor({
|
|
166
|
-
input1: { resource: conflictToOpen.remoteResource, label: ( localize(
|
|
167
|
-
input2: { resource: conflictToOpen.localResource, label: ( localize(
|
|
166
|
+
input1: { resource: conflictToOpen.remoteResource, label: ( localize(12912, 'Theirs')), description: remoteResourceName },
|
|
167
|
+
input2: { resource: conflictToOpen.localResource, label: ( localize(12913, 'Yours')), description: localResourceName },
|
|
168
168
|
base: { resource: conflictToOpen.baseResource },
|
|
169
169
|
result: { resource: conflictToOpen.previewResource },
|
|
170
170
|
options: {
|
|
@@ -55,7 +55,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
55
55
|
}
|
|
56
56
|
registerConflictsView(container) {
|
|
57
57
|
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
58
|
-
const viewName = ( localize2(
|
|
58
|
+
const viewName = ( localize2(12914, "Conflicts"));
|
|
59
59
|
const viewDescriptor = {
|
|
60
60
|
id: SYNC_CONFLICTS_VIEW_ID,
|
|
61
61
|
name: viewName,
|
|
@@ -71,7 +71,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
71
71
|
}
|
|
72
72
|
registerMachinesView(container) {
|
|
73
73
|
const id = `workbench.views.sync.machines`;
|
|
74
|
-
const name = ( localize2(
|
|
74
|
+
const name = ( localize2(12915, "Synced Machines"));
|
|
75
75
|
const treeView = this.instantiationService.createInstance(TreeView, id, name.value);
|
|
76
76
|
const dataProvider = this.instantiationService.createInstance(UserDataSyncMachinesViewDataProvider, treeView);
|
|
77
77
|
treeView.showRefreshAction = true;
|
|
@@ -95,7 +95,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
95
95
|
constructor() {
|
|
96
96
|
super({
|
|
97
97
|
id: `workbench.actions.sync.editMachineName`,
|
|
98
|
-
title: ( localize(
|
|
98
|
+
title: ( localize(12916, "Edit Name")),
|
|
99
99
|
icon: Codicon.edit,
|
|
100
100
|
menu: {
|
|
101
101
|
id: MenuId.ViewItemContext,
|
|
@@ -115,7 +115,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
115
115
|
constructor() {
|
|
116
116
|
super({
|
|
117
117
|
id: `workbench.actions.sync.turnOffSyncOnMachine`,
|
|
118
|
-
title: ( localize(
|
|
118
|
+
title: ( localize(12917, "Turn off Settings Sync")),
|
|
119
119
|
menu: {
|
|
120
120
|
id: MenuId.ViewItemContext,
|
|
121
121
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', id)), ( ContextKeyExpr.equals('viewItem', 'sync-machine')))),
|
|
@@ -131,7 +131,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
131
131
|
}
|
|
132
132
|
registerActivityView(container, remote) {
|
|
133
133
|
const id = `workbench.views.sync.${remote ? 'remote' : 'local'}Activity`;
|
|
134
|
-
const name = remote ? ( localize2(
|
|
134
|
+
const name = remote ? ( localize2(12918, "Sync Activity (Remote)")) : ( localize2(12919, "Sync Activity (Local)"));
|
|
135
135
|
const treeView = this.instantiationService.createInstance(TreeView, id, name.value);
|
|
136
136
|
treeView.showCollapseAllAction = true;
|
|
137
137
|
treeView.showRefreshAction = true;
|
|
@@ -156,7 +156,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
156
156
|
}
|
|
157
157
|
registerExternalActivityView(container) {
|
|
158
158
|
const id = `workbench.views.sync.externalActivity`;
|
|
159
|
-
const name = ( localize2(
|
|
159
|
+
const name = ( localize2(12920, "Sync Activity (Developer)"));
|
|
160
160
|
const dataProvider = this.instantiationService.createInstance(ExtractedUserDataSyncActivityViewDataProvider, undefined);
|
|
161
161
|
const treeView = this.instantiationService.createInstance(TreeView, id, name.value);
|
|
162
162
|
treeView.showCollapseAllAction = false;
|
|
@@ -179,7 +179,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
179
179
|
constructor() {
|
|
180
180
|
super({
|
|
181
181
|
id: `workbench.actions.sync.loadActivity`,
|
|
182
|
-
title: ( localize(
|
|
182
|
+
title: ( localize(12921, "Load Sync Activity")),
|
|
183
183
|
icon: Codicon.cloudUpload,
|
|
184
184
|
menu: {
|
|
185
185
|
id: MenuId.ViewTitle,
|
|
@@ -191,7 +191,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
191
191
|
async run(accessor) {
|
|
192
192
|
const fileDialogService = accessor.get(IFileDialogService);
|
|
193
193
|
const result = await fileDialogService.showOpenDialog({
|
|
194
|
-
title: ( localize(
|
|
194
|
+
title: ( localize(12922, "Select Sync Activity File or Folder")),
|
|
195
195
|
canSelectFiles: true,
|
|
196
196
|
canSelectFolders: true,
|
|
197
197
|
canSelectMany: false,
|
|
@@ -209,7 +209,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
209
209
|
constructor() {
|
|
210
210
|
super({
|
|
211
211
|
id: `workbench.actions.sync.${viewId}.resolveResource`,
|
|
212
|
-
title: ( localize(
|
|
212
|
+
title: ( localize(12923, "Show raw JSON sync data")),
|
|
213
213
|
menu: {
|
|
214
214
|
id: MenuId.ViewItemContext,
|
|
215
215
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', viewId)), ( ContextKeyExpr.regex('viewItem', /sync-resource-.*/i))))
|
|
@@ -226,7 +226,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
226
226
|
constructor() {
|
|
227
227
|
super({
|
|
228
228
|
id: `workbench.actions.sync.${viewId}.compareWithLocal`,
|
|
229
|
-
title: ( localize(
|
|
229
|
+
title: ( localize(12924, "Compare with Local")),
|
|
230
230
|
menu: {
|
|
231
231
|
id: MenuId.ViewItemContext,
|
|
232
232
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', viewId)), ( ContextKeyExpr.regex('viewItem', /sync-associatedResource-.*/i))))
|
|
@@ -239,10 +239,10 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
239
239
|
const remoteResource = ( URI.parse(resource));
|
|
240
240
|
const localResource = ( URI.parse(comparableResource));
|
|
241
241
|
return commandService.executeCommand(API_OPEN_DIFF_EDITOR_COMMAND_ID, remoteResource, localResource, ( localize(
|
|
242
|
-
|
|
242
|
+
12925,
|
|
243
243
|
"{0} ↔ {1}",
|
|
244
|
-
localize(
|
|
245
|
-
localize(
|
|
244
|
+
localize(12926, "{0} (Remote)", basename(remoteResource)),
|
|
245
|
+
localize(12927, "{0} (Local)", basename(localResource))
|
|
246
246
|
)), undefined);
|
|
247
247
|
}
|
|
248
248
|
}));
|
|
@@ -250,7 +250,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
250
250
|
constructor() {
|
|
251
251
|
super({
|
|
252
252
|
id: `workbench.actions.sync.${viewId}.replaceCurrent`,
|
|
253
|
-
title: ( localize(
|
|
253
|
+
title: ( localize(12928, "Restore")),
|
|
254
254
|
icon: Codicon.discard,
|
|
255
255
|
menu: {
|
|
256
256
|
id: MenuId.ViewItemContext,
|
|
@@ -265,7 +265,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
265
265
|
const { syncResourceHandle, syncResource } = JSON.parse(handle.$treeItemHandle);
|
|
266
266
|
const result = await dialogService.confirm({
|
|
267
267
|
message: ( localize(
|
|
268
|
-
|
|
268
|
+
12929,
|
|
269
269
|
"Would you like to replace your current {0} with selected?",
|
|
270
270
|
getSyncAreaLabel(syncResource)
|
|
271
271
|
)),
|
|
@@ -280,7 +280,7 @@ let UserDataSyncDataViews = class UserDataSyncDataViews extends Disposable {
|
|
|
280
280
|
}
|
|
281
281
|
registerTroubleShootView(container) {
|
|
282
282
|
const id = `workbench.views.sync.troubleshoot`;
|
|
283
|
-
const name = ( localize2(
|
|
283
|
+
const name = ( localize2(12930, "Troubleshoot"));
|
|
284
284
|
const treeView = this.instantiationService.createInstance(TreeView, id, name.value);
|
|
285
285
|
const dataProvider = this.instantiationService.createInstance(UserDataSyncTroubleshootViewDataProvider);
|
|
286
286
|
treeView.showRefreshAction = true;
|
|
@@ -346,7 +346,7 @@ let UserDataSyncActivityViewDataProvider = class UserDataSyncActivityViewDataPro
|
|
|
346
346
|
primary: [
|
|
347
347
|
toAction({
|
|
348
348
|
id: 'reset',
|
|
349
|
-
label: ( localize(
|
|
349
|
+
label: ( localize(12931, "Reset Synced Data")),
|
|
350
350
|
run: () => this.userDataSyncWorkbenchService.resetSyncedData()
|
|
351
351
|
}),
|
|
352
352
|
]
|
|
@@ -404,7 +404,7 @@ let UserDataSyncActivityViewDataProvider = class UserDataSyncActivityViewDataPro
|
|
|
404
404
|
previousResource,
|
|
405
405
|
resource,
|
|
406
406
|
( localize(
|
|
407
|
-
|
|
407
|
+
12932,
|
|
408
408
|
"{0} ↔ {1}",
|
|
409
409
|
`${basename(resource)} (${fromNow(syncResourceHandle.previous.created, true)})`,
|
|
410
410
|
`${basename(resource)} (${fromNow(syncResourceHandle.created, true)})`
|
|
@@ -497,7 +497,7 @@ let RemoteUserDataSyncActivityViewDataProvider = class RemoteUserDataSyncActivit
|
|
|
497
497
|
if (machineId) {
|
|
498
498
|
const machines = await this.getMachines();
|
|
499
499
|
const machine = machines.find(({ id }) => id === machineId);
|
|
500
|
-
children[0].description = machine?.isCurrent ? ( localize(
|
|
500
|
+
children[0].description = machine?.isCurrent ? ( localize(12933, "Current")) : machine?.name;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
return children;
|
|
@@ -553,7 +553,7 @@ let ExtractedUserDataSyncActivityViewDataProvider = class ExtractedUserDataSyncA
|
|
|
553
553
|
if (machineId) {
|
|
554
554
|
const machines = await this.getMachines();
|
|
555
555
|
const machine = machines.find(({ id }) => id === machineId);
|
|
556
|
-
children[0].description = machine?.isCurrent ? ( localize(
|
|
556
|
+
children[0].description = machine?.isCurrent ? ( localize(12933, "Current")) : machine?.name;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
return children;
|
|
@@ -591,12 +591,12 @@ let UserDataSyncMachinesViewDataProvider = class UserDataSyncMachinesViewDataPro
|
|
|
591
591
|
try {
|
|
592
592
|
let machines = await this.getMachines();
|
|
593
593
|
machines = machines.filter(m => !m.disabled).sort((m1, m2) => m1.isCurrent ? -1 : 1);
|
|
594
|
-
this.treeView.message = machines.length ? undefined : ( localize(
|
|
594
|
+
this.treeView.message = machines.length ? undefined : ( localize(12934, "No Machines"));
|
|
595
595
|
return (machines.map(({ id, name, isCurrent, platform }) => ({
|
|
596
596
|
handle: id,
|
|
597
597
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
598
598
|
label: { label: name },
|
|
599
|
-
description: isCurrent ? ( localize(
|
|
599
|
+
description: isCurrent ? ( localize(12933, "Current")) : undefined,
|
|
600
600
|
themeIcon: platform && isWebPlatform(platform) ? Codicon.globe : Codicon.vm,
|
|
601
601
|
contextValue: 'sync-machine'
|
|
602
602
|
})));
|
|
@@ -616,17 +616,17 @@ let UserDataSyncMachinesViewDataProvider = class UserDataSyncMachinesViewDataPro
|
|
|
616
616
|
const machines = await this.getMachines();
|
|
617
617
|
const machinesToDisable = machines.filter(({ id }) => machineIds.includes(id));
|
|
618
618
|
if (!machinesToDisable.length) {
|
|
619
|
-
throw ( new Error(( localize(
|
|
619
|
+
throw ( new Error(( localize(12935, "machine not found with id: {0}", machineIds.join(',')))));
|
|
620
620
|
}
|
|
621
621
|
const result = await this.dialogService.confirm({
|
|
622
622
|
type: 'info',
|
|
623
|
-
message: machinesToDisable.length > 1 ? ( localize(
|
|
623
|
+
message: machinesToDisable.length > 1 ? ( localize(12936, "Are you sure you want to turn off sync on selected machines?"))
|
|
624
624
|
: ( localize(
|
|
625
|
-
|
|
625
|
+
12937,
|
|
626
626
|
"Are you sure you want to turn off sync on {0}?",
|
|
627
627
|
machinesToDisable[0].name
|
|
628
628
|
)),
|
|
629
|
-
primaryButton: ( localize(
|
|
629
|
+
primaryButton: ( localize(12938, "&&Turn off")),
|
|
630
630
|
});
|
|
631
631
|
if (!result.confirmed) {
|
|
632
632
|
return false;
|
|
@@ -644,7 +644,7 @@ let UserDataSyncMachinesViewDataProvider = class UserDataSyncMachinesViewDataPro
|
|
|
644
644
|
async rename(machineId) {
|
|
645
645
|
const disposableStore = ( new DisposableStore());
|
|
646
646
|
const inputBox = disposableStore.add(this.quickInputService.createInputBox());
|
|
647
|
-
inputBox.placeholder = ( localize(
|
|
647
|
+
inputBox.placeholder = ( localize(12939, "Enter the name of the machine"));
|
|
648
648
|
inputBox.busy = true;
|
|
649
649
|
inputBox.show();
|
|
650
650
|
const machines = await this.getMachines();
|
|
@@ -653,7 +653,7 @@ let UserDataSyncMachinesViewDataProvider = class UserDataSyncMachinesViewDataPro
|
|
|
653
653
|
if (!machine) {
|
|
654
654
|
inputBox.hide();
|
|
655
655
|
disposableStore.dispose();
|
|
656
|
-
throw ( new Error(( localize(
|
|
656
|
+
throw ( new Error(( localize(12935, "machine not found with id: {0}", machineId))));
|
|
657
657
|
}
|
|
658
658
|
inputBox.busy = false;
|
|
659
659
|
inputBox.value = machine.name;
|
|
@@ -661,7 +661,7 @@ let UserDataSyncMachinesViewDataProvider = class UserDataSyncMachinesViewDataPro
|
|
|
661
661
|
machineName = machineName.trim();
|
|
662
662
|
return machineName && !( enabledMachines.some(m => m.id !== machineId && m.name === machineName)) ? machineName : null;
|
|
663
663
|
};
|
|
664
|
-
disposableStore.add(inputBox.onDidChangeValue(() => inputBox.validationMessage = validateMachineName(inputBox.value) ? '' : ( localize(
|
|
664
|
+
disposableStore.add(inputBox.onDidChangeValue(() => inputBox.validationMessage = validateMachineName(inputBox.value) ? '' : ( localize(12940, "Machine name should be unique and not empty"))));
|
|
665
665
|
return ( new Promise((c, e) => {
|
|
666
666
|
disposableStore.add(inputBox.onDidAccept(async () => {
|
|
667
667
|
const machineName = validateMachineName(inputBox.value);
|
|
@@ -701,12 +701,12 @@ let UserDataSyncTroubleshootViewDataProvider = class UserDataSyncTroubleshootVie
|
|
|
701
701
|
return [{
|
|
702
702
|
handle: 'SYNC_LOGS',
|
|
703
703
|
collapsibleState: TreeItemCollapsibleState.Collapsed,
|
|
704
|
-
label: { label: ( localize(
|
|
704
|
+
label: { label: ( localize(12941, "Logs")) },
|
|
705
705
|
themeIcon: Codicon.folder,
|
|
706
706
|
}, {
|
|
707
707
|
handle: 'LAST_SYNC_STATES',
|
|
708
708
|
collapsibleState: TreeItemCollapsibleState.Collapsed,
|
|
709
|
-
label: { label: ( localize(
|
|
709
|
+
label: { label: ( localize(12942, "Last Synced Remotes")) },
|
|
710
710
|
themeIcon: Codicon.folder,
|
|
711
711
|
}];
|
|
712
712
|
}
|
|
@@ -744,7 +744,7 @@ let UserDataSyncTroubleshootViewDataProvider = class UserDataSyncTroubleshootVie
|
|
|
744
744
|
collapsibleState: TreeItemCollapsibleState.None,
|
|
745
745
|
resourceUri: syncLogResource,
|
|
746
746
|
label: { label: this.uriIdentityService.extUri.basename(logFolder) },
|
|
747
|
-
description: this.uriIdentityService.extUri.isEqual(logFolder, this.environmentService.logsHome) ? ( localize(
|
|
747
|
+
description: this.uriIdentityService.extUri.isEqual(logFolder, this.environmentService.logsHome) ? ( localize(12933, "Current")) : undefined,
|
|
748
748
|
command: { id: API_OPEN_EDITOR_COMMAND_ID, title: '', arguments: [syncLogResource, undefined, undefined] },
|
|
749
749
|
});
|
|
750
750
|
}
|
package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.js
CHANGED
|
@@ -237,7 +237,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
237
237
|
async turnOn() {
|
|
238
238
|
if (!this.authenticationProviders.length) {
|
|
239
239
|
throw ( new Error(( localize(
|
|
240
|
-
|
|
240
|
+
14350,
|
|
241
241
|
"Settings sync cannot be turned on because there are no authentication providers available."
|
|
242
242
|
))));
|
|
243
243
|
}
|
|
@@ -252,16 +252,16 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
252
252
|
throw ( new CancellationError());
|
|
253
253
|
}
|
|
254
254
|
if (this.accountStatus !== AccountStatus.Available) {
|
|
255
|
-
throw ( new Error(( localize(
|
|
255
|
+
throw ( new Error(( localize(14351, "No account available"))));
|
|
256
256
|
}
|
|
257
257
|
const turnOnSyncCancellationToken = this.turnOnSyncCancellationToken = ( new CancellationTokenSource());
|
|
258
258
|
const disposable = isWeb ? Disposable.None : this.lifecycleService.onBeforeShutdown(e => e.veto((async () => {
|
|
259
259
|
const { confirmed } = await this.dialogService.confirm({
|
|
260
260
|
type: 'warning',
|
|
261
|
-
message: ( localize(
|
|
262
|
-
title: ( localize(
|
|
263
|
-
primaryButton: ( localize(
|
|
264
|
-
cancelButton: ( localize(
|
|
261
|
+
message: ( localize(14352, "Settings Sync is being turned on. Would you like to cancel it?")),
|
|
262
|
+
title: ( localize(14353, "Settings Sync")),
|
|
263
|
+
primaryButton: ( localize(14354, "&&Yes")),
|
|
264
|
+
cancelButton: ( localize(14355, "No"))
|
|
265
265
|
});
|
|
266
266
|
if (confirmed) {
|
|
267
267
|
turnOnSyncCancellationToken.cancel();
|
|
@@ -283,7 +283,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
283
283
|
if (this.environmentService.options?.settingsSyncOptions?.enablementHandler && this.currentAuthenticationProviderId) {
|
|
284
284
|
this.environmentService.options.settingsSyncOptions.enablementHandler(true, this.currentAuthenticationProviderId);
|
|
285
285
|
}
|
|
286
|
-
this.notificationService.info(( localize(
|
|
286
|
+
this.notificationService.info(( localize(14356, "{0} is turned on", SYNC_TITLE.value)));
|
|
287
287
|
this._onDidTurnOnSync.fire();
|
|
288
288
|
}
|
|
289
289
|
async turnoff(everywhere) {
|
|
@@ -324,13 +324,13 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
324
324
|
command: SHOW_SYNC_LOG_COMMAND_ID,
|
|
325
325
|
delay: 500,
|
|
326
326
|
}, async (progress) => {
|
|
327
|
-
progress.report({ message: ( localize(
|
|
327
|
+
progress.report({ message: ( localize(14357, "Turning on...")) });
|
|
328
328
|
disposables.add(this.userDataSyncService.onDidChangeStatus(status => {
|
|
329
329
|
if (status === SyncStatus.HasConflicts) {
|
|
330
|
-
progress.report({ message: ( localize(
|
|
330
|
+
progress.report({ message: ( localize(14358, "Resolving conflicts...")) });
|
|
331
331
|
}
|
|
332
332
|
else {
|
|
333
|
-
progress.report({ message: ( localize(
|
|
333
|
+
progress.report({ message: ( localize(14359, "Turning on...")) });
|
|
334
334
|
}
|
|
335
335
|
}));
|
|
336
336
|
await manualSyncTask.merge();
|
|
@@ -350,7 +350,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
350
350
|
}
|
|
351
351
|
async handleConflictsWhileTurningOn(token) {
|
|
352
352
|
const conflicts = this.userDataSyncService.conflicts;
|
|
353
|
-
const andSeparator = ( localize(
|
|
353
|
+
const andSeparator = ( localize(14360, ' and '));
|
|
354
354
|
let conflictsText = '';
|
|
355
355
|
for (let i = 0; i < conflicts.length; i++) {
|
|
356
356
|
if (i === conflicts.length - 1 && i !== 0) {
|
|
@@ -364,11 +364,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
364
364
|
const singleConflictResource = conflicts.length === 1 ? getSyncAreaLabel(conflicts[0].syncResource) : undefined;
|
|
365
365
|
await this.dialogService.prompt({
|
|
366
366
|
type: Severity.Warning,
|
|
367
|
-
message: ( localize(
|
|
368
|
-
detail: ( localize(
|
|
367
|
+
message: ( localize(14361, "Conflicts Detected in {0}", conflictsText)),
|
|
368
|
+
detail: ( localize(14362, "Please resolve conflicts to turn on...")),
|
|
369
369
|
buttons: [
|
|
370
370
|
{
|
|
371
|
-
label: ( localize(
|
|
371
|
+
label: ( localize(14363, "&&Show Conflicts")),
|
|
372
372
|
run: async () => {
|
|
373
373
|
const waitUntilConflictsAreResolvedPromise = raceCancellationError(Event.toPromise(Event.filter(this.userDataSyncService.onDidChangeConflicts, conficts => conficts.length === 0)), token);
|
|
374
374
|
await this.showConflicts(this.userDataSyncService.conflicts[0]?.conflicts[0]);
|
|
@@ -376,11 +376,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
378
|
{
|
|
379
|
-
label: singleConflictResource ? ( localize(
|
|
379
|
+
label: singleConflictResource ? ( localize(14364, "Accept &&Remote {0}", singleConflictResource)) : ( localize(14365, "Accept &&Remote")),
|
|
380
380
|
run: async () => this.replace(true)
|
|
381
381
|
},
|
|
382
382
|
{
|
|
383
|
-
label: singleConflictResource ? ( localize(
|
|
383
|
+
label: singleConflictResource ? ( localize(14366, "Accept &&Local {0}", singleConflictResource)) : ( localize(14367, "Accept &&Local")),
|
|
384
384
|
run: () => this.replace(false)
|
|
385
385
|
},
|
|
386
386
|
],
|
|
@@ -415,11 +415,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
415
415
|
const { confirmed } = await this.dialogService.confirm({
|
|
416
416
|
type: 'info',
|
|
417
417
|
message: ( localize(
|
|
418
|
-
|
|
418
|
+
14368,
|
|
419
419
|
"This will clear your data in the cloud and stop sync on all your devices."
|
|
420
420
|
)),
|
|
421
|
-
title: ( localize(
|
|
422
|
-
primaryButton: ( localize(
|
|
421
|
+
title: ( localize(14369, "Clear")),
|
|
422
|
+
primaryButton: ( localize(14370, "&&Reset")),
|
|
423
423
|
});
|
|
424
424
|
if (confirmed) {
|
|
425
425
|
await this.userDataSyncService.resetRemote();
|
|
@@ -452,11 +452,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
452
452
|
}
|
|
453
453
|
async downloadSyncActivity() {
|
|
454
454
|
const result = await this.fileDialogService.showOpenDialog({
|
|
455
|
-
title: ( localize(
|
|
455
|
+
title: ( localize(14371, "Select folder to download Settings Sync activity")),
|
|
456
456
|
canSelectFiles: false,
|
|
457
457
|
canSelectFolders: true,
|
|
458
458
|
canSelectMany: false,
|
|
459
|
-
openLabel: ( localize(
|
|
459
|
+
openLabel: ( localize(14372, "Save")),
|
|
460
460
|
});
|
|
461
461
|
if (!result?.[0]) {
|
|
462
462
|
return;
|
|
@@ -512,7 +512,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
512
512
|
else {
|
|
513
513
|
if (!this.authenticationProviders.length) {
|
|
514
514
|
throw ( new Error(( localize(
|
|
515
|
-
|
|
515
|
+
14373,
|
|
516
516
|
"Cannot sign in because there are no authentication providers available."
|
|
517
517
|
))));
|
|
518
518
|
}
|
|
@@ -554,7 +554,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
554
554
|
quickPick.title = SYNC_TITLE.value;
|
|
555
555
|
quickPick.ok = false;
|
|
556
556
|
quickPick.ignoreFocusOut = true;
|
|
557
|
-
quickPick.placeholder = ( localize(
|
|
557
|
+
quickPick.placeholder = ( localize(14374, "Select an account to sign in"));
|
|
558
558
|
quickPick.show();
|
|
559
559
|
if (authenticationProviders.length > 1) {
|
|
560
560
|
quickPick.busy = true;
|
|
@@ -592,26 +592,26 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
592
592
|
createQuickpickItems(authenticationProviders, allAccounts) {
|
|
593
593
|
const quickPickItems = [];
|
|
594
594
|
if (allAccounts.size) {
|
|
595
|
-
quickPickItems.push({ type: 'separator', label: ( localize(
|
|
595
|
+
quickPickItems.push({ type: 'separator', label: ( localize(14375, "Signed in")) });
|
|
596
596
|
for (const authenticationProvider of authenticationProviders) {
|
|
597
597
|
const accounts = (allAccounts.get(authenticationProvider.id) || []).sort(({ sessionId }) => sessionId === this.currentSessionId ? -1 : 1);
|
|
598
598
|
const providerName = this.authenticationService.getProvider(authenticationProvider.id).label;
|
|
599
599
|
for (const account of accounts) {
|
|
600
600
|
quickPickItems.push({
|
|
601
601
|
label: `${account.accountName} (${providerName})`,
|
|
602
|
-
description: account.sessionId === this.current?.sessionId ? ( localize(
|
|
602
|
+
description: account.sessionId === this.current?.sessionId ? ( localize(14376, "Last Used with Sync")) : undefined,
|
|
603
603
|
account,
|
|
604
604
|
authenticationProvider,
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
quickPickItems.push({ type: 'separator', label: ( localize(
|
|
608
|
+
quickPickItems.push({ type: 'separator', label: ( localize(14377, "Others")) });
|
|
609
609
|
}
|
|
610
610
|
for (const authenticationProvider of authenticationProviders) {
|
|
611
611
|
const provider = this.authenticationService.getProvider(authenticationProvider.id);
|
|
612
612
|
if (!( allAccounts.has(authenticationProvider.id)) || provider.supportsMultipleAccounts) {
|
|
613
613
|
const providerName = provider.label;
|
|
614
|
-
quickPickItems.push({ label: ( localize(
|
|
614
|
+
quickPickItems.push({ label: ( localize(14378, "Sign in with {0}", providerName)), authenticationProvider });
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
return quickPickItems;
|