diff --git a/src/app/components/DeviceDetailOverlay.tsx b/src/app/components/DeviceDetailOverlay.tsx
index 31263ef..6f269c3 100644
--- a/src/app/components/DeviceDetailOverlay.tsx
+++ b/src/app/components/DeviceDetailOverlay.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from 'react';
+import { SettingsInput } from './ui/settings-input';
import { X, ChevronLeft, ChevronRight, Printer, HardDrive, Network, Box, FolderOpen, MoreVertical, Play, Pause, SkipForward, SkipBack, RotateCcw } from 'lucide-react';
import { motion, AnimatePresence } from 'motion/react';
import { toast } from 'sonner';
@@ -341,12 +342,12 @@ export default function DeviceDetailOverlay({
-
{
+ onCommit={(v) => {
const path = getDevicePath();
- updateDeviceSetting([...path, 'name'], e.target.value);
+ updateDeviceSetting([...path, 'name'], v);
}}
className="w-full px-3 py-2 border border-neutral-300 rounded-lg"
/>
@@ -356,12 +357,12 @@ export default function DeviceDetailOverlay({
-
{
+ onCommit={(v) => {
const path = getDevicePath();
- updateDeviceSetting([...path, 'base_url'], e.target.value);
+ updateDeviceSetting([...path, 'base_url'], v);
}}
className="flex-1 px-3 py-2 border border-neutral-300 rounded-lg"
/>
@@ -388,11 +389,10 @@ export default function DeviceDetailOverlay({
-
{
- const newUrl = e.target.value;
+ onCommit={(newUrl) => {
const devicePath = getDevicePath();
const newConfig = JSON.parse(JSON.stringify(config));
let dev = newConfig;
@@ -440,12 +440,12 @@ export default function DeviceDetailOverlay({
-
{
+ onCommit={(v) => {
const path = getDevicePath();
- updateDeviceSetting([...path, 'cache'], e.target.value);
+ updateDeviceSetting([...path, 'cache'], v);
}}
className="flex-1 px-3 py-2 border border-neutral-300 rounded-lg"
/>
@@ -500,12 +500,12 @@ export default function DeviceDetailOverlay({
{deviceData.baud !== undefined && (
-
{
+ value={String(deviceData.baud ?? '')}
+ onCommit={(v) => {
const path = getDevicePath();
- updateDeviceSetting([...path, 'baud'], parseInt(e.target.value));
+ updateDeviceSetting([...path, 'baud'], parseInt(v));
}}
className="w-full px-3 py-2 border border-neutral-300 rounded-lg"
/>
diff --git a/src/app/components/IECPage.tsx b/src/app/components/IECPage.tsx
index d070a5d..5c45e6c 100644
--- a/src/app/components/IECPage.tsx
+++ b/src/app/components/IECPage.tsx
@@ -1,6 +1,7 @@
import { useState } from 'react';
import { Cable, Code2, Cpu, FolderOpen, Link, List, Zap } from 'lucide-react';
import MediaBrowser from './MediaBrowser';
+import { SettingsInput } from './ui/settings-input';
interface IECPageProps {
config: any;
@@ -92,10 +93,10 @@ export default function IECPage({ config, setConfig }: IECPageProps) {
-
updateSetting(['settings', 'autoboot'], e.target.value)}
+ onCommit={(v) => updateSetting(['settings', 'autoboot'], v)}
className="flex-1 px-3 py-2 border border-neutral-300 rounded-lg"
/>