chore: formatting sweep — vp fmt on drifted web files, templ regen
Pre-existing format drift in seven web/src files (blank-line and indent normalization by vp fmt) plus templ generate normalization across the generated _templ.go files; both swept up while committing the filter-builder fix. No behavior changes.
This commit is contained in:
1 parent
28efaf3fe9
commit
c52b514036
48 files changed
+783
-792
No files matched your search
@@ -9,7 +9,6 @@ import { showToast } from "./toast";
|
||||
// triggered actions must never die silently in that state (the
|
||||
// /admin/archived purge + delete buttons were invisible dead-ends: the
|
||||
async function scanAllLibraries(): Promise<void> {
|
||||
|
||||
try {
|
||||
const libsResp = await fetch("/api/libraries", {
|
||||
headers: authHeaders(),
|
||||
@@ -35,7 +34,6 @@ async function scanAllLibraries(): Promise<void> {
|
||||
const scanResp = await fetch(`/api/libraries/${lib.id}/scan`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ force: true }),
|
||||
@@ -229,7 +227,6 @@ function updateLibraryProgress(jobId: string, status: any): void {
|
||||
// aborts the walk at its next context check and skips the archive pass,
|
||||
// so cancelling never archives unvisited files.
|
||||
async function cancelScan(jobId: string): Promise<void> {
|
||||
|
||||
const btn = document.querySelector<HTMLButtonElement>(`[data-cancel-job="${jobId}"]`);
|
||||
if (btn) {
|
||||
btn.disabled = true;
|
||||
@@ -259,7 +256,6 @@ async function cancelScan(jobId: string): Promise<void> {
|
||||
// list so it also covers jobs this page never started (e.g. started
|
||||
// before a refresh), then cancels each one.
|
||||
async function cancelAllScans(): Promise<void> {
|
||||
|
||||
try {
|
||||
const resp = await fetch("/api/scanner/active", {
|
||||
headers: authHeaders(),
|
||||
@@ -398,7 +394,6 @@ function stopScanStatusPolling(): void {
|
||||
// window for the library admin page's inline button; reading history is
|
||||
// deleted with the rows, so a confirm dialog guards it.
|
||||
async function purgeArchivedItems(): Promise<void> {
|
||||
|
||||
if (
|
||||
!(await confirmDialog(
|
||||
"Permanently delete all archived items? Their reading progress, notes, and highlights will be lost.",
|
||||
|
||||
@@ -81,7 +81,6 @@ Alpine.store("bookPicker", {
|
||||
},
|
||||
|
||||
async submit() {
|
||||
|
||||
if (this.selectedBooks.size === 0) {
|
||||
showToast("No books selected", "error");
|
||||
return;
|
||||
|
||||
@@ -227,7 +227,6 @@ Alpine.data("bookshelf", () => ({
|
||||
|
||||
showToast(`Loading filter: ${filterName}...`, "info");
|
||||
|
||||
|
||||
try {
|
||||
// Fetch filter details from API
|
||||
const response = await fetch(`/api/saved-filters/${filterId}`, {
|
||||
@@ -311,7 +310,6 @@ Alpine.data("bookshelf", () => ({
|
||||
|
||||
if (!confirm("Are you sure you want to delete this filter?")) return;
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch(`/api/saved-filters/${filterId}`, {
|
||||
method: "DELETE",
|
||||
|
||||
@@ -107,8 +107,7 @@ function closeCollectionModal(from?: HTMLElement): void {
|
||||
// removed a hidden dialog and left the real modal open — Close and
|
||||
// Cancel did nothing (knob-matrix spec, 2026-10-31).
|
||||
const modal =
|
||||
from?.closest(".fixed.inset-0") ??
|
||||
document.querySelector("#modal-container > .fixed.inset-0");
|
||||
from?.closest(".fixed.inset-0") ?? document.querySelector("#modal-container > .fixed.inset-0");
|
||||
if (modal) {
|
||||
modal.remove();
|
||||
}
|
||||
@@ -439,7 +438,9 @@ Alpine.data("collections", () => ({
|
||||
if (r.ok) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
void import("./toast-error").then((m) => m.showErrorToast("Could not save the listening order"));
|
||||
void import("./toast-error").then((m) =>
|
||||
m.showErrorToast("Could not save the listening order"),
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -426,7 +426,7 @@ async function handleSaveDeviceSettings(event: Event): Promise<void> {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...collection,
|
||||
view_settings: currentSettings,
|
||||
|
||||
@@ -214,7 +214,6 @@ function syncUrl(): void {
|
||||
// Summary fetch (Reading tab) -----------------------------------------------
|
||||
|
||||
async function loadSummary(): Promise<void> {
|
||||
|
||||
document.getElementById("stats-empty")?.classList.add("hidden");
|
||||
const windowLabel = document.getElementById("stats-window-label");
|
||||
if (windowLabel) windowLabel.textContent = "Loading…";
|
||||
|
||||
@@ -11,7 +11,6 @@ export async function searchTagSuggestions(
|
||||
): Promise<TagSuggestion[]> {
|
||||
if (!query || query.length < 2 || !libraryId) return [];
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/media-items/search?tags=${encodeURIComponent(query)}&library_id=${libraryId}&limit=20`,
|
||||
|
||||
Reference in new issue
Block a user