feat: add Phokus UI Lab
Add a dev-only Vite UI mode with Tauri API mocks, in-memory fixture scenarios, reusable media source handling, and documentation for browser-based visual testing.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { useGalleryStore } from "../store";
|
||||
import { getMockScenario } from "./mockScenarios";
|
||||
|
||||
export function applyMockScenario() {
|
||||
const scenario = getMockScenario();
|
||||
const store = useGalleryStore.getState();
|
||||
|
||||
if (scenario === "album") {
|
||||
const albumId = store.albums[0]?.id;
|
||||
if (albumId !== undefined) store.viewAlbum(albumId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (scenario === "duplicates") {
|
||||
store.setView("duplicates");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user