forked from SteamDeckHomebrew/decky-frontend-lib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(finds): make modal and scroll components work on latest betaa
THEY INCREASED THE MINIFIER PRESET AAAAAAAAAAAAAAAAAAAAAAAAAA
- Loading branch information
1 parent
4d4cfed
commit c2b0fad
Showing
2 changed files
with
43 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import { FC, ReactNode } from "react"; | ||
import { findModuleChild, findModule } from "../webpack"; | ||
import { FC, ReactNode } from 'react'; | ||
|
||
import { findModule, findModuleChild } from '../webpack'; | ||
|
||
const ScrollingModule = findModule((mod) => { | ||
if (typeof mod !== 'object' || !mod.__esModule) return undefined; | ||
if (mod.ScrollPanel) return mod; | ||
if (typeof mod !== 'object') return false; | ||
for (let prop in mod) { | ||
if (mod[prop]?.render?.toString?.().includes("{case\"x\":")) return true; | ||
} | ||
return false; | ||
}); | ||
|
||
export const ScrollPanel: FC<{ children?: ReactNode; }> = ScrollingModule.ScrollPanel; | ||
const ScrollingModuleProps = ScrollingModule ? Object.values(ScrollingModule) : []; | ||
|
||
export const ScrollPanel = ScrollingModuleProps.find((prop: any) => prop?.render?.toString?.().includes("{case\"x\":")) as FC<{ children?: ReactNode }>; | ||
|
||
export const ScrollPanelGroup: FC<{ children?: ReactNode; }> = findModuleChild((mod) => { | ||
if (typeof mod !== 'object' || !mod.__esModule) return undefined; | ||
return mod.ScrollPanelGroup; | ||
}) | ||
export const ScrollPanelGroup: FC<{ children?: ReactNode }> = findModuleChild((mod) => { | ||
if (typeof mod !== 'object') return undefined; | ||
for (let prop in mod) { | ||
if (mod[prop]?.render?.toString().includes(".FocusVisibleChild()),[])")) return mod[prop]; | ||
} | ||
}); |