From 24082fe63cdcdf41993f9e1430d1405152a2c930 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sat, 21 Nov 2026 22:23:03 -0500 Subject: feat: Support new Steam Betas (only) and Frame (#1019) --- frontend/src/components/Toast.tsx | 47 ++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'frontend/src/components/Toast.tsx') diff --git a/frontend/src/components/Toast.tsx b/frontend/src/components/Toast.tsx index e86e9337..8b6b9d63 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 && ( -
+
-- cgit v1.2.3