From 7892ce699e3b69654e6a806c19858a9939ae77f0 Mon Sep 17 00:00:00 2001 From: Jaime Idolpx Date: Tue, 9 Jun 2026 03:48:24 -0400 Subject: [PATCH] feat(App, DevicesPage, ToolsPage): remove OtherPage and enhance device settings management with hardware, modem, cassette, and BOIP configurations --- src/app/App.tsx | 6 +- src/app/components/DevicesPage.tsx | 111 ++++++++++++++++ src/app/components/OtherPage.tsx | 202 ----------------------------- src/app/components/ToolsPage.tsx | 138 ++++++++++---------- 4 files changed, 182 insertions(+), 275 deletions(-) delete mode 100644 src/app/components/OtherPage.tsx diff --git a/src/app/App.tsx b/src/app/App.tsx index bbf408d..4935d18 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -6,7 +6,6 @@ import DevicesPage from './components/DevicesPage'; import GeneralPage from './components/GeneralPage'; import NetworkPage from './components/NetworkPage'; import IECPage from './components/IECPage'; -import OtherPage from './components/OtherPage'; import ToolsPage from './components/ToolsPage'; import SearchOverlay from './components/SearchOverlay'; import MediaManager from './components/MediaManager'; @@ -16,7 +15,7 @@ import logoSvg from '../imports/logo.svg'; import { useSettings } from './settings'; import { WsProvider } from './ws'; -type Page = 'status' | 'devices' | 'iec' | 'network' | 'other' | 'general' | 'tools' | 'apps' | AppId; +type Page = 'status' | 'devices' | 'iec' | 'network' | 'general' | 'tools' | 'apps' | AppId; type AppId = | 'file-manager' @@ -73,7 +72,6 @@ export default function App() { devices: setDevicesOpenId(null)} />, iec: , network: , - other: , general: , tools: , apps: ( @@ -327,7 +325,7 @@ function AppPage({ title, onBack }: { title: string; onBack: () => void }) { Network + +
+ + +
+
+ + +
+ + + {/* ── Modem ── */} +

Modem

+
+
+ + +
+
+ + +
+
+ + {/* ── Cassette ── */} +

Cassette

+
+
+ + +
+
+ + updateSetting(['cassette', 'play_record'], e.target.value)} className="w-full px-3 py-2 border border-neutral-300 rounded-lg" /> +
+
+ + updateSetting(['cassette', 'pulldown'], e.target.value)} className="w-full px-3 py-2 border border-neutral-300 rounded-lg" /> +
+
+ + updateSetting(['cassette', 'url'], e.target.value)} className="w-full px-3 py-2 border border-neutral-300 rounded-lg" /> +
+
+ + {/* ── BOIP ── */} +

BOIP

+
+
+ + +
+
+ + updateSetting(['boip', 'host'], e.target.value)} className="w-full px-3 py-2 border border-neutral-300 rounded-lg" /> +
+
+ + updateSetting(['boip', 'port'], e.target.value)} className="w-full px-3 py-2 border border-neutral-300 rounded-lg" /> +
+
); } diff --git a/src/app/components/OtherPage.tsx b/src/app/components/OtherPage.tsx deleted file mode 100644 index 492f28e..0000000 --- a/src/app/components/OtherPage.tsx +++ /dev/null @@ -1,202 +0,0 @@ -interface OtherPageProps { - config: any; - setConfig: (config: any) => void; -} - -export default function OtherPage({ config, setConfig }: OtherPageProps) { - const updateSetting = (path: string[], value: any) => { - const newConfig = JSON.parse(JSON.stringify(config)); - let current = newConfig; - - for (let i = 0; i < path.length - 1; i++) { - current = current[path[i]]; - } - - current[path[path.length - 1]] = value; - setConfig(newConfig); - }; - - const hardware = config.hardware || {}; - const modem = config.modem || {}; - const cassette = config.cassette || {}; - const boip = config.boip || {}; - - return ( -
-

Hardware

- -
-
- - -
- -
- - -
- -
- - -
-
- -

Modem

- -
-
- - -
- -
- - -
-
- -

Cassette

- -
-
- - -
- -
- - updateSetting(['cassette', 'play_record'], e.target.value)} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" - /> -
- -
- - updateSetting(['cassette', 'pulldown'], e.target.value)} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" - /> -
- -
- - updateSetting(['cassette', 'url'], e.target.value)} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" - /> -
-
- -

BOIP

- -
-
- - -
- -
- - updateSetting(['boip', 'host'], e.target.value)} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" - /> -
- -
- - updateSetting(['boip', 'port'], e.target.value)} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" - /> -
-
-
- ); -} diff --git a/src/app/components/ToolsPage.tsx b/src/app/components/ToolsPage.tsx index 552654d..65b73e5 100644 --- a/src/app/components/ToolsPage.tsx +++ b/src/app/components/ToolsPage.tsx @@ -200,6 +200,75 @@ export default function ToolsPage({ config }: ToolsPageProps) { return (
+ +
+
+
+
+ +
+
+
System Information
+
+
+
+
+ Firmware Version + v2.5.1 +
+
+ Hardware Revision + Rev C +
+
+ Serial Number + ML-2024-0420 +
+
+
+ + + + + + + +
+

System Tools

@@ -270,75 +339,6 @@ export default function ToolsPage({ config }: ToolsPageProps) {
-

System

- -
-
-
-
- -
-
-
System Information
-
-
-
-
- Firmware Version - v2.5.1 -
-
- Hardware Revision - Rev C -
-
- Serial Number - ML-2024-0420 -
-
-
- - - - - - - -
{showFirmware && setShowFirmware(false)} />}