From aadd29e55439f72ad8fd74372947536dae10682e Mon Sep 17 00:00:00 2001 From: Jaime Idolpx Date: Sun, 7 Jun 2026 20:43:29 -0400 Subject: [PATCH] feat: add file browsing functionality to IECPage for boot disk selection --- src/app/components/IECPage.tsx | 37 ++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/app/components/IECPage.tsx b/src/app/components/IECPage.tsx index 7cbcd8d..372c986 100644 --- a/src/app/components/IECPage.tsx +++ b/src/app/components/IECPage.tsx @@ -1,9 +1,14 @@ +import { useState } from 'react'; +import { FolderOpen } from 'lucide-react'; +import FileBrowser from './FileBrowser'; + interface IECPageProps { config: any; setConfig: (config: any) => void; } export default function IECPage({ config, setConfig }: IECPageProps) { + const [showFileBrowser, setShowFileBrowser] = useState(false); const updateSetting = (path: string[], value: any) => { const newConfig = JSON.parse(JSON.stringify(config)); let current = newConfig; @@ -57,13 +62,33 @@ export default function IECPage({ config, setConfig }: IECPageProps) {
- updateSetting(['iec', 'boot_disk'], e.target.value)} - className="w-full px-3 py-2 border border-neutral-300 rounded-lg" - /> +
+ updateSetting(['iec', 'boot_disk'], e.target.value)} + className="flex-1 px-3 py-2 border border-neutral-300 rounded-lg" + /> + +
+ + {showFileBrowser && ( + { + updateSetting(['iec', 'boot_disk'], path); + setShowFileBrowser(false); + }} + onClose={() => setShowFileBrowser(false)} + /> + )}

Directory Settings