summaryrefslogtreecommitdiff
path: root/frontend/src/components/settings/pages/developer/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/settings/pages/developer/index.tsx')
-rw-r--r--frontend/src/components/settings/pages/developer/index.tsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/frontend/src/components/settings/pages/developer/index.tsx b/frontend/src/components/settings/pages/developer/index.tsx
index 5ed76515..36d3b5c0 100644
--- a/frontend/src/components/settings/pages/developer/index.tsx
+++ b/frontend/src/components/settings/pages/developer/index.tsx
@@ -91,13 +91,16 @@ export default function DeveloperSettings() {
>
<DialogButton
onClick={async () => {
- let res = await window.DeckyPluginLoader.callServerMethod('get_tab_id', { name: 'SharedJSContext' });
- if (res.success) {
+ try {
+ let tabId = await window.DeckyBackend.call<[name: string], string>(
+ 'utilities/get_tab_id',
+ 'SharedJSContext',
+ );
Navigation.NavigateToExternalWeb(
- 'localhost:8080/devtools/inspector.html?ws=localhost:8080/devtools/page/' + res.result,
+ 'localhost:8080/devtools/inspector.html?ws=localhost:8080/devtools/page/' + tabId,
);
- } else {
- console.error('Unable to find ID for SharedJSContext tab ', res.result);
+ } catch (e) {
+ console.error('Unable to find ID for SharedJSContext tab ', e);
Navigation.NavigateToExternalWeb('localhost:8080');
}
}}