diff --git a/public/images/goldmapper.png b/public/images/goldmapper.png new file mode 100644 index 0000000..93622c3 Binary files /dev/null and b/public/images/goldmapper.png differ diff --git a/src/components/layout/AppHeader.tsx b/src/components/layout/AppHeader.tsx index e953180..78235a7 100644 --- a/src/components/layout/AppHeader.tsx +++ b/src/components/layout/AppHeader.tsx @@ -9,7 +9,10 @@ interface AppHeaderProps { uiFade: Record; } -export const AppHeader = memo(function AppHeader({ playPressSound, uiFade }: AppHeaderProps) { +export const AppHeader = memo(function AppHeader({ + playPressSound, + uiFade, +}: AppHeaderProps) { return ( - + Emerald Legacy Launcher diff --git a/src/components/views/GoldMapperView.tsx b/src/components/views/GoldMapperView.tsx index dabfff1..c8eaebf 100644 --- a/src/components/views/GoldMapperView.tsx +++ b/src/components/views/GoldMapperView.tsx @@ -5,9 +5,6 @@ import { type GoldMapperMapping, } from "../../services/TauriService"; import { useUI, useConfig, useAudio } from "../../context/LauncherContext"; - -const EMERALD_ICON = "/images/emerald_0.png"; - const KEY_FALLBACK = [ "KEY_A", "KEY_D", @@ -21,7 +18,6 @@ const KEY_FALLBACK = [ ]; const MOUSE_IDS = ["MOUSE_LEFT", "MOUSE_MIDDLE", "MOUSE_RIGHT"]; - const MOUSE_LABELS: Record = { MOUSE_LEFT: "Left Click", MOUSE_MIDDLE: "Middle Click", @@ -81,7 +77,6 @@ const GoldMapperView = memo(function GoldMapperView() { const [keyInputError, setKeyInputError] = useState(null); const [focusIndex, setFocusIndex] = useState(null); const containerRef = useRef(null); - useEffect(() => { TauriService.goldMapperGetDefaults() .then((defaults) => { @@ -112,11 +107,7 @@ const GoldMapperView = memo(function GoldMapperView() { .catch(console.error); }, []); - const getTo = useCallback( - (id: string) => binds[id] ?? id, - [binds], - ); - + const getTo = useCallback((id: string) => binds[id] ?? id, [binds]); const buildPayload = useCallback( (nextBinds: Record): GoldMapperMapping[] => { const rows: GoldMapperMapping[] = []; @@ -154,9 +145,7 @@ const GoldMapperView = memo(function GoldMapperView() { playPressSound(); setEditing(id); setModalFocusIndex(0); - setKeyInput( - /^KEY_/.test(getTo(id)) ? displayName(getTo(id)) : "", - ); + setKeyInput(/^KEY_/.test(getTo(id)) ? displayName(getTo(id)) : ""); setKeyInputError(null); }, [playPressSound, getTo], @@ -202,7 +191,11 @@ const GoldMapperView = memo(function GoldMapperView() { const rows: Row[] = useMemo(() => { const list: Row[] = [{ kind: "reset", key: "reset" }]; list.push({ kind: "enable", key: "enable" }); - list.push({ kind: "header", key: "controller_header", label: "Controller" }); + list.push({ + kind: "header", + key: "controller_header", + label: "Controller", + }); for (const id of controllerIds) { list.push({ kind: "bind", @@ -341,7 +334,6 @@ const GoldMapperView = memo(function GoldMapperView() { const isEnable = row.kind === "enable"; const focusIdx = nextFocusIndex(); const focused = focusIndex === focusIdx; - return (