Compare commits

..

4 Commits

Author SHA1 Message Date
semantic-release-bot
ed87f73602 chore(release): 4.10.4 [CI SKIP] 2025-07-13 06:23:11 +00:00
AAGaming
3d5de65077 fix(modals): fix ModalRoot on beta
Co-Authored-By: junkrunner <eben@sdk.co.nz>
2025-07-13 02:22:21 -04:00
semantic-release-bot
33d224bc3f chore(release): 4.10.3 [CI SKIP] 2025-07-09 03:21:17 +00:00
shadow
aa0678c857 fix(modals): fix <ConfirmModal /> for new Steam beta (#123) 2025-07-08 23:20:45 -04:00
3 changed files with 30 additions and 12 deletions

View File

@@ -1,3 +1,17 @@
## [4.10.4](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.3...v4.10.4) (2025-07-13)
### Bug Fixes
* **modals:** fix ModalRoot on beta ([3d5de65](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/3d5de65077098ff3fb5192cb55fb1534336411f5))
## [4.10.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.2...v4.10.3) (2025-07-09)
### Bug Fixes
* **modals:** fix `<ConfirmModal />` for new Steam beta ([#123](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/123)) ([aa0678c](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/aa0678c857e07f58de58e5d20565bf2718fff6dc))
## [4.10.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.1...v4.10.2) (2025-06-28)

View File

@@ -1,6 +1,6 @@
{
"name": "@decky/ui",
"version": "4.10.2",
"version": "4.10.4",
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -83,22 +83,26 @@ export interface ConfirmModalProps extends ModalRootProps {
}
export const ConfirmModal = findModuleExport(
(e: Export) => !e?.prototype?.OK && e?.prototype?.Cancel && e?.prototype?.render,
(e: Export) => e?.toString()?.includes('bUpdateDisabled') && e?.toString()?.includes('closeModal') && e?.toString()?.includes('onGamepadCancel'),
) as FC<ConfirmModalProps>;
export const ModalRoot = Object.values(
findModule((m: any) => {
if (typeof m !== 'object') return false;
export const ModalRoot =
// new
findModuleExport((e: Export) => typeof e === 'function' && e.toString().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: ')) ||
// old
Object.values(
findModule((m: any) => {
if (typeof m !== 'object') return false;
for (let prop in m) {
if (m[prop]?.m_mapModalManager && Object.values(m)?.find((x: any) => x?.type)) {
return true;
for (let prop in m) {
if (m[prop]?.m_mapModalManager && Object.values(m)?.find((x: any) => x?.type)) {
return true;
}
}
}
return false;
}) || {},
)?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
return false;
}) || {},
)?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
interface SimpleModalProps {
active?: boolean;