From 40c7c1b515abf4abcecd6480afb28f27fb71d0f0 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 30 Dec 2023 21:32:23 -0500 Subject: port updater to ws, also small refactoring --- .../components/settings/pages/developer/index.tsx | 26 +++++++--------------- 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'frontend/src/components/settings/pages/developer/index.tsx') diff --git a/frontend/src/components/settings/pages/developer/index.tsx b/frontend/src/components/settings/pages/developer/index.tsx index 36d3b5c0..9c8504e7 100644 --- a/frontend/src/components/settings/pages/developer/index.tsx +++ b/frontend/src/components/settings/pages/developer/index.tsx @@ -28,20 +28,13 @@ const installFromZip = async () => { logger.error('The default path has not been found!'); return; } - window.DeckyPluginLoader.openFilePickerV2( - FileSelectionType.FILE, - path, - true, - true, - undefined, - ['zip'], - false, - false, - ).then((val) => { - const url = `file://${val.path}`; - console.log(`Installing plugin locally from ${url}`); - installFromURL(url); - }); + DeckyPluginLoader.openFilePickerV2(FileSelectionType.FILE, path, true, true, undefined, ['zip'], false, false).then( + (val) => { + const url = `file://${val.path}`; + console.log(`Installing plugin locally from ${url}`); + installFromURL(url); + }, + ); }; export default function DeveloperSettings() { @@ -92,10 +85,7 @@ export default function DeveloperSettings() { { try { - let tabId = await window.DeckyBackend.call<[name: string], string>( - 'utilities/get_tab_id', - 'SharedJSContext', - ); + let tabId = await DeckyBackend.call<[name: string], string>('utilities/get_tab_id', 'SharedJSContext'); Navigation.NavigateToExternalWeb( 'localhost:8080/devtools/inspector.html?ws=localhost:8080/devtools/page/' + tabId, ); -- cgit v1.2.3