summaryrefslogtreecommitdiff
path: root/frontend/src
diff options
context:
space:
mode:
authorshadow <81448108+shdwmtr@users.noreply.github.com>2025-06-28 16:45:33 -0300
committerGitHub <noreply@github.com>2025-06-28 12:45:33 -0700
commit6e357ceecc86d60791eb8b8efcf6d182add36b63 (patch)
tree98e85777da359ccf2589184dc89def1bab9f2e04 /frontend/src
parente4f7546f99e315f4f76d8bcaff2610f34098e43a (diff)
downloaddecky-loader-6e357ceecc86d60791eb8b8efcf6d182add36b63.tar.gz
decky-loader-6e357ceecc86d60791eb8b8efcf6d182add36b63.zip
fix(deps): update @decky/ui to version 4.10.2 (#782)
* fix(deps): update @decky/ui to version 4.10.1 * chore(deps): bump @decky/ui 4.8.3 -> 4.10.1 * fix(types): UIMode -> EUIMode * fix(types): bypass missing type in library.ts * fix: lint --------- Co-authored-by: AAGaming <aagaming@riseup.net>
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/components/modals/filepicker/patches/library.ts2
-rw-r--r--frontend/src/plugin-loader.tsx7
-rw-r--r--frontend/src/router-hook.tsx10
3 files changed, 8 insertions, 11 deletions
diff --git a/frontend/src/components/modals/filepicker/patches/library.ts b/frontend/src/components/modals/filepicker/patches/library.ts
index 3b7fa679..b0930a5e 100644
--- a/frontend/src/components/modals/filepicker/patches/library.ts
+++ b/frontend/src/components/modals/filepicker/patches/library.ts
@@ -47,7 +47,7 @@ export default async function libraryPatch() {
}
const unlisten = History.listen(() => {
- if (window.SteamClient.Apps.PromptToChangeShortcut !== patch.patchedFunction) {
+ if ((window.SteamClient.Apps as any).PromptToChangeShortcut !== patch.patchedFunction) {
rePatch();
}
});
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index 88e85a48..df0a6956 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -1,5 +1,6 @@
import { ToastNotification } from '@decky/api';
import {
+ EUIMode,
ModalRoot,
Navigation,
PanelSection,
@@ -30,7 +31,7 @@ import { HiddenPluginsService } from './hidden-plugins-service';
import Logger from './logger';
import { NotificationService } from './notification-service';
import { InstallType, Plugin, PluginLoadType } from './plugin';
-import RouterHook, { UIMode } from './router-hook';
+import RouterHook from './router-hook';
import { deinitSteamFixes, initSteamFixes } from './steamfixes';
import { checkForPluginUpdates } from './store';
import TabsHook from './tabs-hook';
@@ -205,12 +206,12 @@ class PluginLoader extends Logger {
let registration: any;
const uiMode = await new Promise(
(r) =>
- (registration = SteamClient.UI.RegisterForUIModeChanged((mode: UIMode) => {
+ (registration = SteamClient.UI.RegisterForUIModeChanged((mode: EUIMode) => {
r(mode);
registration.unregister();
})),
);
- if (uiMode == UIMode.BigPicture) {
+ if (uiMode == EUIMode.GamePad) {
// wait for SP window to exist before loading plugins
while (!findSP()) {
await sleep(100);
diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx
index 9612793a..b3355d76 100644
--- a/frontend/src/router-hook.tsx
+++ b/frontend/src/router-hook.tsx
@@ -1,4 +1,5 @@
import {
+ EUIMode,
ErrorBoundary,
Patch,
afterPatch,
@@ -31,11 +32,6 @@ declare global {
}
}
-export enum UIMode {
- BigPicture = 4,
- Desktop = 7,
-}
-
const isPatched = Symbol('is patched');
class RouterHook extends Logger {
@@ -76,13 +72,13 @@ class RouterHook extends Logger {
this.error('Failed to find router stack module');
}
- this.modeChangeRegistration = SteamClient.UI.RegisterForUIModeChanged((mode: UIMode) => {
+ this.modeChangeRegistration = SteamClient.UI.RegisterForUIModeChanged((mode: EUIMode) => {
this.debug(`UI mode changed to ${mode}`);
if (this.patchedModes.has(mode)) return;
this.patchedModes.add(mode);
this.debug(`Patching router for UI mode ${mode}`);
switch (mode) {
- case UIMode.BigPicture:
+ case EUIMode.GamePad:
this.debug('Patching gamepad router');
this.patchGamepadRouter();
break;