From e82a55e9582fbd6d84f3f4510b04480c35e41fe4 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Mon, 26 Oct 2026 23:50:59 -0400 Subject: feat: initial VERY VERY incomplete steam frame support --- frontend/src/developer.tsx | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'frontend/src/developer.tsx') diff --git a/frontend/src/developer.tsx b/frontend/src/developer.tsx index 5df6de07..6e1b9599 100644 --- a/frontend/src/developer.tsx +++ b/frontend/src/developer.tsx @@ -9,20 +9,13 @@ const logger = new Logger('DeveloperMode'); let removeSettingsObserver: () => void = () => {}; -declare global { - interface Window { - settingsStore: any; - } -} - export async function setShowValveInternal(show: boolean) { if (show) { - const mobx = - window.settingsStore[ - Object.getOwnPropertySymbols(window.settingsStore).find( - (x) => x.toString() == 'Symbol(mobx administration)', - ) as any - ]; + const mobx = (window.settingsStore as any)[ + Object.getOwnPropertySymbols(window.settingsStore).find( + (x) => x.toString() == 'Symbol(mobx administration)', + ) as any + ]; removeSettingsObserver = (mobx.observe_ || mobx.observe).call(mobx, (e: any) => { e.newValue.bIsValveEmail = true; @@ -37,17 +30,18 @@ export async function setShowValveInternal(show: boolean) { } } -export async function setShouldConnectToReactDevTools(enable: boolean) { - DeckyPluginLoader.toaster.toast({ - title: enable ? ( - - ) : ( - - ), - body: , - icon: , - }); - await sleep(5000); +export async function setShouldConnectToReactDevTools(enable: boolean, skipWait?: boolean) { + skipWait || + DeckyPluginLoader.toaster.toast({ + title: enable ? ( + + ) : ( + + ), + body: , + icon: , + }); + skipWait || (await sleep(5000)); return enable ? DeckyBackend.call('utilities/enable_rdt') : DeckyBackend.call('utilities/disable_rdt'); } @@ -58,5 +52,5 @@ export async function startup() { if (isValveInternalEnabled) setShowValveInternal(isValveInternalEnabled); if ((isRDTEnabled && !window.deckyHasConnectedRDT) || (!isRDTEnabled && window.deckyHasConnectedRDT)) - setShouldConnectToReactDevTools(isRDTEnabled); + setShouldConnectToReactDevTools(isRDTEnabled, true); } -- cgit v1.2.3