mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 21:51:57 +00:00
Fix: export V2 to plugins
This commit is contained in:
@@ -17,6 +17,7 @@ import Logger from '../../../../logger';
|
|||||||
import { installFromURL } from '../../../../store';
|
import { installFromURL } from '../../../../store';
|
||||||
import { useSetting } from '../../../../utils/hooks/useSetting';
|
import { useSetting } from '../../../../utils/hooks/useSetting';
|
||||||
import { getSetting } from '../../../../utils/settings';
|
import { getSetting } from '../../../../utils/settings';
|
||||||
|
import { FileSelectionType } from '../../../modals/filepicker';
|
||||||
import RemoteDebuggingSettings from '../general/RemoteDebugging';
|
import RemoteDebuggingSettings from '../general/RemoteDebugging';
|
||||||
|
|
||||||
const logger = new Logger('DeveloperIndex');
|
const logger = new Logger('DeveloperIndex');
|
||||||
@@ -27,7 +28,16 @@ const installFromZip = async () => {
|
|||||||
logger.error('The default path has not been found!');
|
logger.error('The default path has not been found!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.DeckyPluginLoader.openFilePicker(path, true, undefined, true, ['zip'], false, false).then((val) => {
|
window.DeckyPluginLoader.openFilePickerV2(
|
||||||
|
path,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
undefined,
|
||||||
|
['zip'],
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
FileSelectionType.FILE,
|
||||||
|
).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}`);
|
||||||
installFromURL(url);
|
installFromURL(url);
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ class PluginLoader extends Logger {
|
|||||||
toaster: this.toaster,
|
toaster: this.toaster,
|
||||||
callServerMethod: this.callServerMethod,
|
callServerMethod: this.callServerMethod,
|
||||||
openFilePicker: this.openFilePicker,
|
openFilePicker: this.openFilePicker,
|
||||||
|
openFilePickerV2: this.openFilePickerV2,
|
||||||
async callPluginMethod(methodName: string, args = {}) {
|
async callPluginMethod(methodName: string, args = {}) {
|
||||||
const response = await fetch(`http://127.0.0.1:1337/plugins/${pluginName}/methods/${methodName}`, {
|
const response = await fetch(`http://127.0.0.1:1337/plugins/${pluginName}/methods/${methodName}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Reference in New Issue
Block a user