refactor(viewer): explorer UX cleanups (menu, loading, tree, status bar)
Four small UX fixes to the asset explorer: 1. Remove the no-op "View" menu (Textures/Meshes/Audio toggles + Wireframe checkbox) — none were wired to anything. Dropped ViewMode + the current_mode/ wireframe fields from ViewerState (nothing read them); the central panel already dispatches on which preview resource is populated. 2. Loading indicator — clicking a drawer item now flips FileBrowserState.loading and the central panel shows a centered spinner + "Loading <name>…" until the background read/decode applies, instead of leaving the previous item on screen with no feedback. Cleared in poll_loader_channel on FileLoaded/PakLoaded/ Error/Cancelled. 3. Drawer shows only the .pak index, not its .pNN data segments — the segments are the pack's body (loaded when the .pak is opened), so listing them (with no preview) was noise. Dropped the virtual "<stem>.pak" folder too; the .pak now sits as a normal leaf in its real directory. 4. Bottom status bar no longer overflows — horizontal_wrapped, only the source's final path component (full path on hover), file count, and a right-aligned, shortened controls hint. Removed the mode label. Viewer + formats build; all tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -597,20 +597,24 @@ fn poll_loader_channel(
|
||||
pending.path = path;
|
||||
pending.bytes = bytes;
|
||||
pending.ready = true;
|
||||
browser.loading = false;
|
||||
}
|
||||
Ok(IsoLoaderMsg::PakLoaded { name, rows, error }) => {
|
||||
pending_pak.name = name;
|
||||
pending_pak.rows = rows;
|
||||
pending_pak.error = error;
|
||||
pending_pak.ready = true;
|
||||
browser.loading = false;
|
||||
}
|
||||
Ok(IsoLoaderMsg::Cancelled) => {
|
||||
iso_state.loading = false;
|
||||
browser.loading = false;
|
||||
}
|
||||
Ok(IsoLoaderMsg::Error(msg)) => {
|
||||
error!("ISO loader: {}", msg);
|
||||
iso_state.loading = false;
|
||||
iso_state.error = Some(msg);
|
||||
browser.loading = false;
|
||||
}
|
||||
Err(TryRecvError::Empty) | Err(TryRecvError::Disconnected) => break,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user