style: format web/src with oxfmt defaults (via vp fmt)
One-time mechanical sweep, isolated from any functional change. - oxfmt defaults: double quotes, semicolons, 2-space indent, LF, printWidth 100, trailing commas, bracket spacing, arrow parens. - vite.config.ts gains an fmt.ignorePatterns block for web/static: vendored/minified assets (htmx.min.js, compiled css) must never be reformatted. - Verified: rebuild after the sweep produces byte-identical JS/CSS bundles; only sourcemaps changed (they embed sourcesContent).
This commit is contained in:
1 parent
8aeecaa0ef
commit
77cd268f4e
37 files changed
+1151
-1853
No files matched your search
@@ -43,11 +43,7 @@ export async function switchWithTransition(
|
||||
}
|
||||
|
||||
try {
|
||||
container.classList.add(
|
||||
"opacity-0",
|
||||
"transition-opacity",
|
||||
"duration-150",
|
||||
);
|
||||
container.classList.add("opacity-0", "transition-opacity", "duration-150");
|
||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
||||
|
||||
loading.classList.remove("hidden");
|
||||
@@ -68,12 +64,7 @@ export async function switchWithTransition(
|
||||
container.classList.remove("transition-opacity", "duration-300");
|
||||
}, 300);
|
||||
} catch (error) {
|
||||
container.classList.remove(
|
||||
"opacity-0",
|
||||
"transition-opacity",
|
||||
"duration-150",
|
||||
"duration-300",
|
||||
);
|
||||
container.classList.remove("opacity-0", "transition-opacity", "duration-150", "duration-300");
|
||||
showToast("Failed to load library", "error");
|
||||
console.error("Switch library error:", error);
|
||||
} finally {
|
||||
@@ -86,18 +77,14 @@ export interface LibrarySwitcherOptions {
|
||||
}
|
||||
|
||||
export function initLibrarySwitcher(options: LibrarySwitcherOptions): void {
|
||||
const librarySelect = document.getElementById(
|
||||
"library-select",
|
||||
) as HTMLSelectElement;
|
||||
const librarySelect = document.getElementById("library-select") as HTMLSelectElement;
|
||||
if (!librarySelect) return;
|
||||
|
||||
const stored = localStorage.getItem("selectedLibrary");
|
||||
if (stored === ALL_LIBRARIES) {
|
||||
librarySelect.value = "";
|
||||
} else if (stored) {
|
||||
const option = librarySelect.querySelector(
|
||||
`option[value="${stored}"]`,
|
||||
);
|
||||
const option = librarySelect.querySelector(`option[value="${stored}"]`);
|
||||
if (option) {
|
||||
librarySelect.value = stored;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user