@codingame/monaco-vscode-user-data-sync-service-override 18.1.2 → 18.2.0
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 +15 -15
- 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": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - user-data-sync service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "18.
|
|
19
|
-
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "18.
|
|
20
|
-
"@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "18.
|
|
21
|
-
"@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common": "18.
|
|
22
|
-
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "18.
|
|
23
|
-
"@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common": "18.
|
|
24
|
-
"@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common": "18.
|
|
25
|
-
"@codingame/monaco-vscode-a022e9a8-b522-5ea2-97c7-f3dda2b0b597-common": "18.
|
|
26
|
-
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "18.
|
|
27
|
-
"@codingame/monaco-vscode-api": "18.
|
|
28
|
-
"@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common": "18.
|
|
29
|
-
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "18.
|
|
30
|
-
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "18.
|
|
31
|
-
"@codingame/monaco-vscode-user-data-profile-service-override": "18.
|
|
18
|
+
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "18.2.0",
|
|
19
|
+
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "18.2.0",
|
|
20
|
+
"@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "18.2.0",
|
|
21
|
+
"@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common": "18.2.0",
|
|
22
|
+
"@codingame/monaco-vscode-4a316137-39d1-5d77-8b53-112db3547c1e-common": "18.2.0",
|
|
23
|
+
"@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common": "18.2.0",
|
|
24
|
+
"@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common": "18.2.0",
|
|
25
|
+
"@codingame/monaco-vscode-a022e9a8-b522-5ea2-97c7-f3dda2b0b597-common": "18.2.0",
|
|
26
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "18.2.0",
|
|
27
|
+
"@codingame/monaco-vscode-api": "18.2.0",
|
|
28
|
+
"@codingame/monaco-vscode-e72c94ca-257a-5b75-8b68-5a5fa3c18255-common": "18.2.0",
|
|
29
|
+
"@codingame/monaco-vscode-f22e7e55-aee8-5b52-a6bc-950efd9f5890-common": "18.2.0",
|
|
30
|
+
"@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common": "18.2.0",
|
|
31
|
+
"@codingame/monaco-vscode-user-data-profile-service-override": "18.2.0"
|
|
32
32
|
},
|
|
33
33
|
"main": "index.js",
|
|
34
34
|
"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
|
+
11641,
|
|
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
|
+
11642,
|
|
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(11643, "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(11644, "Reload")) : ( localize(11645, "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(11646, "Operation Id: {0}", error.operationId)) : undefined;
|
|
66
66
|
const message = ( localize(
|
|
67
|
-
|
|
67
|
+
11647,
|
|
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(11648, "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(11643, "Show Log")),
|
|
79
79
|
run: () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)
|
|
80
80
|
})
|
|
81
81
|
]
|
|
@@ -51,24 +51,24 @@ import { PromptsConfig } from '@codingame/monaco-vscode-47472025-cc45-5680-86cd-
|
|
|
51
51
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
52
52
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
53
53
|
|
|
54
|
-
const turnOffSyncCommand = { id: 'workbench.userDataSync.actions.turnOff', title: ( localize2(
|
|
55
|
-
const configureSyncCommand = { id: CONFIGURE_SYNC_COMMAND_ID, title: ( localize2(
|
|
54
|
+
const turnOffSyncCommand = { id: 'workbench.userDataSync.actions.turnOff', title: ( localize2(11649, 'Turn Off')) };
|
|
55
|
+
const configureSyncCommand = { id: CONFIGURE_SYNC_COMMAND_ID, title: ( localize2(11650, 'Configure...')) };
|
|
56
56
|
const showConflictsCommandId = 'workbench.userDataSync.actions.showConflicts';
|
|
57
57
|
const syncNowCommand = {
|
|
58
58
|
id: 'workbench.userDataSync.actions.syncNow',
|
|
59
|
-
title: ( localize2(
|
|
59
|
+
title: ( localize2(11651, 'Sync Now')),
|
|
60
60
|
description(userDataSyncService) {
|
|
61
61
|
if (userDataSyncService.status === SyncStatus.Syncing) {
|
|
62
|
-
return localize(
|
|
62
|
+
return localize(11652, "syncing");
|
|
63
63
|
}
|
|
64
64
|
if (userDataSyncService.lastSyncTime) {
|
|
65
|
-
return localize(
|
|
65
|
+
return localize(11653, "synced {0}", fromNow(userDataSyncService.lastSyncTime, true));
|
|
66
66
|
}
|
|
67
67
|
return undefined;
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
const showSyncSettingsCommand = { id: 'workbench.userDataSync.actions.settings', title: ( localize2(
|
|
71
|
-
const showSyncedDataCommand = { id: 'workbench.userDataSync.actions.showSyncedData', title: ( localize2(
|
|
70
|
+
const showSyncSettingsCommand = { id: 'workbench.userDataSync.actions.settings', title: ( localize2(11654, 'Show Settings')), };
|
|
71
|
+
const showSyncedDataCommand = { id: 'workbench.userDataSync.actions.showSyncedData', title: ( localize2(11655, 'Show Synced Data')), };
|
|
72
72
|
const CONTEXT_TURNING_ON_STATE = ( new RawContextKey('userDataSyncTurningOn', false));
|
|
73
73
|
let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution extends Disposable {
|
|
74
74
|
constructor(userDataSyncEnablementService, userDataSyncService, userDataSyncWorkbenchService, contextKeyService, activityService, notificationService, editorService, userDataProfileService, dialogService, quickInputService, instantiationService, outputService, userDataAutoSyncService, textModelResolverService, preferencesService, telemetryService, productService, openerService, authenticationService, userDataSyncStoreManagementService, hostService, commandService, workbenchIssueService, configService) {
|
|
@@ -147,24 +147,24 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
147
147
|
if (!( this.conflictsDisposables.has(key))) {
|
|
148
148
|
const conflictsArea = getSyncAreaLabel(conflict.syncResource);
|
|
149
149
|
const handle = this.notificationService.prompt(Severity.Warning, ( localize(
|
|
150
|
-
|
|
150
|
+
11656,
|
|
151
151
|
"Unable to sync due to conflicts in {0}. Please resolve them to continue.",
|
|
152
152
|
conflictsArea.toLowerCase()
|
|
153
153
|
)), [
|
|
154
154
|
{
|
|
155
|
-
label: ( localize(
|
|
155
|
+
label: ( localize(11657, "Replace Remote")),
|
|
156
156
|
run: () => {
|
|
157
157
|
this.acceptLocal(conflict, conflict.conflicts[0]);
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
label: ( localize(
|
|
161
|
+
label: ( localize(11658, "Replace Local")),
|
|
162
162
|
run: () => {
|
|
163
163
|
this.acceptRemote(conflict, conflict.conflicts[0]);
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
|
-
label: ( localize(
|
|
167
|
+
label: ( localize(11659, "Show Conflicts")),
|
|
168
168
|
run: () => {
|
|
169
169
|
this.telemetryService.publicLog2('sync/showConflicts', { source: conflict.syncResource });
|
|
170
170
|
this.userDataSyncWorkbenchService.showConflicts(conflict.conflicts[0]);
|
|
@@ -191,7 +191,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
191
191
|
}
|
|
192
192
|
catch (e) {
|
|
193
193
|
this.notificationService.error(( localize(
|
|
194
|
-
|
|
194
|
+
11660,
|
|
195
195
|
"Error while accepting changes. Please check [logs]({0}) for more details.",
|
|
196
196
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
197
197
|
)));
|
|
@@ -203,7 +203,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
203
203
|
}
|
|
204
204
|
catch (e) {
|
|
205
205
|
this.notificationService.error(( localize(
|
|
206
|
-
|
|
206
|
+
11660,
|
|
207
207
|
"Error while accepting changes. Please check [logs]({0}) for more details.",
|
|
208
208
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
209
209
|
)));
|
|
@@ -215,13 +215,13 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
215
215
|
this.notificationService.notify({
|
|
216
216
|
severity: Severity.Info,
|
|
217
217
|
message: ( localize(
|
|
218
|
-
|
|
218
|
+
11661,
|
|
219
219
|
"Settings sync was turned off because current session is expired, please sign in again to turn on sync."
|
|
220
220
|
)),
|
|
221
221
|
actions: {
|
|
222
222
|
primary: [toAction({
|
|
223
223
|
id: 'turn on sync',
|
|
224
|
-
label: ( localize(
|
|
224
|
+
label: ( localize(11662, "Turn on Settings Sync...")),
|
|
225
225
|
run: () => this.turnOn()
|
|
226
226
|
})]
|
|
227
227
|
}
|
|
@@ -231,13 +231,13 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
231
231
|
this.notificationService.notify({
|
|
232
232
|
severity: Severity.Info,
|
|
233
233
|
message: ( localize(
|
|
234
|
-
|
|
234
|
+
11663,
|
|
235
235
|
"Settings sync was turned off from another device, please turn on sync again."
|
|
236
236
|
)),
|
|
237
237
|
actions: {
|
|
238
238
|
primary: [toAction({
|
|
239
239
|
id: 'turn on sync',
|
|
240
|
-
label: ( localize(
|
|
240
|
+
label: ( localize(11662, "Turn on Settings Sync...")),
|
|
241
241
|
run: () => this.turnOn()
|
|
242
242
|
})]
|
|
243
243
|
}
|
|
@@ -248,7 +248,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
248
248
|
this.disableSync(error.resource);
|
|
249
249
|
const sourceArea = getSyncAreaLabel(error.resource);
|
|
250
250
|
this.handleTooLargeError(error.resource, ( localize(
|
|
251
|
-
|
|
251
|
+
11664,
|
|
252
252
|
"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",
|
|
253
253
|
sourceArea.toLowerCase(),
|
|
254
254
|
sourceArea.toLowerCase(),
|
|
@@ -259,7 +259,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
259
259
|
case UserDataSyncErrorCode.LocalTooManyProfiles:
|
|
260
260
|
this.disableSync(SyncResource.Profiles);
|
|
261
261
|
this.notificationService.error(( localize(
|
|
262
|
-
|
|
262
|
+
11665,
|
|
263
263
|
"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"
|
|
264
264
|
)));
|
|
265
265
|
break;
|
|
@@ -267,12 +267,12 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
267
267
|
case UserDataSyncErrorCode.Gone:
|
|
268
268
|
case UserDataSyncErrorCode.UpgradeRequired: {
|
|
269
269
|
const message = ( localize(
|
|
270
|
-
|
|
270
|
+
11666,
|
|
271
271
|
"Settings sync is disabled because the current version ({0}, {1}) is not compatible with the sync service. Please update before turning on sync.",
|
|
272
272
|
this.productService.version,
|
|
273
273
|
this.productService.commit
|
|
274
274
|
));
|
|
275
|
-
const operationId = error.operationId ? ( localize(
|
|
275
|
+
const operationId = error.operationId ? ( localize(11667, "Operation Id: {0}", error.operationId)) : undefined;
|
|
276
276
|
this.notificationService.notify({
|
|
277
277
|
severity: Severity.Error,
|
|
278
278
|
message: operationId ? `${message} ${operationId}` : message,
|
|
@@ -281,10 +281,10 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
281
281
|
}
|
|
282
282
|
case UserDataSyncErrorCode.MethodNotFound: {
|
|
283
283
|
const message = ( localize(
|
|
284
|
-
|
|
284
|
+
11668,
|
|
285
285
|
"Settings sync is disabled because the client is making invalid requests. Please report an issue with the logs."
|
|
286
286
|
));
|
|
287
|
-
const operationId = error.operationId ? ( localize(
|
|
287
|
+
const operationId = error.operationId ? ( localize(11667, "Operation Id: {0}", error.operationId)) : undefined;
|
|
288
288
|
this.notificationService.notify({
|
|
289
289
|
severity: Severity.Error,
|
|
290
290
|
message: operationId ? `${message} ${operationId}` : message,
|
|
@@ -292,12 +292,12 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
292
292
|
primary: [
|
|
293
293
|
toAction({
|
|
294
294
|
id: 'Show Sync Logs',
|
|
295
|
-
label: ( localize(
|
|
295
|
+
label: ( localize(11669, "Show Log")),
|
|
296
296
|
run: () => this.commandService.executeCommand(SHOW_SYNC_LOG_COMMAND_ID)
|
|
297
297
|
}),
|
|
298
298
|
toAction({
|
|
299
299
|
id: 'Report Issue',
|
|
300
|
-
label: ( localize(
|
|
300
|
+
label: ( localize(11670, "Report Issue")),
|
|
301
301
|
run: () => this.workbenchIssueService.openReporter()
|
|
302
302
|
})
|
|
303
303
|
]
|
|
@@ -309,19 +309,19 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
309
309
|
this.notificationService.notify({
|
|
310
310
|
severity: Severity.Error,
|
|
311
311
|
message: ( localize(
|
|
312
|
-
|
|
312
|
+
11671,
|
|
313
313
|
"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."
|
|
314
314
|
)),
|
|
315
315
|
actions: {
|
|
316
316
|
primary: [
|
|
317
317
|
toAction({
|
|
318
318
|
id: 'reset',
|
|
319
|
-
label: ( localize(
|
|
319
|
+
label: ( localize(11672, "Clear Data in Cloud...")),
|
|
320
320
|
run: () => this.userDataSyncWorkbenchService.resetSyncedData()
|
|
321
321
|
}),
|
|
322
322
|
toAction({
|
|
323
323
|
id: 'show synced data',
|
|
324
|
-
label: ( localize(
|
|
324
|
+
label: ( localize(11673, "Show Synced Data")),
|
|
325
325
|
run: () => this.userDataSyncWorkbenchService.showSyncActivity()
|
|
326
326
|
})
|
|
327
327
|
]
|
|
@@ -332,8 +332,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
332
332
|
this.notificationService.notify({
|
|
333
333
|
severity: Severity.Info,
|
|
334
334
|
message: this.userDataSyncStoreManagementService.userDataSyncStore?.type === 'insiders' ?
|
|
335
|
-
( localize(
|
|
336
|
-
( localize(
|
|
335
|
+
( localize(11674, "Settings Sync has been switched to insiders service")) :
|
|
336
|
+
( localize(11675, "Settings Sync has been switched to stable service")),
|
|
337
337
|
});
|
|
338
338
|
return;
|
|
339
339
|
case UserDataSyncErrorCode.DefaultServiceChanged:
|
|
@@ -341,7 +341,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
341
341
|
this.notificationService.notify({
|
|
342
342
|
severity: Severity.Info,
|
|
343
343
|
message: ( localize(
|
|
344
|
-
|
|
344
|
+
11676,
|
|
345
345
|
"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)."
|
|
346
346
|
)),
|
|
347
347
|
});
|
|
@@ -350,14 +350,14 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
350
350
|
this.notificationService.notify({
|
|
351
351
|
severity: Severity.Info,
|
|
352
352
|
message: ( localize(
|
|
353
|
-
|
|
353
|
+
11677,
|
|
354
354
|
"Settings sync was turned off because {0} now uses a separate service. Please turn on sync again.",
|
|
355
355
|
this.productService.nameLong
|
|
356
356
|
)),
|
|
357
357
|
actions: {
|
|
358
358
|
primary: [toAction({
|
|
359
359
|
id: 'turn on sync',
|
|
360
|
-
label: ( localize(
|
|
360
|
+
label: ( localize(11662, "Turn on Settings Sync...")),
|
|
361
361
|
run: () => this.turnOn()
|
|
362
362
|
})]
|
|
363
363
|
}
|
|
@@ -367,14 +367,14 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
handleTooLargeError(resource, message, error) {
|
|
370
|
-
const operationId = error.operationId ? ( localize(
|
|
370
|
+
const operationId = error.operationId ? ( localize(11667, "Operation Id: {0}", error.operationId)) : undefined;
|
|
371
371
|
this.notificationService.notify({
|
|
372
372
|
severity: Severity.Error,
|
|
373
373
|
message: operationId ? `${message} ${operationId}` : message,
|
|
374
374
|
actions: {
|
|
375
375
|
primary: [toAction({
|
|
376
376
|
id: 'open sync file',
|
|
377
|
-
label: ( localize(
|
|
377
|
+
label: ( localize(11678, "Open {0} File", getSyncAreaLabel(resource))),
|
|
378
378
|
run: () => resource === SyncResource.Settings ? this.preferencesService.openUserSettings({ jsonEditor: true }) : this.preferencesService.openGlobalKeybindingSettings(true)
|
|
379
379
|
})]
|
|
380
380
|
}
|
|
@@ -428,14 +428,14 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
428
428
|
const handle = this.notificationService.notify({
|
|
429
429
|
severity: Severity.Error,
|
|
430
430
|
message: ( localize(
|
|
431
|
-
|
|
431
|
+
11679,
|
|
432
432
|
"Unable to sync {0} because the content in the file is not valid. Please open the file and correct it.",
|
|
433
433
|
errorArea.toLowerCase()
|
|
434
434
|
)),
|
|
435
435
|
actions: {
|
|
436
436
|
primary: [toAction({
|
|
437
437
|
id: 'open sync file',
|
|
438
|
-
label: ( localize(
|
|
438
|
+
label: ( localize(11678, "Open {0} File", errorArea)),
|
|
439
439
|
run: () => source === SyncResource.Settings ? this.preferencesService.openUserSettings({ jsonEditor: true }) : this.preferencesService.openGlobalKeybindingSettings(true)
|
|
440
440
|
})]
|
|
441
441
|
}
|
|
@@ -452,10 +452,10 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
452
452
|
this.globalActivityBadgeDisposable.clear();
|
|
453
453
|
let badge = undefined;
|
|
454
454
|
if (this.userDataSyncService.conflicts.length && this.userDataSyncEnablementService.isEnabled()) {
|
|
455
|
-
badge = ( new NumberBadge(this.getConflictsCount(), () => ( localize(
|
|
455
|
+
badge = ( new NumberBadge(this.getConflictsCount(), () => ( localize(11680, "{0}: Conflicts Detected", SYNC_TITLE.value))));
|
|
456
456
|
}
|
|
457
457
|
else if (this.turningOnSync) {
|
|
458
|
-
badge = ( new ProgressBadge(() => ( localize(
|
|
458
|
+
badge = ( new ProgressBadge(() => ( localize(11681, "Turning on Settings Sync..."))));
|
|
459
459
|
}
|
|
460
460
|
if (badge) {
|
|
461
461
|
this.globalActivityBadgeDisposable.value = this.activityService.showGlobalActivity({ badge });
|
|
@@ -465,7 +465,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
465
465
|
this.accountBadgeDisposable.clear();
|
|
466
466
|
let badge = undefined;
|
|
467
467
|
if (this.userDataSyncService.status !== SyncStatus.Uninitialized && this.userDataSyncEnablementService.isEnabled() && this.userDataSyncWorkbenchService.accountStatus === AccountStatus.Unavailable) {
|
|
468
|
-
badge = ( new NumberBadge(1, () => ( localize(
|
|
468
|
+
badge = ( new NumberBadge(1, () => ( localize(11682, "Sign in to Sync Settings"))));
|
|
469
469
|
}
|
|
470
470
|
if (badge) {
|
|
471
471
|
this.accountBadgeDisposable.value = this.activityService.showAccountsActivity({ badge });
|
|
@@ -474,7 +474,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
474
474
|
async turnOn() {
|
|
475
475
|
try {
|
|
476
476
|
if (!this.userDataSyncWorkbenchService.authenticationProviders.length) {
|
|
477
|
-
throw ( new Error(( localize(
|
|
477
|
+
throw ( new Error(( localize(11683, "No authentication providers are available."))));
|
|
478
478
|
}
|
|
479
479
|
const turnOn = await this.askToConfigure();
|
|
480
480
|
if (!turnOn) {
|
|
@@ -494,7 +494,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
494
494
|
case UserDataSyncErrorCode.TooLarge:
|
|
495
495
|
if (e.resource === SyncResource.Keybindings || e.resource === SyncResource.Settings || e.resource === SyncResource.Tasks) {
|
|
496
496
|
this.handleTooLargeError(e.resource, ( localize(
|
|
497
|
-
|
|
497
|
+
11684,
|
|
498
498
|
"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",
|
|
499
499
|
getSyncAreaLabel(e.resource).toLowerCase(),
|
|
500
500
|
'100kb'
|
|
@@ -506,12 +506,12 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
506
506
|
case UserDataSyncErrorCode.Gone:
|
|
507
507
|
case UserDataSyncErrorCode.UpgradeRequired: {
|
|
508
508
|
const message = ( localize(
|
|
509
|
-
|
|
509
|
+
11685,
|
|
510
510
|
"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.",
|
|
511
511
|
this.productService.version,
|
|
512
512
|
this.productService.commit
|
|
513
513
|
));
|
|
514
|
-
const operationId = e.operationId ? ( localize(
|
|
514
|
+
const operationId = e.operationId ? ( localize(11667, "Operation Id: {0}", e.operationId)) : undefined;
|
|
515
515
|
this.notificationService.notify({
|
|
516
516
|
severity: Severity.Error,
|
|
517
517
|
message: operationId ? `${message} ${operationId}` : message,
|
|
@@ -522,19 +522,19 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
522
522
|
this.notificationService.notify({
|
|
523
523
|
severity: Severity.Error,
|
|
524
524
|
message: ( localize(
|
|
525
|
-
|
|
525
|
+
11686,
|
|
526
526
|
"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."
|
|
527
527
|
)),
|
|
528
528
|
actions: {
|
|
529
529
|
primary: [
|
|
530
530
|
toAction({
|
|
531
531
|
id: 'reset',
|
|
532
|
-
label: ( localize(
|
|
532
|
+
label: ( localize(11672, "Clear Data in Cloud...")),
|
|
533
533
|
run: () => this.userDataSyncWorkbenchService.resetSyncedData()
|
|
534
534
|
}),
|
|
535
535
|
toAction({
|
|
536
536
|
id: 'show synced data',
|
|
537
|
-
label: ( localize(
|
|
537
|
+
label: ( localize(11673, "Show Synced Data")),
|
|
538
538
|
run: () => this.userDataSyncWorkbenchService.showSyncActivity()
|
|
539
539
|
})
|
|
540
540
|
]
|
|
@@ -543,17 +543,17 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
543
543
|
return;
|
|
544
544
|
case UserDataSyncErrorCode.Unauthorized:
|
|
545
545
|
case UserDataSyncErrorCode.Forbidden:
|
|
546
|
-
this.notificationService.error(( localize(
|
|
546
|
+
this.notificationService.error(( localize(11687, "Error while turning on Settings Sync: Authentication failed.")));
|
|
547
547
|
return;
|
|
548
548
|
}
|
|
549
549
|
this.notificationService.error(( localize(
|
|
550
|
-
|
|
550
|
+
11688,
|
|
551
551
|
"Error while turning on Settings Sync. Please check [logs]({0}) for more details.",
|
|
552
552
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
553
553
|
)));
|
|
554
554
|
}
|
|
555
555
|
else {
|
|
556
|
-
this.notificationService.error(( localize(
|
|
556
|
+
this.notificationService.error(( localize(11689, "Error while turning on Settings Sync. {0}", getErrorMessage(e))));
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -565,8 +565,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
565
565
|
quickPick.title = SYNC_TITLE.value;
|
|
566
566
|
quickPick.ok = false;
|
|
567
567
|
quickPick.customButton = true;
|
|
568
|
-
quickPick.customLabel = ( localize(
|
|
569
|
-
quickPick.description = ( localize(
|
|
568
|
+
quickPick.customLabel = ( localize(11690, "Sign in"));
|
|
569
|
+
quickPick.description = ( localize(11691, "Please sign in to backup and sync your data across devices."));
|
|
570
570
|
quickPick.canSelectMany = true;
|
|
571
571
|
quickPick.ignoreFocusOut = true;
|
|
572
572
|
quickPick.hideInput = true;
|
|
@@ -641,8 +641,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
641
641
|
const disposables = ( new DisposableStore());
|
|
642
642
|
const quickPick = this.quickInputService.createQuickPick();
|
|
643
643
|
disposables.add(quickPick);
|
|
644
|
-
quickPick.title = ( localize(
|
|
645
|
-
quickPick.placeholder = ( localize(
|
|
644
|
+
quickPick.title = ( localize(11692, "{0}: Configure...", SYNC_TITLE.value));
|
|
645
|
+
quickPick.placeholder = ( localize(11693, "Choose what to sync"));
|
|
646
646
|
quickPick.canSelectMany = true;
|
|
647
647
|
quickPick.ignoreFocusOut = true;
|
|
648
648
|
quickPick.ok = true;
|
|
@@ -664,15 +664,15 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
664
664
|
}
|
|
665
665
|
async turnOff() {
|
|
666
666
|
const result = await this.dialogService.confirm({
|
|
667
|
-
message: ( localize(
|
|
667
|
+
message: ( localize(11694, "Do you want to turn off sync?")),
|
|
668
668
|
detail: ( localize(
|
|
669
|
-
|
|
669
|
+
11695,
|
|
670
670
|
"Your settings, keybindings, extensions, snippets and UI State will no longer be synced."
|
|
671
671
|
)),
|
|
672
|
-
primaryButton: ( localize(
|
|
672
|
+
primaryButton: ( localize(11696, "&&Turn off")),
|
|
673
673
|
checkbox: this.userDataSyncWorkbenchService.accountStatus === AccountStatus.Available ? {
|
|
674
674
|
label: ( localize(
|
|
675
|
-
|
|
675
|
+
11697,
|
|
676
676
|
"Turn off sync on all your devices and clear the data from the cloud."
|
|
677
677
|
))
|
|
678
678
|
} : undefined
|
|
@@ -699,9 +699,9 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
699
699
|
return (new Promise((c, e) => {
|
|
700
700
|
const disposables = ( new DisposableStore());
|
|
701
701
|
const quickPick = disposables.add(this.quickInputService.createQuickPick());
|
|
702
|
-
quickPick.title = ( localize(
|
|
702
|
+
quickPick.title = ( localize(11698, "{0}: Select Service", SYNC_TITLE.value));
|
|
703
703
|
quickPick.description = ( localize(
|
|
704
|
-
|
|
704
|
+
11699,
|
|
705
705
|
"Ensure you are using the same settings sync service when syncing with multiple environments"
|
|
706
706
|
));
|
|
707
707
|
quickPick.hideInput = true;
|
|
@@ -709,19 +709,19 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
709
709
|
const getDescription = (url) => {
|
|
710
710
|
const isDefault = isEqual(url, userDataSyncStore.defaultUrl);
|
|
711
711
|
if (isDefault) {
|
|
712
|
-
return localize(
|
|
712
|
+
return localize(11700, "Default");
|
|
713
713
|
}
|
|
714
714
|
return undefined;
|
|
715
715
|
};
|
|
716
716
|
quickPick.items = [
|
|
717
717
|
{
|
|
718
718
|
id: 'insiders',
|
|
719
|
-
label: ( localize(
|
|
719
|
+
label: ( localize(11701, "Insiders")),
|
|
720
720
|
description: getDescription(userDataSyncStore.insidersUrl)
|
|
721
721
|
},
|
|
722
722
|
{
|
|
723
723
|
id: 'stable',
|
|
724
|
-
label: ( localize(
|
|
724
|
+
label: ( localize(11702, "Stable")),
|
|
725
725
|
description: getDescription(userDataSyncStore.stableUrl)
|
|
726
726
|
}
|
|
727
727
|
];
|
|
@@ -770,7 +770,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
770
770
|
constructor() {
|
|
771
771
|
super({
|
|
772
772
|
id: 'workbench.userDataSync.actions.turnOn',
|
|
773
|
-
title: ( localize2(
|
|
773
|
+
title: ( localize2(11703, 'Backup and Sync Settings...')),
|
|
774
774
|
category: SYNC_TITLE,
|
|
775
775
|
f1: true,
|
|
776
776
|
precondition: when,
|
|
@@ -803,7 +803,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
803
803
|
constructor() {
|
|
804
804
|
super({
|
|
805
805
|
id: 'workbench.userData.actions.turningOn',
|
|
806
|
-
title: ( localize(
|
|
806
|
+
title: ( localize(11704, "Turning on Settings Sync...")),
|
|
807
807
|
precondition: ( ContextKeyExpr.false()),
|
|
808
808
|
menu: [{
|
|
809
809
|
group: '3_configuration',
|
|
@@ -826,7 +826,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
826
826
|
constructor() {
|
|
827
827
|
super({
|
|
828
828
|
id: 'workbench.userData.actions.cancelTurnOn',
|
|
829
|
-
title: ( localize(
|
|
829
|
+
title: ( localize(11705, "Cancel")),
|
|
830
830
|
icon: Codicon.stopCircle,
|
|
831
831
|
menu: {
|
|
832
832
|
id: MenuId.ViewContainerTitle,
|
|
@@ -849,7 +849,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
849
849
|
constructor() {
|
|
850
850
|
super({
|
|
851
851
|
id: 'workbench.userData.actions.signin',
|
|
852
|
-
title: ( localize(
|
|
852
|
+
title: ( localize(11706, "Sign in to Sync Settings")),
|
|
853
853
|
menu: {
|
|
854
854
|
group: '3_configuration',
|
|
855
855
|
id: MenuId.GlobalActivity,
|
|
@@ -871,13 +871,13 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
871
871
|
group: '1_settings',
|
|
872
872
|
command: {
|
|
873
873
|
id,
|
|
874
|
-
title: ( localize(
|
|
874
|
+
title: ( localize(11707, "Sign in to Sync Settings (1)")),
|
|
875
875
|
},
|
|
876
876
|
when
|
|
877
877
|
})));
|
|
878
878
|
}
|
|
879
879
|
getShowConflictsTitle() {
|
|
880
|
-
return localize2(
|
|
880
|
+
return localize2(11708, "Show Conflicts ({0})", this.getConflictsCount());
|
|
881
881
|
}
|
|
882
882
|
registerShowConflictsAction() {
|
|
883
883
|
this.conflictsActionDisposable.value = undefined;
|
|
@@ -915,7 +915,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
915
915
|
constructor() {
|
|
916
916
|
super({
|
|
917
917
|
id: 'workbench.userDataSync.actions.manage',
|
|
918
|
-
title: ( localize(
|
|
918
|
+
title: ( localize(11709, "Settings Sync is On")),
|
|
919
919
|
toggled: ContextKeyTrueExpr.INSTANCE,
|
|
920
920
|
menu: [
|
|
921
921
|
{
|
|
@@ -1036,7 +1036,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1036
1036
|
catch (e) {
|
|
1037
1037
|
if (!isCancellationError(e)) {
|
|
1038
1038
|
that.notificationService.error(( localize(
|
|
1039
|
-
|
|
1039
|
+
11710,
|
|
1040
1040
|
"Error while turning off Settings Sync. Please check [logs]({0}) for more details.",
|
|
1041
1041
|
`command:${SHOW_SYNC_LOG_COMMAND_ID}`
|
|
1042
1042
|
)));
|
|
@@ -1055,7 +1055,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1055
1055
|
title: configureSyncCommand.title,
|
|
1056
1056
|
category: SYNC_TITLE,
|
|
1057
1057
|
icon: Codicon.settingsGear,
|
|
1058
|
-
tooltip: ( localize(
|
|
1058
|
+
tooltip: ( localize(11711, "Configure...")),
|
|
1059
1059
|
menu: [{
|
|
1060
1060
|
id: MenuId.CommandPalette,
|
|
1061
1061
|
when
|
|
@@ -1076,8 +1076,8 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1076
1076
|
constructor() {
|
|
1077
1077
|
super({
|
|
1078
1078
|
id: SHOW_SYNC_LOG_COMMAND_ID,
|
|
1079
|
-
title: ( localize(
|
|
1080
|
-
tooltip: ( localize(
|
|
1079
|
+
title: ( localize(11712, "{0}: Show Log", SYNC_TITLE.value)),
|
|
1080
|
+
tooltip: ( localize(11713, "Show Log")),
|
|
1081
1081
|
icon: Codicon.output,
|
|
1082
1082
|
menu: [{
|
|
1083
1083
|
id: MenuId.CommandPalette,
|
|
@@ -1142,7 +1142,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1142
1142
|
constructor() {
|
|
1143
1143
|
super({
|
|
1144
1144
|
id: 'workbench.userDataSync.actions.acceptMerges',
|
|
1145
|
-
title: ( localize(
|
|
1145
|
+
title: ( localize(11714, "Complete Merge")),
|
|
1146
1146
|
menu: [{
|
|
1147
1147
|
id: MenuId.EditorContent,
|
|
1148
1148
|
when: ( ContextKeyExpr.and(ctxIsMergeResultEditor, ( ContextKeyExpr.regex(ctxMergeBaseUri.key, ( new RegExp(`^${USER_DATA_SYNC_SCHEME}:`)))))),
|
|
@@ -1174,7 +1174,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1174
1174
|
const notificationService = accessor.get(INotificationService);
|
|
1175
1175
|
const folder = await userDataSyncWorkbenchService.downloadSyncActivity();
|
|
1176
1176
|
if (folder) {
|
|
1177
|
-
notificationService.info(( localize(
|
|
1177
|
+
notificationService.info(( localize(11715, "Successfully downloaded Settings Sync activity.")));
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
}));
|
|
@@ -1201,7 +1201,7 @@ let UserDataSyncWorkbenchContribution = class UserDataSyncWorkbenchContribution
|
|
|
1201
1201
|
constructor() {
|
|
1202
1202
|
super({
|
|
1203
1203
|
id: 'workbench.actions.syncData.reset',
|
|
1204
|
-
title: ( localize(
|
|
1204
|
+
title: ( localize(11716, "Clear Data in Cloud...")),
|
|
1205
1205
|
menu: [{
|
|
1206
1206
|
id: MenuId.ViewContainerTitle,
|
|
1207
1207
|
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(11717, "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(11718, "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(11719, "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(11720, "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(11721, "{0} (Remote)", basename(conflictToOpen.remoteResource)));
|
|
164
|
+
const localResourceName = ( localize(11722, "{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(11723, 'Theirs')), description: remoteResourceName },
|
|
167
|
+
input2: { resource: conflictToOpen.localResource, label: ( localize(11724, '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(11725, "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(11726, "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(11727, "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(11728, "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(11729, "Sync Activity (Remote)")) : ( localize2(11730, "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(11731, "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(11732, "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(11733, "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(11734, "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(11735, "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
|
+
11736,
|
|
243
243
|
"{0} ↔ {1}",
|
|
244
|
-
localize(
|
|
245
|
-
localize(
|
|
244
|
+
localize(11737, "{0} (Remote)", basename(remoteResource)),
|
|
245
|
+
localize(11738, "{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(11739, "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
|
+
11740,
|
|
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(11741, "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(11742, "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
|
+
11743,
|
|
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(11744, "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(11744, "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(11745, "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(11744, "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(11746, "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(11747, "Are you sure you want to turn off sync on selected machines?"))
|
|
624
624
|
: ( localize(
|
|
625
|
-
|
|
625
|
+
11748,
|
|
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(11749, "&&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(11750, "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(11746, "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(11751, "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(11752, "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(11753, "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(11744, "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
|
@@ -247,7 +247,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
247
247
|
async turnOn() {
|
|
248
248
|
if (!this.authenticationProviders.length) {
|
|
249
249
|
throw ( new Error(( localize(
|
|
250
|
-
|
|
250
|
+
13156,
|
|
251
251
|
"Settings sync cannot be turned on because there are no authentication providers available."
|
|
252
252
|
))));
|
|
253
253
|
}
|
|
@@ -262,16 +262,16 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
262
262
|
throw ( new CancellationError());
|
|
263
263
|
}
|
|
264
264
|
if (this.accountStatus !== AccountStatus.Available) {
|
|
265
|
-
throw ( new Error(( localize(
|
|
265
|
+
throw ( new Error(( localize(13157, "No account available"))));
|
|
266
266
|
}
|
|
267
267
|
const turnOnSyncCancellationToken = this.turnOnSyncCancellationToken = ( new CancellationTokenSource());
|
|
268
268
|
const disposable = isWeb ? Disposable.None : this.lifecycleService.onBeforeShutdown(e => e.veto((async () => {
|
|
269
269
|
const { confirmed } = await this.dialogService.confirm({
|
|
270
270
|
type: 'warning',
|
|
271
|
-
message: ( localize(
|
|
272
|
-
title: ( localize(
|
|
273
|
-
primaryButton: ( localize(
|
|
274
|
-
cancelButton: ( localize(
|
|
271
|
+
message: ( localize(13158, "Settings Sync is being turned on. Would you like to cancel it?")),
|
|
272
|
+
title: ( localize(13159, "Settings Sync")),
|
|
273
|
+
primaryButton: ( localize(13160, "&&Yes")),
|
|
274
|
+
cancelButton: ( localize(13161, "No"))
|
|
275
275
|
});
|
|
276
276
|
if (confirmed) {
|
|
277
277
|
turnOnSyncCancellationToken.cancel();
|
|
@@ -293,7 +293,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
293
293
|
if (this.environmentService.options?.settingsSyncOptions?.enablementHandler && this.currentAuthenticationProviderId) {
|
|
294
294
|
this.environmentService.options.settingsSyncOptions.enablementHandler(true, this.currentAuthenticationProviderId);
|
|
295
295
|
}
|
|
296
|
-
this.notificationService.info(( localize(
|
|
296
|
+
this.notificationService.info(( localize(13162, "{0} is turned on", SYNC_TITLE.value)));
|
|
297
297
|
this._onDidTurnOnSync.fire();
|
|
298
298
|
}
|
|
299
299
|
async turnoff(everywhere) {
|
|
@@ -334,13 +334,13 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
334
334
|
command: SHOW_SYNC_LOG_COMMAND_ID,
|
|
335
335
|
delay: 500,
|
|
336
336
|
}, async (progress) => {
|
|
337
|
-
progress.report({ message: ( localize(
|
|
337
|
+
progress.report({ message: ( localize(13163, "Turning on...")) });
|
|
338
338
|
disposables.add(this.userDataSyncService.onDidChangeStatus(status => {
|
|
339
339
|
if (status === SyncStatus.HasConflicts) {
|
|
340
|
-
progress.report({ message: ( localize(
|
|
340
|
+
progress.report({ message: ( localize(13164, "Resolving conflicts...")) });
|
|
341
341
|
}
|
|
342
342
|
else {
|
|
343
|
-
progress.report({ message: ( localize(
|
|
343
|
+
progress.report({ message: ( localize(13165, "Turning on...")) });
|
|
344
344
|
}
|
|
345
345
|
}));
|
|
346
346
|
await manualSyncTask.merge();
|
|
@@ -360,7 +360,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
360
360
|
}
|
|
361
361
|
async handleConflictsWhileTurningOn(token) {
|
|
362
362
|
const conflicts = this.userDataSyncService.conflicts;
|
|
363
|
-
const andSeparator = ( localize(
|
|
363
|
+
const andSeparator = ( localize(13166, ' and '));
|
|
364
364
|
let conflictsText = '';
|
|
365
365
|
for (let i = 0; i < conflicts.length; i++) {
|
|
366
366
|
if (i === conflicts.length - 1 && i !== 0) {
|
|
@@ -374,11 +374,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
374
374
|
const singleConflictResource = conflicts.length === 1 ? getSyncAreaLabel(conflicts[0].syncResource) : undefined;
|
|
375
375
|
await this.dialogService.prompt({
|
|
376
376
|
type: Severity.Warning,
|
|
377
|
-
message: ( localize(
|
|
378
|
-
detail: ( localize(
|
|
377
|
+
message: ( localize(13167, "Conflicts Detected in {0}", conflictsText)),
|
|
378
|
+
detail: ( localize(13168, "Please resolve conflicts to turn on...")),
|
|
379
379
|
buttons: [
|
|
380
380
|
{
|
|
381
|
-
label: ( localize(
|
|
381
|
+
label: ( localize(13169, "&&Show Conflicts")),
|
|
382
382
|
run: async () => {
|
|
383
383
|
const waitUntilConflictsAreResolvedPromise = raceCancellationError(Event.toPromise(Event.filter(this.userDataSyncService.onDidChangeConflicts, conficts => conficts.length === 0)), token);
|
|
384
384
|
await this.showConflicts(this.userDataSyncService.conflicts[0]?.conflicts[0]);
|
|
@@ -386,11 +386,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
|
-
label: singleConflictResource ? ( localize(
|
|
389
|
+
label: singleConflictResource ? ( localize(13170, "Accept &&Remote {0}", singleConflictResource)) : ( localize(13171, "Accept &&Remote")),
|
|
390
390
|
run: async () => this.replace(true)
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
|
-
label: singleConflictResource ? ( localize(
|
|
393
|
+
label: singleConflictResource ? ( localize(13172, "Accept &&Local {0}", singleConflictResource)) : ( localize(13173, "Accept &&Local")),
|
|
394
394
|
run: () => this.replace(false)
|
|
395
395
|
},
|
|
396
396
|
],
|
|
@@ -425,11 +425,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
425
425
|
const { confirmed } = await this.dialogService.confirm({
|
|
426
426
|
type: 'info',
|
|
427
427
|
message: ( localize(
|
|
428
|
-
|
|
428
|
+
13174,
|
|
429
429
|
"This will clear your data in the cloud and stop sync on all your devices."
|
|
430
430
|
)),
|
|
431
|
-
title: ( localize(
|
|
432
|
-
primaryButton: ( localize(
|
|
431
|
+
title: ( localize(13175, "Clear")),
|
|
432
|
+
primaryButton: ( localize(13176, "&&Reset")),
|
|
433
433
|
});
|
|
434
434
|
if (confirmed) {
|
|
435
435
|
await this.userDataSyncService.resetRemote();
|
|
@@ -462,11 +462,11 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
462
462
|
}
|
|
463
463
|
async downloadSyncActivity() {
|
|
464
464
|
const result = await this.fileDialogService.showOpenDialog({
|
|
465
|
-
title: ( localize(
|
|
465
|
+
title: ( localize(13177, "Select folder to download Settings Sync activity")),
|
|
466
466
|
canSelectFiles: false,
|
|
467
467
|
canSelectFolders: true,
|
|
468
468
|
canSelectMany: false,
|
|
469
|
-
openLabel: ( localize(
|
|
469
|
+
openLabel: ( localize(13178, "Save")),
|
|
470
470
|
});
|
|
471
471
|
if (!result?.[0]) {
|
|
472
472
|
return;
|
|
@@ -522,7 +522,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
522
522
|
else {
|
|
523
523
|
if (!this.authenticationProviders.length) {
|
|
524
524
|
throw ( new Error(( localize(
|
|
525
|
-
|
|
525
|
+
13179,
|
|
526
526
|
"Cannot sign in because there are no authentication providers available."
|
|
527
527
|
))));
|
|
528
528
|
}
|
|
@@ -564,7 +564,7 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
564
564
|
quickPick.title = SYNC_TITLE.value;
|
|
565
565
|
quickPick.ok = false;
|
|
566
566
|
quickPick.ignoreFocusOut = true;
|
|
567
|
-
quickPick.placeholder = ( localize(
|
|
567
|
+
quickPick.placeholder = ( localize(13180, "Select an account to sign in"));
|
|
568
568
|
quickPick.show();
|
|
569
569
|
if (authenticationProviders.length > 1) {
|
|
570
570
|
quickPick.busy = true;
|
|
@@ -602,26 +602,26 @@ let UserDataSyncWorkbenchService = class UserDataSyncWorkbenchService extends Di
|
|
|
602
602
|
createQuickpickItems(authenticationProviders, allAccounts) {
|
|
603
603
|
const quickPickItems = [];
|
|
604
604
|
if (allAccounts.size) {
|
|
605
|
-
quickPickItems.push({ type: 'separator', label: ( localize(
|
|
605
|
+
quickPickItems.push({ type: 'separator', label: ( localize(13181, "Signed in")) });
|
|
606
606
|
for (const authenticationProvider of authenticationProviders) {
|
|
607
607
|
const accounts = (allAccounts.get(authenticationProvider.id) || []).sort(({ sessionId }) => sessionId === this.currentSessionId ? -1 : 1);
|
|
608
608
|
const providerName = this.authenticationService.getProvider(authenticationProvider.id).label;
|
|
609
609
|
for (const account of accounts) {
|
|
610
610
|
quickPickItems.push({
|
|
611
611
|
label: `${account.accountName} (${providerName})`,
|
|
612
|
-
description: account.sessionId === this.current?.sessionId ? ( localize(
|
|
612
|
+
description: account.sessionId === this.current?.sessionId ? ( localize(13182, "Last Used with Sync")) : undefined,
|
|
613
613
|
account,
|
|
614
614
|
authenticationProvider,
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
quickPickItems.push({ type: 'separator', label: ( localize(
|
|
618
|
+
quickPickItems.push({ type: 'separator', label: ( localize(13183, "Others")) });
|
|
619
619
|
}
|
|
620
620
|
for (const authenticationProvider of authenticationProviders) {
|
|
621
621
|
const provider = this.authenticationService.getProvider(authenticationProvider.id);
|
|
622
622
|
if (!( allAccounts.has(authenticationProvider.id)) || provider.supportsMultipleAccounts) {
|
|
623
623
|
const providerName = provider.label;
|
|
624
|
-
quickPickItems.push({ label: ( localize(
|
|
624
|
+
quickPickItems.push({ label: ( localize(13184, "Sign in with {0}", providerName)), authenticationProvider });
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
return quickPickItems;
|