diff options
| author | AAGaming <aa@mail.catvibers.me> | 2022-09-18 14:53:36 -0400 |
|---|---|---|
| committer | AAGaming <aa@mail.catvibers.me> | 2022-09-18 14:53:36 -0400 |
| commit | 0f06bc1ef0d0c7b07e2d740599c745bddaec8264 (patch) | |
| tree | f85600d5f4ff14eadc3449515ad0cc7107c90736 /frontend/src/components/settings | |
| parent | c774451ff47a453486796585c7f3decfd8b1ee65 (diff) | |
| download | decky-loader-0f06bc1ef0d0c7b07e2d740599c745bddaec8264.tar.gz decky-loader-0f06bc1ef0d0c7b07e2d740599c745bddaec8264.zip | |
Updater UI tweaks, Markdown tweaks, bump lib
Diffstat (limited to 'frontend/src/components/settings')
| -rw-r--r-- | frontend/src/components/settings/pages/general/Updater.tsx | 81 |
1 files changed, 46 insertions, 35 deletions
diff --git a/frontend/src/components/settings/pages/general/Updater.tsx b/frontend/src/components/settings/pages/general/Updater.tsx index ce859de7..b4ea8536 100644 --- a/frontend/src/components/settings/pages/general/Updater.tsx +++ b/frontend/src/components/settings/pages/general/Updater.tsx @@ -1,4 +1,13 @@ -import { Carousel, DialogButton, Field, Focusable, ProgressBarWithInfo, Spinner, showModal } from 'decky-frontend-lib'; +import { + Carousel, + DialogButton, + Field, + FocusRing, + Focusable, + ProgressBarWithInfo, + Spinner, + showModal, +} from 'decky-frontend-lib'; import { useCallback } from 'react'; import { Suspense, lazy } from 'react'; import { useEffect, useState } from 'react'; @@ -14,39 +23,41 @@ const MarkdownRenderer = lazy(() => import('../../../Markdown')); function PatchNotesModal({ versionInfo, closeModal }: { versionInfo: VerInfo | null; closeModal?: () => {} }) { return ( <Focusable onCancelButton={closeModal}> - <Carousel - fnItemRenderer={(id: number) => ( - <Focusable - style={{ - marginTop: '40px', - height: 'calc( 100% - 40px )', - overflowY: 'scroll', - display: 'flex', - justifyContent: 'center', - margin: '40px', - }} - > - <div> - <h1>{versionInfo?.all?.[id]?.name}</h1> - {versionInfo?.all?.[id]?.body ? ( - <WithSuspense> - <MarkdownRenderer onDismiss={closeModal}>{versionInfo.all[id].body}</MarkdownRenderer> - </WithSuspense> - ) : ( - 'no patch notes for this version' - )} - </div> - </Focusable> - )} - fnGetId={(id) => id} - nNumItems={versionInfo?.all?.length} - nHeight={window.innerHeight - 40} - nItemHeight={window.innerHeight - 40} - nItemMarginX={0} - initialColumn={0} - autoFocus={true} - fnGetColumnWidth={() => window.innerWidth} - /> + <FocusRing> + <Carousel + fnItemRenderer={(id: number) => ( + <Focusable + style={{ + marginTop: '40px', + height: 'calc( 100% - 40px )', + overflowY: 'scroll', + display: 'flex', + justifyContent: 'center', + margin: '40px', + }} + > + <div> + <h1>{versionInfo?.all?.[id]?.name}</h1> + {versionInfo?.all?.[id]?.body ? ( + <WithSuspense> + <MarkdownRenderer onDismiss={closeModal}>{versionInfo.all[id].body}</MarkdownRenderer> + </WithSuspense> + ) : ( + 'no patch notes for this version' + )} + </div> + </Focusable> + )} + fnGetId={(id) => id} + nNumItems={versionInfo?.all?.length} + nHeight={window.innerHeight - 40} + nItemHeight={window.innerHeight - 40} + nItemMarginX={0} + initialColumn={0} + autoFocus={true} + fnGetColumnWidth={() => window.innerWidth} + /> + </FocusRing> </Focusable> ); } @@ -123,7 +134,7 @@ export default function UpdaterSettings() { ) : ( <ProgressBarWithInfo layout="inline" - bottomSeparator={false} + bottomSeparator="none" nProgress={updateProgress} indeterminate={reloading} sOperationText={reloading ? 'Reloading' : 'Updating'} |
