From 02db20f846857374b9b5f1e7dbd475befdf47b71 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 21 Nov 2026 21:14:41 -0500 Subject: esmodule support base --- frontend/src/components/Toast.tsx | 47 +++++++++++++++++++-------------- frontend/src/components/store/Store.tsx | 8 ++---- 2 files changed, 29 insertions(+), 26 deletions(-) (limited to 'frontend/src/components') diff --git a/frontend/src/components/Toast.tsx b/frontend/src/components/Toast.tsx index e86e9337..aa2e665f 100644 --- a/frontend/src/components/Toast.tsx +++ b/frontend/src/components/Toast.tsx @@ -1,5 +1,5 @@ import type { ToastData } from '@decky/api'; -import { Focusable, Navigation, findClassModule, joinClassNames } from '@decky/ui'; +import { Focusable, Navigation, joinClassNames, toastClasses } from '@decky/ui'; import { FC, memo } from 'react'; import Logger from '../logger'; @@ -23,7 +23,14 @@ interface ToastRendererProps extends ToastProps { location: ToastLocation; } -const templateClasses = findClassModule((m) => m.ShortTemplate) || {}; +const popupClasses = { + "ShortTemplate": "kg8VJS07NZk-", + "Content": "vjeKRorxqWY-", + "Header": "UWjdKshdhD8-", + "Icon": "q9vQBNOskjU-", + "Title": "RZ1644uUH-k-", + "Body": "_5LTIC-a3DVw-" +} // These are memoized as they like to randomly rerender @@ -32,15 +39,15 @@ const GamepadUIPopupToast: FC> = memo(({ toast
- {toast.logo &&
{toast.logo}
} -
-
- {toast.icon &&
{toast.icon}
} -
{toast.title}
+ {toast.logo &&
{toast.logo}
} +
+
+ {toast.icon &&
{toast.icon}
} +
{toast.title}
-
{toast.body}
+
{toast.body}
); @@ -55,30 +62,30 @@ const GamepadUIQAMToast: FC = memo(({ toast, newIndicator }) => { Navigation.CloseSideMenus(); }} className={joinClassNames( - templateClasses.StandardTemplateContainer, + toastClasses.StandardTemplateContainer, toast.className || '', 'DeckyGamepadUIQAMToast', )} > -
- {toast.logo &&
{toast.logo}
} -
-
- {toast.icon &&
{toast.icon}
} - {toast.title &&
{toast.title}
} +
+ {toast.logo &&
{toast.logo}
} +
+
+ {toast.icon &&
{toast.icon}
} + {toast.title &&
{toast.title}
} {/* timestamp should always be defined by toaster */} {/* TODO check how valve does this */} {toast.timestamp && ( -
+
{toast.timestamp.toLocaleTimeString(undefined, { timeStyle: 'short' })}
)}
- {toast.body &&
{toast.body}
} - {toast.subtext &&
{toast.subtext}
} + {toast.body &&
{toast.body}
} + {toast.subtext &&
{toast.subtext}
}
{newIndicator && ( -
+
diff --git a/frontend/src/components/store/Store.tsx b/frontend/src/components/store/Store.tsx index cfa83aff..da909fd7 100644 --- a/frontend/src/components/store/Store.tsx +++ b/frontend/src/components/store/Store.tsx @@ -7,7 +7,7 @@ import { SteamSpinner, Tabs, TextField, - findModule, + tabsClasses } from '@decky/ui'; import { Dispatch, FC, SetStateAction, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -32,10 +32,6 @@ const logger = new Logger('Store'); const StorePage: FC<{}> = () => { const [currentTabRoute, setCurrentTabRoute] = useState('browse'); const [pluginCount, setPluginCount] = useState(null); - const { TabCount } = findModule((m) => { - if (m?.TabCount && m?.TabTitle) return true; - return false; - }); const { t } = useTranslation(); @@ -58,7 +54,7 @@ const StorePage: FC<{}> = () => { title: t('Store.store_tabs.title'), content: , id: 'browse', - renderTabAddon: () => {pluginCount}, + renderTabAddon: () => {pluginCount}, }, { title: t('Store.store_tabs.about'), -- cgit v1.2.3