mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 02:07:21 +00:00
Fixed the file filters of the native file dialog for nested file types (#1079)
This commit is contained in:
1 parent
274d718314
commit
055cce80a0
9 files changed
+193
-81
No files matched your search
@@ -77,7 +77,7 @@ public sealed class FileEnumerationResult
|
||||
return extension;
|
||||
|
||||
var fileName = Path.GetFileName(filePath);
|
||||
return FileTypes.SOURCE_LIKE_FILE_NAMES.FilterExtensions
|
||||
return FileTypes.SOURCE_LIKE_FILE_NAMES.FileNames
|
||||
.FirstOrDefault(knownFileName => string.Equals(knownFileName, fileName, StringComparison.OrdinalIgnoreCase))
|
||||
?? string.Empty;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public sealed partial class RustService
|
||||
{
|
||||
Title = title,
|
||||
PreviousFile = initialFile is null ? null : new (initialFile),
|
||||
Filter = FileTypes.AsOneFileType(filter)
|
||||
Filter = FileTypes.ToFileDialogFilter(filter)
|
||||
};
|
||||
|
||||
var result = await this.http.PostAsJsonAsync("/select/file", payload, this.jsonRustSerializerOptions);
|
||||
@@ -81,7 +81,7 @@ public sealed partial class RustService
|
||||
{
|
||||
Title = title,
|
||||
PreviousFile = initialFile is null ? null : new (initialFile),
|
||||
Filter = FileTypes.AsOneFileType(filter)
|
||||
Filter = FileTypes.ToFileDialogFilter(filter)
|
||||
};
|
||||
|
||||
var result = await this.http.PostAsJsonAsync("/select/files", payload, this.jsonRustSerializerOptions);
|
||||
@@ -112,7 +112,7 @@ public sealed partial class RustService
|
||||
{
|
||||
Title = title,
|
||||
PreviousFile = initialFile is null ? null : new (initialFile),
|
||||
Filter = FileTypes.AsOneFileType(filter)
|
||||
Filter = FileTypes.ToFileDialogFilter(filter)
|
||||
};
|
||||
|
||||
var result = await this.http.PostAsJsonAsync("/save/file", payload, this.jsonRustSerializerOptions);
|
||||
|
||||
Reference in new issue
Block a user