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