mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 16:51:58 +00:00
fix scrollpanel group
This commit is contained in:
@@ -200,35 +200,37 @@ function AnnouncementModal({
|
|||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
</style>
|
</style>
|
||||||
<ScrollPanelGroup
|
<Focusable style={{ display: 'flex', flexDirection: 'column', gap: '0.5rem', height: '80vh' }}>
|
||||||
// @ts-ignore
|
|
||||||
focusable={true}
|
|
||||||
style={{ height: '80vh' }}
|
|
||||||
// onCancelButton doesn't work here
|
|
||||||
onCancelActionDescription="Back"
|
|
||||||
onButtonDown={(evt: any) => {
|
|
||||||
if (!evt?.detail?.button) return;
|
|
||||||
if (evt.detail.button === 2) {
|
|
||||||
closeModal?.();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<h1>{announcement.title}</h1>
|
<h1>{announcement.title}</h1>
|
||||||
<WithSuspense>
|
<ScrollPanelGroup
|
||||||
<MarkdownRenderer
|
// @ts-ignore
|
||||||
onDismiss={() => {
|
focusable={true}
|
||||||
console.log('Dismiss');
|
style={{ flex: 1, height: '100%' }}
|
||||||
|
// onCancelButton doesn't work here
|
||||||
|
onCancelActionDescription="Back"
|
||||||
|
onButtonDown={(evt: any) => {
|
||||||
|
if (!evt?.detail?.button) return;
|
||||||
|
if (evt.detail.button === 2) {
|
||||||
closeModal?.();
|
closeModal?.();
|
||||||
}}
|
}
|
||||||
>
|
}}
|
||||||
{announcement.text}
|
>
|
||||||
</MarkdownRenderer>
|
<WithSuspense>
|
||||||
</WithSuspense>
|
<MarkdownRenderer
|
||||||
|
onDismiss={() => {
|
||||||
|
console.log('Dismiss');
|
||||||
|
closeModal?.();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{announcement.text}
|
||||||
|
</MarkdownRenderer>
|
||||||
|
</WithSuspense>
|
||||||
|
</ScrollPanelGroup>
|
||||||
<Focusable style={{ display: 'flex', gap: '0.5rem' }}>
|
<Focusable style={{ display: 'flex', gap: '0.5rem' }}>
|
||||||
<DialogButton onClick={() => onHide()}>Close Popup</DialogButton>
|
<DialogButton onClick={() => onHide()}>Close Popup</DialogButton>
|
||||||
<DialogButton onClick={() => onHide()}>Close and Hide Announcement</DialogButton>
|
<DialogButton onClick={() => onHide()}>Close and Hide Announcement</DialogButton>
|
||||||
</Focusable>
|
</Focusable>
|
||||||
</ScrollPanelGroup>
|
</Focusable>
|
||||||
</ModalRoot>
|
</ModalRoot>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user