From 7c566e3ff096bbfb726a4859539461558467fdff Mon Sep 17 00:00:00 2001 From: neoapps-dev Date: Sun, 30 Aug 2026 23:21:22 +0300 Subject: [PATCH] feat: minor ui improvements --- public/images/goldmapper.png | Bin 0 -> 4009 bytes src/components/layout/AppHeader.tsx | 7 ++-- src/components/views/GoldMapperView.tsx | 43 +++++++++--------------- src/components/views/HomeView.tsx | 2 +- src/components/views/SettingsView.tsx | 30 ++++++----------- src/css/App.css | 10 ++++-- 6 files changed, 38 insertions(+), 54 deletions(-) create mode 100644 public/images/goldmapper.png diff --git a/public/images/goldmapper.png b/public/images/goldmapper.png new file mode 100644 index 0000000000000000000000000000000000000000..93622c382161104360cf8b14c46951a6ac6d22f3 GIT binary patch literal 4009 zcmbVPeLRzU8^7g*PkG5h8F@*1rQ>ZW*2JMxM@LJPItL>QwUo0Enk+e9Tg!8trNStE zl9U~J91|PzzO1R(ye6B5hOr&Cd700?%Hk7FZxZI zba}UTyVSb4l_nD6)t*|aAsXEIHN?tM^L6?Xtxe4tke_(B`Z{;PT;zTWOTq70cddc<=J4KPL&xSkJ8S)vaQ}y2IYQnT!Pr2`YZUGh9h2)3hs@MyY zQh~l}lLx=$Gid!37rPo6HAEwgsr~e%Jr-tn3(cMCnCt@EeLV&vK`^q-AX8>tH$1iA zOaz5PRms%fSdNSPR95TguJ9Uz^B)G-?NQS$E+96KIKLorizHn%Zy9>ycc*! z#f)5V+jPNit!vzFy=p7&gBWO4_@+BAH=eioSfhnWH?jj6KGyiHV{s`>uE4Y4Qc>SI ziklH4NtZ05(DkM(tGJ2PjvQnLLd~~=ovG>{6+_+n(y1GX8IHDtxLy5;eq|!eB%kX% z*>Totnucnr^C`#*Q8zLP!`=PK`c6o(k^o2hw$Hz8& z)R%OJ>x)?NWkldo@HLNrGx#~!Kp>laOf>bE^SUrFSAF6P%IP zIp3RSp-uYcz&i?hB?}(jTlVPT+*=Dz!rt)Gm(^?sMNeN0`q!w77EN3FQ4q&W>>8_O z9f-VQnoP1#*H!j9CTGM>C5XW3>fxH4p-eiKBh4BCz@4-#&u5tM@K?0?sSnkoG+Tby z+SZe<+(3sR&=hS90Bl)Sx6@gmM9jfzk#F1gQ!M6CN*5ru=z59OM1DRe9%MF6oR+=M-TegW9|cPy4PmgZ-G#Y1Ot!p3iy;)F!~6;NW425UA?PDSHOnj#OH z=hiaYCg<@{Ss}5ETUW<&`j{n0W|`0^Jd|`<=~f1sUq^goiylXo4CjG;Oy zMz9k1pn96^-dM@J^k5XWf*?9CY3+iCfM|X8VM@R1(pZDwHoC53@fb+SE0)$$J+A%D zdKAm1viSAa65|6O+_g3b&SUEdgYhBdm)aK@uSsV)saVuT=R57S93A3? zr!M4I(suR+s1Ab&gP&QL5%ko)6=sDo^hfEzAIiYN3oN0R&I&rCPN)vO%vnE5k0Xqi zC(!kTwa_pGvkBe_0;aT}T!q%6m8R1uL=Mh!K$C>J1_;3>$cRL>I@?%>6TZxrS49SdExcoK zKwn0Lc)rlbvZ)*9$(H`lXuPu?c3^U8yp+jDPQsd*Gm7g%yTINTPkN&6fO2LPw%Evs z&4esynJuZ8eXVi>^~sDeP@O0511@bbT8Qa5x7rHhrv0Vplo;)|dyecg@`yykT;t#gs zTZo9zJlKXicloKq_8!O&{g%)Ss4ZEWpVoXAquc=Kf}-HbbjBq@W5e5TK++pcA|)Hz zSdz4k?;|2t{5T@s{mVTr>;hGrA8D|y7@}1>W7fDf;W`rK5mZyMF>p{jK;xJ~#oK*M zG}x`KdmN(NL>k%@58H|D?aspAsnr}jG$y)V9i{~-ga7=w1%QCDIlX69|1!6aKeDvw N_BCo>u}i?!e*@XkK_dVF literal 0 HcmV?d00001 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 (