chore(servers): remove quick/full scan buttons from server cards (#843)

Drops the Quick/Full scan actions and all supporting logic — they are no
longer needed. Removes the ServerScanActions component (incl. the unused
compact variant), the subsonicScan API, the scanStore, and the app-root
useScanPolling hook (no more background scan polling). Cleans up the
.server-scan-* CSS and the settings.scan i18n block across all 9 locales.

440 deletions, no new code; tsc + bundle clean.
This commit is contained in:
Frank Stellmacher
2026-05-21 22:43:46 +02:00
committed by GitHub
parent f9f96f024f
commit 1a7a2a0bfc
16 changed files with 0 additions and 440 deletions
-33
View File
@@ -1,33 +0,0 @@
import { create } from 'zustand';
export type ScanPhase = 'idle' | 'starting' | 'running' | 'just-finished' | 'error';
export interface ScanEntry {
phase: ScanPhase;
type: 'quick' | 'full';
count: number;
/** Set while user is in "press again to confirm" state for a full scan. */
confirmingFull: boolean;
}
const EMPTY: ScanEntry = { phase: 'idle', type: 'quick', count: 0, confirmingFull: false };
interface ScanState {
byServer: Record<string, ScanEntry>;
get: (serverId: string) => ScanEntry;
set: (serverId: string, patch: Partial<ScanEntry>) => void;
clear: (serverId: string) => void;
}
export const useScanStore = create<ScanState>((set, getState) => ({
byServer: {},
get: (serverId) => getState().byServer[serverId] ?? EMPTY,
set: (serverId, patch) => set(s => ({
byServer: { ...s.byServer, [serverId]: { ...(s.byServer[serverId] ?? EMPTY), ...patch } },
})),
clear: (serverId) => set(s => {
const next = { ...s.byServer };
delete next[serverId];
return { byServer: next };
}),
}));