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 @@
|
||||
export type MockScenario = "rich" | "empty" | "busy" | "duplicates" | "album" | "errors" | "huge";
|
||||
|
||||
const SCENARIOS = new Set<MockScenario>([
|
||||
"rich",
|
||||
"empty",
|
||||
"busy",
|
||||
"duplicates",
|
||||
"album",
|
||||
"errors",
|
||||
"huge",
|
||||
]);
|
||||
|
||||
export function getMockScenario(): MockScenario {
|
||||
if (typeof window === "undefined") return "rich";
|
||||
const value = new URLSearchParams(window.location.search).get("scenario");
|
||||
return value && SCENARIOS.has(value as MockScenario) ? (value as MockScenario) : "rich";
|
||||
}
|
||||
Reference in New Issue
Block a user