@codingame/monaco-vscode-dialogs-service-override 27.0.0 → 28.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.js +21 -5
- package/vscode/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +14 -14
- package/vscode/src/vs/workbench/services/dialogs/browser/fileDialogService.js +8 -8
- package/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.js +21 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-dialogs-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - dialogs service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "28.0.1"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -64,7 +64,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
64
64
|
prompt.cancelButton ? buttons.length - 1 : -1,
|
|
65
65
|
prompt.checkbox,
|
|
66
66
|
undefined,
|
|
67
|
-
typeof prompt?.custom === "object" ? prompt.custom : undefined
|
|
67
|
+
typeof prompt?.custom === "object" ? prompt.custom : undefined,
|
|
68
|
+
prompt.token
|
|
68
69
|
);
|
|
69
70
|
return this.getPromptResult(prompt, button, checkboxChecked);
|
|
70
71
|
}
|
|
@@ -82,7 +83,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
82
83
|
buttons.length - 1,
|
|
83
84
|
confirmation.checkbox,
|
|
84
85
|
undefined,
|
|
85
|
-
typeof confirmation?.custom === "object" ? confirmation.custom : undefined
|
|
86
|
+
typeof confirmation?.custom === "object" ? confirmation.custom : undefined,
|
|
87
|
+
confirmation.token
|
|
86
88
|
);
|
|
87
89
|
return {
|
|
88
90
|
confirmed: button === 0,
|
|
@@ -104,7 +106,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
104
106
|
buttons.length - 1,
|
|
105
107
|
input?.checkbox,
|
|
106
108
|
input.inputs,
|
|
107
|
-
typeof input.custom === "object" ? input.custom : undefined
|
|
109
|
+
typeof input.custom === "object" ? input.custom : undefined,
|
|
110
|
+
input.token
|
|
108
111
|
);
|
|
109
112
|
return {
|
|
110
113
|
confirmed: button === 0,
|
|
@@ -115,12 +118,22 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
115
118
|
async about(title, details, detailsToCopy) {
|
|
116
119
|
const {
|
|
117
120
|
button
|
|
118
|
-
} = await this.doShow(Severity.Info, title, [( localize(
|
|
121
|
+
} = await this.doShow(Severity.Info, title, [( localize(3099, "&&Copy")), ( localize(3100, "OK"))], details, 1);
|
|
119
122
|
if (button === 0) {
|
|
120
123
|
this.clipboardService.writeText(detailsToCopy);
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
|
-
async doShow(
|
|
126
|
+
async doShow(
|
|
127
|
+
type,
|
|
128
|
+
message,
|
|
129
|
+
buttons,
|
|
130
|
+
detail,
|
|
131
|
+
cancelId,
|
|
132
|
+
checkbox,
|
|
133
|
+
inputs,
|
|
134
|
+
customOptions,
|
|
135
|
+
token
|
|
136
|
+
) {
|
|
124
137
|
const dialogDisposables = ( new DisposableStore());
|
|
125
138
|
const renderBody = customOptions ? parent => {
|
|
126
139
|
parent.classList.add(...(customOptions.classes || []));
|
|
@@ -159,6 +172,9 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
159
172
|
}, this.keybindingService, this.layoutService, this.hostService, BrowserDialogHandler_1.ALLOWABLE_COMMANDS)
|
|
160
173
|
));
|
|
161
174
|
dialogDisposables.add(dialog);
|
|
175
|
+
if (token) {
|
|
176
|
+
dialogDisposables.add(token.onCancellationRequested(() => dialogDisposables.dispose()));
|
|
177
|
+
}
|
|
162
178
|
const result = await dialog.show();
|
|
163
179
|
dialogDisposables.dispose();
|
|
164
180
|
return result;
|
|
@@ -202,16 +202,16 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
202
202
|
return ConfirmResult.DONT_SAVE;
|
|
203
203
|
}
|
|
204
204
|
let message;
|
|
205
|
-
let detail = ( localize(
|
|
205
|
+
let detail = ( localize(15544, "Your changes will be lost if you don't save them."));
|
|
206
206
|
if (fileNamesOrResources.length === 1) {
|
|
207
207
|
message = ( localize(
|
|
208
|
-
|
|
208
|
+
15545,
|
|
209
209
|
"Do you want to save the changes you made to {0}?",
|
|
210
210
|
typeof fileNamesOrResources[0] === "string" ? fileNamesOrResources[0] : basename(fileNamesOrResources[0])
|
|
211
211
|
));
|
|
212
212
|
} else {
|
|
213
213
|
message = ( localize(
|
|
214
|
-
|
|
214
|
+
15546,
|
|
215
215
|
"Do you want to save the changes to the following {0} files?",
|
|
216
216
|
fileNamesOrResources.length
|
|
217
217
|
));
|
|
@@ -224,10 +224,10 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
224
224
|
message,
|
|
225
225
|
detail,
|
|
226
226
|
buttons: [{
|
|
227
|
-
label: fileNamesOrResources.length > 1 ? ( localize(
|
|
227
|
+
label: fileNamesOrResources.length > 1 ? ( localize(15547, "&&Save All")) : ( localize(15548, "&&Save")),
|
|
228
228
|
run: () => ConfirmResult.SAVE
|
|
229
229
|
}, {
|
|
230
|
-
label: ( localize(
|
|
230
|
+
label: ( localize(15549, "Do&&n't Save")),
|
|
231
231
|
run: () => ConfirmResult.DONT_SAVE
|
|
232
232
|
}],
|
|
233
233
|
cancelButton: {
|
|
@@ -240,7 +240,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
240
240
|
return schema === Schemas.untitled ? [Schemas.file] : (schema !== Schemas.file ? [schema, Schemas.file] : [schema]);
|
|
241
241
|
}
|
|
242
242
|
async pickFileFolderAndOpenSimplified(schema, options, preferNewWindow) {
|
|
243
|
-
const title = ( localize(
|
|
243
|
+
const title = ( localize(15550, "Open File or Folder"));
|
|
244
244
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
245
245
|
const uri = await this.pickResource({
|
|
246
246
|
canSelectFiles: true,
|
|
@@ -279,7 +279,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
async pickFileAndOpenSimplified(schema, options, preferNewWindow) {
|
|
282
|
-
const title = ( localize(
|
|
282
|
+
const title = ( localize(15551, "Open File"));
|
|
283
283
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
284
284
|
const uri = await this.pickResource({
|
|
285
285
|
canSelectFiles: true,
|
|
@@ -320,7 +320,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
320
320
|
}]);
|
|
321
321
|
}
|
|
322
322
|
async pickFolderAndOpenSimplified(schema, options) {
|
|
323
|
-
const title = ( localize(
|
|
323
|
+
const title = ( localize(15552, "Open Folder"));
|
|
324
324
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
|
|
325
325
|
const uri = await this.pickResource({
|
|
326
326
|
canSelectFiles: false,
|
|
@@ -340,9 +340,9 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
async pickWorkspaceAndOpenSimplified(schema, options) {
|
|
343
|
-
const title = ( localize(
|
|
343
|
+
const title = ( localize(15553, "Open Workspace from File"));
|
|
344
344
|
const filters = [{
|
|
345
|
-
name: ( localize(
|
|
345
|
+
name: ( localize(15554, "Workspace")),
|
|
346
346
|
extensions: [WORKSPACE_EXTENSION]
|
|
347
347
|
}];
|
|
348
348
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
|
|
@@ -368,7 +368,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
368
368
|
if (!options.availableFileSystems) {
|
|
369
369
|
options.availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
370
370
|
}
|
|
371
|
-
options.title = ( localize(
|
|
371
|
+
options.title = ( localize(15555, "Save As"));
|
|
372
372
|
const uri = await this.saveRemoteResource(options);
|
|
373
373
|
if (uri) {
|
|
374
374
|
this.addFileToRecentlyOpened(uri);
|
|
@@ -434,7 +434,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
434
434
|
getPickFileToSaveDialogOptions(defaultUri, availableFileSystems) {
|
|
435
435
|
const options = {
|
|
436
436
|
defaultUri,
|
|
437
|
-
title: ( localize(
|
|
437
|
+
title: ( localize(15556, "Save As")),
|
|
438
438
|
availableFileSystems
|
|
439
439
|
};
|
|
440
440
|
const ext = defaultUri ? extname(defaultUri) : undefined;
|
|
@@ -472,10 +472,10 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
options.filters = coalesce([{
|
|
475
|
-
name: ( localize(
|
|
475
|
+
name: ( localize(15557, "All Files")),
|
|
476
476
|
extensions: ["*"]
|
|
477
477
|
}, matchingFilter, ...registeredLanguageFilters, {
|
|
478
|
-
name: ( localize(
|
|
478
|
+
name: ( localize(15558, "No Extension")),
|
|
479
479
|
extensions: [""]
|
|
480
480
|
}]);
|
|
481
481
|
return options;
|
|
@@ -28,7 +28,7 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
28
28
|
if (this.shouldUseSimplified(schema)) {
|
|
29
29
|
return super.pickFileFolderAndOpenSimplified(schema, options, false);
|
|
30
30
|
}
|
|
31
|
-
throw ( new Error(( localize(
|
|
31
|
+
throw ( new Error(( localize(15559, "Can't open folders, try adding a folder to the workspace instead."))));
|
|
32
32
|
}
|
|
33
33
|
addFileSchemaIfNeeded(schema, isFolder) {
|
|
34
34
|
return (schema === Schemas.untitled) ? [Schemas.file] : (((schema !== Schemas.file) && (!isFolder || (schema !== Schemas.vscodeRemote))) ? [schema, Schemas.file] : [schema]);
|
|
@@ -73,7 +73,7 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
73
73
|
if (this.shouldUseSimplified(schema)) {
|
|
74
74
|
return super.pickFolderAndOpenSimplified(schema, options);
|
|
75
75
|
}
|
|
76
|
-
throw ( new Error(( localize(
|
|
76
|
+
throw ( new Error(( localize(15559, "Can't open folders, try adding a folder to the workspace instead."))));
|
|
77
77
|
}
|
|
78
78
|
async pickWorkspaceAndOpen(options) {
|
|
79
79
|
options.availableFileSystems = this.getWorkspaceAvailableFileSystems(options);
|
|
@@ -85,7 +85,7 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
85
85
|
return super.pickWorkspaceAndOpenSimplified(schema, options);
|
|
86
86
|
}
|
|
87
87
|
throw ( new Error(( localize(
|
|
88
|
-
|
|
88
|
+
15560,
|
|
89
89
|
"Can't open workspaces, try adding a folder to the workspace instead."
|
|
90
90
|
))));
|
|
91
91
|
}
|
|
@@ -213,19 +213,19 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
const buttons = [{
|
|
216
|
-
label: ( localize(
|
|
216
|
+
label: ( localize(15561, "&&Open Remote...")),
|
|
217
217
|
run: async () => {
|
|
218
218
|
await this.commandService.executeCommand("workbench.action.remote.showMenu");
|
|
219
219
|
}
|
|
220
220
|
}, {
|
|
221
|
-
label: ( localize(
|
|
221
|
+
label: ( localize(15562, "&&Learn More")),
|
|
222
222
|
run: async () => {
|
|
223
223
|
await this.openerService.open("https://aka.ms/VSCodeWebLocalFileSystemAccess");
|
|
224
224
|
}
|
|
225
225
|
}];
|
|
226
226
|
if (context === "open") {
|
|
227
227
|
buttons.push({
|
|
228
|
-
label: ( localize(
|
|
228
|
+
label: ( localize(15563, "Open &&Files...")),
|
|
229
229
|
run: async () => {
|
|
230
230
|
const files = await triggerUpload();
|
|
231
231
|
if (files) {
|
|
@@ -247,9 +247,9 @@ class FileDialogService extends AbstractFileDialogService {
|
|
|
247
247
|
}
|
|
248
248
|
await this.dialogService.prompt({
|
|
249
249
|
type: Severity.Warning,
|
|
250
|
-
message: ( localize(
|
|
250
|
+
message: ( localize(15564, "Opening Local Folders is Unsupported")),
|
|
251
251
|
detail: ( localize(
|
|
252
|
-
|
|
252
|
+
15565,
|
|
253
253
|
"Your browser doesn't support opening local folders.\nYou can either open single files or open a remote repository."
|
|
254
254
|
)),
|
|
255
255
|
buttons
|
|
@@ -41,7 +41,7 @@ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
41
41
|
var OpenLocalFileCommand;
|
|
42
42
|
(function(OpenLocalFileCommand) {
|
|
43
43
|
OpenLocalFileCommand.ID = "workbench.action.files.openLocalFile";
|
|
44
|
-
OpenLocalFileCommand.LABEL = ( localize(
|
|
44
|
+
OpenLocalFileCommand.LABEL = ( localize(15566, "Open Local File..."));
|
|
45
45
|
function handler() {
|
|
46
46
|
return accessor => {
|
|
47
47
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -56,7 +56,7 @@ var OpenLocalFileCommand;
|
|
|
56
56
|
var SaveLocalFileCommand;
|
|
57
57
|
(function(SaveLocalFileCommand) {
|
|
58
58
|
SaveLocalFileCommand.ID = "workbench.action.files.saveLocalFile";
|
|
59
|
-
SaveLocalFileCommand.LABEL = ( localize(
|
|
59
|
+
SaveLocalFileCommand.LABEL = ( localize(15567, "Save Local File..."));
|
|
60
60
|
function handler() {
|
|
61
61
|
return accessor => {
|
|
62
62
|
const editorService = accessor.get(IEditorService);
|
|
@@ -79,7 +79,7 @@ var SaveLocalFileCommand;
|
|
|
79
79
|
var OpenLocalFolderCommand;
|
|
80
80
|
(function(OpenLocalFolderCommand) {
|
|
81
81
|
OpenLocalFolderCommand.ID = "workbench.action.files.openLocalFolder";
|
|
82
|
-
OpenLocalFolderCommand.LABEL = ( localize(
|
|
82
|
+
OpenLocalFolderCommand.LABEL = ( localize(15568, "Open Local Folder..."));
|
|
83
83
|
function handler() {
|
|
84
84
|
return accessor => {
|
|
85
85
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -94,7 +94,7 @@ var OpenLocalFolderCommand;
|
|
|
94
94
|
var OpenLocalFileFolderCommand;
|
|
95
95
|
(function(OpenLocalFileFolderCommand) {
|
|
96
96
|
OpenLocalFileFolderCommand.ID = "workbench.action.files.openLocalFileFolder";
|
|
97
|
-
OpenLocalFileFolderCommand.LABEL = ( localize(
|
|
97
|
+
OpenLocalFileFolderCommand.LABEL = ( localize(15569, "Open Local..."));
|
|
98
98
|
function handler() {
|
|
99
99
|
return accessor => {
|
|
100
100
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -239,7 +239,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
239
239
|
}
|
|
240
240
|
if ((this.scheme !== Schemas.file) && !this.fileService.hasProvider(defaultUri)) {
|
|
241
241
|
this.notificationService.info(( localize(
|
|
242
|
-
|
|
242
|
+
15570,
|
|
243
243
|
"File system provider for {0} is not available.",
|
|
244
244
|
(defaultUri.toString())
|
|
245
245
|
)));
|
|
@@ -312,12 +312,12 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
312
312
|
this.filePickBox.matchOnLabel = false;
|
|
313
313
|
this.filePickBox.sortByLabel = false;
|
|
314
314
|
this.filePickBox.ignoreFocusOut = true;
|
|
315
|
-
this.filePickBox.placeholder = ( localize(
|
|
315
|
+
this.filePickBox.placeholder = ( localize(15571, "Folder path"));
|
|
316
316
|
this.filePickBox.ok = true;
|
|
317
317
|
this.filePickBox.okLabel = typeof this.options.openLabel === "string" ? this.options.openLabel : this.options.openLabel?.withoutMnemonic;
|
|
318
318
|
if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
|
|
319
319
|
this.filePickBox.customButton = true;
|
|
320
|
-
this.filePickBox.customLabel = ( localize(
|
|
320
|
+
this.filePickBox.customLabel = ( localize(15572, "Show Local"));
|
|
321
321
|
this.filePickBox.customButtonSecondary = true;
|
|
322
322
|
let action;
|
|
323
323
|
if (isSave) {
|
|
@@ -465,7 +465,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
465
465
|
setButtons() {
|
|
466
466
|
this.filePickBox.buttons = [{
|
|
467
467
|
iconClass: this._showDotFiles ? ThemeIcon.asClassName(Codicon.eye) : ThemeIcon.asClassName(Codicon.eyeClosed),
|
|
468
|
-
tooltip: this._showDotFiles ? ( localize(
|
|
468
|
+
tooltip: this._showDotFiles ? ( localize(15573, "Hide dot files")) : ( localize(15574, "Show dot files")),
|
|
469
469
|
alwaysVisible: true
|
|
470
470
|
}];
|
|
471
471
|
}
|
|
@@ -620,7 +620,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
620
620
|
valueUri = this.tryAddTrailingSeparatorToDirectory(valueUri, stat);
|
|
621
621
|
return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
|
|
622
622
|
} else if (this.endsWithSlash(value)) {
|
|
623
|
-
this.filePickBox.validationMessage = ( localize(
|
|
623
|
+
this.filePickBox.validationMessage = ( localize(15575, "The path does not exist. Use ~ to go to your home directory."));
|
|
624
624
|
this.badPath = value;
|
|
625
625
|
return UpdateResult.InvalidPath;
|
|
626
626
|
} else {
|
|
@@ -784,7 +784,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
784
784
|
prompt.ignoreFocusOut = true;
|
|
785
785
|
prompt.ok = true;
|
|
786
786
|
prompt.customButton = true;
|
|
787
|
-
prompt.customLabel = ( localize(
|
|
787
|
+
prompt.customLabel = ( localize(15576, "Cancel"));
|
|
788
788
|
prompt.customButtonSecondary = true;
|
|
789
789
|
prompt.value = this.pathFromUri(uri);
|
|
790
790
|
let isResolving = false;
|
|
@@ -813,7 +813,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
813
813
|
}
|
|
814
814
|
async validate(uri) {
|
|
815
815
|
if (uri === undefined) {
|
|
816
|
-
this.filePickBox.validationMessage = ( localize(
|
|
816
|
+
this.filePickBox.validationMessage = ( localize(15577, "Please enter a valid path."));
|
|
817
817
|
return Promise.resolve(false);
|
|
818
818
|
}
|
|
819
819
|
let stat;
|
|
@@ -824,47 +824,47 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
|
|
|
824
824
|
} catch (e) {}
|
|
825
825
|
if (this.requiresTrailing) {
|
|
826
826
|
if (stat?.isDirectory) {
|
|
827
|
-
this.filePickBox.validationMessage = ( localize(
|
|
827
|
+
this.filePickBox.validationMessage = ( localize(15578, "The folder already exists. Please use a new file name."));
|
|
828
828
|
return Promise.resolve(false);
|
|
829
829
|
} else if (stat) {
|
|
830
830
|
const message = ( localize(
|
|
831
|
-
|
|
831
|
+
15579,
|
|
832
832
|
"{0} already exists. Are you sure you want to overwrite it?",
|
|
833
833
|
basename(uri)
|
|
834
834
|
));
|
|
835
835
|
return this.yesNoPrompt(uri, message);
|
|
836
836
|
} else if (!(isValidBasename(basename(uri), this.isWindows))) {
|
|
837
|
-
this.filePickBox.validationMessage = ( localize(
|
|
837
|
+
this.filePickBox.validationMessage = ( localize(15580, "Please enter a valid file name."));
|
|
838
838
|
return Promise.resolve(false);
|
|
839
839
|
} else if (!statDirname) {
|
|
840
840
|
const message = ( localize(
|
|
841
|
-
|
|
841
|
+
15581,
|
|
842
842
|
"The folder {0} does not exist. Would you like to create it?",
|
|
843
843
|
basename(dirname(uri))
|
|
844
844
|
));
|
|
845
845
|
return this.yesNoPrompt(uri, message);
|
|
846
846
|
} else if (!statDirname.isDirectory) {
|
|
847
|
-
this.filePickBox.validationMessage = ( localize(
|
|
847
|
+
this.filePickBox.validationMessage = ( localize(15582, "Please enter a path that exists."));
|
|
848
848
|
return Promise.resolve(false);
|
|
849
849
|
} else if (statDirname.readonly) {
|
|
850
850
|
this.filePickBox.validationMessage = ( localize(
|
|
851
|
-
|
|
851
|
+
15583,
|
|
852
852
|
"This folder cannot be used as a save destination. Please choose another folder"
|
|
853
853
|
));
|
|
854
854
|
return Promise.resolve(false);
|
|
855
855
|
}
|
|
856
856
|
} else {
|
|
857
857
|
if (!stat) {
|
|
858
|
-
this.filePickBox.validationMessage = ( localize(
|
|
858
|
+
this.filePickBox.validationMessage = ( localize(15582, "Please enter a path that exists."));
|
|
859
859
|
return Promise.resolve(false);
|
|
860
860
|
} else if (uri.path === "/" && this.isWindows) {
|
|
861
|
-
this.filePickBox.validationMessage = ( localize(
|
|
861
|
+
this.filePickBox.validationMessage = ( localize(15584, "Please start the path with a drive letter."));
|
|
862
862
|
return Promise.resolve(false);
|
|
863
863
|
} else if (stat.isDirectory && !this.allowFolderSelection) {
|
|
864
|
-
this.filePickBox.validationMessage = ( localize(
|
|
864
|
+
this.filePickBox.validationMessage = ( localize(15585, "Please select a file."));
|
|
865
865
|
return Promise.resolve(false);
|
|
866
866
|
} else if (!stat.isDirectory && !this.allowFileSelection) {
|
|
867
|
-
this.filePickBox.validationMessage = ( localize(
|
|
867
|
+
this.filePickBox.validationMessage = ( localize(15586, "Please select a folder."));
|
|
868
868
|
return Promise.resolve(false);
|
|
869
869
|
}
|
|
870
870
|
}
|