mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
chore: adding parameters to file picker in logical order
This commit is contained in:
@@ -29,6 +29,7 @@ const installFromZip = async () => {
|
||||
return;
|
||||
}
|
||||
window.DeckyPluginLoader.openFilePickerV2(
|
||||
FileSelectionType.FILE,
|
||||
path,
|
||||
true,
|
||||
true,
|
||||
@@ -36,7 +37,6 @@ const installFromZip = async () => {
|
||||
['zip'],
|
||||
false,
|
||||
false,
|
||||
FileSelectionType.FILE,
|
||||
).then((val) => {
|
||||
const url = `file://${val.path}`;
|
||||
console.log(`Installing plugin locally from ${url}`);
|
||||
|
||||
@@ -366,6 +366,7 @@ class PluginLoader extends Logger {
|
||||
): Promise<{ path: string; realpath: string }> {
|
||||
if (selectFiles) {
|
||||
return this.openFilePickerV2(
|
||||
FileSelectionType.FILE,
|
||||
startPath,
|
||||
true,
|
||||
true,
|
||||
@@ -374,10 +375,10 @@ class PluginLoader extends Logger {
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
FileSelectionType.FILE,
|
||||
);
|
||||
} else {
|
||||
return this.openFilePickerV2(
|
||||
FileSelectionType.FOLDER,
|
||||
startPath,
|
||||
false,
|
||||
true,
|
||||
@@ -386,12 +387,12 @@ class PluginLoader extends Logger {
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
FileSelectionType.FOLDER,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
openFilePickerV2(
|
||||
select: FileSelectionType,
|
||||
startPath: string,
|
||||
includeFiles?: boolean,
|
||||
includeFolders?: boolean,
|
||||
@@ -400,7 +401,6 @@ class PluginLoader extends Logger {
|
||||
showHiddenFiles?: boolean,
|
||||
allowAllFiles?: boolean,
|
||||
max?: number,
|
||||
select?: FileSelectionType,
|
||||
): Promise<{ path: string; realpath: string }> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const Content = ({ closeModal }: { closeModal?: () => void }) => (
|
||||
|
||||
Reference in New Issue
Block a user