From 8125c8695cc84358afdfb2657cc6a3638ae68d69 Mon Sep 17 00:00:00 2001 From: Simeon Radivoev Date: Sun, 15 Mar 2026 16:45:00 +0200 Subject: [PATCH] fix: minor UI issues --- src/mainview/components/Header.tsx | 2 +- src/mainview/components/RoundButton.tsx | 4 +- src/mainview/components/options/Button.tsx | 3 + src/mainview/gen/static-icon-assets.gen.ts | 2 +- src/mainview/routes/game/$source.$id.tsx | 66 ++++++++++++---------- 5 files changed, 44 insertions(+), 33 deletions(-) diff --git a/src/mainview/components/Header.tsx b/src/mainview/components/Header.tsx index 272c968..a9affda 100644 --- a/src/mainview/components/Header.tsx +++ b/src/mainview/components/Header.tsx @@ -290,7 +290,7 @@ export function HeaderStatusBar (data: { buttons?: HeaderButton[]; buttonElement className="header-icon sm:size-10 md:size-16" id={b.id} external={b.external} - style={{ viewTransitionName: `header-button-${b.id}` }} + cssStyle={{ viewTransitionName: `header-button-${b.id}` }} onAction={b.action} >{b.icon})} diff --git a/src/mainview/components/RoundButton.tsx b/src/mainview/components/RoundButton.tsx index 3f1c315..9a66e44 100644 --- a/src/mainview/components/RoundButton.tsx +++ b/src/mainview/components/RoundButton.tsx @@ -8,11 +8,11 @@ export function RoundButton (data: { className?: string; external?: boolean; style?: ButtonStyle; + cssStyle?: CSSProperties; } & InteractParams & FocusParams) { - return ( - diff --git a/src/mainview/components/options/Button.tsx b/src/mainview/components/options/Button.tsx index 55461d0..8a1fd57 100644 --- a/src/mainview/components/options/Button.tsx +++ b/src/mainview/components/options/Button.tsx @@ -6,6 +6,7 @@ import } from "@noriginmedia/norigin-spatial-navigation"; import classNames from "classnames"; import { GamePadButtonCode, Shortcut, useShortcuts } from "@/mainview/scripts/shortcuts"; +import { CSSProperties } from "react"; export type ButtonStyle = 'base' | 'accent' | 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'; @@ -29,6 +30,7 @@ export function Button (data: { style?: ButtonStyle, shortcutLabel?: string; focusClassName?: string; + cssStyle?: CSSProperties; } & InteractParams & FocusParams) { const { ref, focused, focusKey } = useFocusable({ @@ -47,6 +49,7 @@ export function Button (data: { ref={ref} onClick={e => data.onAction?.(e.nativeEvent)} disabled={data.disabled} + style={data.cssStyle} className={twMerge("flex items-center justify-center px-4 py-2 disabled:bg-base-200/40 disabled:text-base-content/40 cursor-pointer rounded-3xl md:text-lg not-control-mouse:focused:drop-shadow-lg border border-base-content/5 not-control-mouse:focused:bg-base-content not-control-mouse:focused:text-base-100 control-mouse:hover:bg-base-content control-mouse:hover:text-base-100 active:transition-none active:ring-offset-4", styles[data.style ?? 'base'], focused ? data.focusClassName : undefined, diff --git a/src/mainview/gen/static-icon-assets.gen.ts b/src/mainview/gen/static-icon-assets.gen.ts index 1d1a4aa..cb3fe1b 100644 --- a/src/mainview/gen/static-icon-assets.gen.ts +++ b/src/mainview/gen/static-icon-assets.gen.ts @@ -464,7 +464,7 @@ const assets = new Set([ ]); // Store basePath resolved from Vite config -const BASE_PATH = "/"; +const BASE_PATH = "./"; /** diff --git a/src/mainview/routes/game/$source.$id.tsx b/src/mainview/routes/game/$source.$id.tsx index b3b6407..1621de8 100644 --- a/src/mainview/routes/game/$source.$id.tsx +++ b/src/mainview/routes/game/$source.$id.tsx @@ -64,6 +64,42 @@ function Error (data: ErrorComponentProps) ; } +function MainDetailsPending () +{ + + const { ref } = useFocusable({ focusKey: "main-details" }); + + return
+
+
+
+
+
+
+ } > + } >
+ + } > + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
; +} + function GameDetailsUIPending () { const { ref, focusKey, focusSelf } = useFocusable({ focusKey: "game-details-error", preferredChildFocusKey: "main-details" }); @@ -83,35 +119,7 @@ function GameDetailsUIPending ()
-
-
-
-
-
-
-
- } > - } >
- - } > - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Screenshots