diff options
| -rw-r--r-- | frontend/src/components/settings/pages/developer/index.tsx | 12 | ||||
| -rw-r--r-- | frontend/src/plugin-loader.tsx | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/frontend/src/components/settings/pages/developer/index.tsx b/frontend/src/components/settings/pages/developer/index.tsx index ddd1745d..c0a8ca9e 100644 --- a/frontend/src/components/settings/pages/developer/index.tsx +++ b/frontend/src/components/settings/pages/developer/index.tsx @@ -17,6 +17,7 @@ import Logger from '../../../../logger'; import { installFromURL } from '../../../../store'; import { useSetting } from '../../../../utils/hooks/useSetting'; import { getSetting } from '../../../../utils/settings'; +import { FileSelectionType } from '../../../modals/filepicker'; import RemoteDebuggingSettings from '../general/RemoteDebugging'; const logger = new Logger('DeveloperIndex'); @@ -27,7 +28,16 @@ const installFromZip = async () => { logger.error('The default path has not been found!'); 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}`; console.log(`Installing plugin locally from ${url}`); installFromURL(url); diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index e8671faa..387de7bf 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -438,6 +438,7 @@ class PluginLoader extends Logger { toaster: this.toaster, callServerMethod: this.callServerMethod, openFilePicker: this.openFilePicker, + openFilePickerV2: this.openFilePickerV2, async callPluginMethod(methodName: string, args = {}) { const response = await fetch(`http://127.0.0.1:1337/plugins/${pluginName}/methods/${methodName}`, { method: 'POST', |
