From 0f06bc1ef0d0c7b07e2d740599c745bddaec8264 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 18 Sep 2022 14:53:36 -0400 Subject: Updater UI tweaks, Markdown tweaks, bump lib --- frontend/src/components/Markdown.tsx | 1 - .../components/settings/pages/general/Updater.tsx | 81 ++++++++++++---------- 2 files changed, 46 insertions(+), 36 deletions(-) (limited to 'frontend/src') diff --git a/frontend/src/components/Markdown.tsx b/frontend/src/components/Markdown.tsx index cefced91..81618b55 100644 --- a/frontend/src/components/Markdown.tsx +++ b/frontend/src/components/Markdown.tsx @@ -15,7 +15,6 @@ const Markdown: FunctionComponent = (props) => { components={{ div: (nodeProps) => {nodeProps.children}, a: (nodeProps) => { - console.log(nodeProps.node, nodeProps); const aRef = useRef(null); return ( // TODO fix focus ring 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 ( - ( - -
-

{versionInfo?.all?.[id]?.name}

- {versionInfo?.all?.[id]?.body ? ( - - {versionInfo.all[id].body} - - ) : ( - 'no patch notes for this version' - )} -
-
- )} - fnGetId={(id) => id} - nNumItems={versionInfo?.all?.length} - nHeight={window.innerHeight - 40} - nItemHeight={window.innerHeight - 40} - nItemMarginX={0} - initialColumn={0} - autoFocus={true} - fnGetColumnWidth={() => window.innerWidth} - /> + + ( + +
+

{versionInfo?.all?.[id]?.name}

+ {versionInfo?.all?.[id]?.body ? ( + + {versionInfo.all[id].body} + + ) : ( + 'no patch notes for this version' + )} +
+
+ )} + fnGetId={(id) => id} + nNumItems={versionInfo?.all?.length} + nHeight={window.innerHeight - 40} + nItemHeight={window.innerHeight - 40} + nItemMarginX={0} + initialColumn={0} + autoFocus={true} + fnGetColumnWidth={() => window.innerWidth} + /> +
); } @@ -123,7 +134,7 @@ export default function UpdaterSettings() { ) : (