From 5973cf9d8669ce00a19137fc74889d9623e518f4 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Sun, 11 Oct 2026 22:51:07 +0300 Subject: [PATCH] Enhance file/phone selector in explorer --- src/components/Layout/App.tsx | 2 +- src/components/SerialConnect.tsx | 35 ++++- src/pages/Apoxi/UnlockBootloaderPage.tsx | 2 +- src/pages/FileExplorer/FileExplorerPage.tsx | 138 ++++++++++++------ src/pages/FileExplorer/FullFlashStatusBar.tsx | 111 +++++++++----- src/pages/Flasher/FlasherPage.tsx | 2 +- src/pages/MemoryDumper/MemoryDumperPage.tsx | 2 +- tests/e2e/fileExplorer.ts | 2 +- 8 files changed, 198 insertions(+), 96 deletions(-) diff --git a/src/components/Layout/App.tsx b/src/components/Layout/App.tsx index f7d74f5..dcbd1e4 100644 --- a/src/components/Layout/App.tsx +++ b/src/components/Layout/App.tsx @@ -179,7 +179,7 @@ export const App: ParentComponent = (props) => { gridArea: 'main', minWidth: 0, minHeight: 0, - p: 1, + p: 2, maxWidth: '100%', overflow: hasPermanentDrawer() ? 'auto' : undefined, }} diff --git a/src/components/SerialConnect.tsx b/src/components/SerialConnect.tsx index cc3ef55..09b684c 100644 --- a/src/components/SerialConnect.tsx +++ b/src/components/SerialConnect.tsx @@ -8,6 +8,7 @@ import { FormControlLabel, FormGroup, FormLabel, + IconButton, InputLabel, MenuItem, Popover, @@ -85,7 +86,13 @@ export const SerialConnect: Component = (props) => { ); return ( - + = (props) => { Already connected to {serial.protocol()}. - + } > @@ -138,21 +157,22 @@ export const SerialConnect: Component = (props) => { - + - { - const file = e.currentTarget.files?.[0]; - e.currentTarget.value = ""; - if (file) - void open(file); + + - {(opened) => - <> - - - {opened().fileName} - + > + + - + + + {(opened) => + } ); diff --git a/src/pages/Flasher/FlasherPage.tsx b/src/pages/Flasher/FlasherPage.tsx index ab39ad0..2895443 100644 --- a/src/pages/Flasher/FlasherPage.tsx +++ b/src/pages/Flasher/FlasherPage.tsx @@ -60,7 +60,7 @@ export const FlasherPage: Component = () => { const deviceModeLocked = createMemo(() => serial.readyState() !== SerialReadyState.DISCONNECTED); return ( - + Flasher/Patcher A reimplementation of V_KLay. diff --git a/src/pages/MemoryDumper/MemoryDumperPage.tsx b/src/pages/MemoryDumper/MemoryDumperPage.tsx index 8c18e84..9ed94fe 100644 --- a/src/pages/MemoryDumper/MemoryDumperPage.tsx +++ b/src/pages/MemoryDumper/MemoryDumperPage.tsx @@ -241,7 +241,7 @@ export const MemoryDumperPage: Component = () => { }; return ( - + Memory Dumper diff --git a/tests/e2e/fileExplorer.ts b/tests/e2e/fileExplorer.ts index cbd2216..924e1eb 100644 --- a/tests/e2e/fileExplorer.ts +++ b/tests/e2e/fileExplorer.ts @@ -148,7 +148,7 @@ export class FileExplorer { } fileNameBesideSave(): Promise { - return this.page.getByRole('button', { name: 'Save fullflash' }).locator('xpath=following-sibling::*[1]').textContent(); + return this.page.getByRole('button', { name: 'Save fullflash' }).locator('xpath=preceding-sibling::*[1]').textContent(); } async enter(name: string): Promise {