Files
psysonic/src/components
Frank Stellmacher b138f51332 refactor(settings): G.54 — extract AddServerForm + UserForm + UserManagementSection (#619)
Three self-contained server/user-management components peel ~1000 LOC
out of `Settings.tsx`:

- `AddServerForm.tsx` (~163 LOC) — server URL + credentials + magic-
  string paste form. Used by the Servers tab.
- `UserForm.tsx` (~340 LOC, with `initialUserFormState` + `UserFormState`
  type) — full Navidrome user create/edit form including the
  "save + copy magic string" admin flow.
- `UserManagementSection.tsx` (~485 LOC, with `formatLastSeen` helper) —
  list + CRUD + Trash/Edit row + per-row magic-string-with-password
  modal. Used by the Users tab. Imports `UserForm` directly.

Each component owns its own state, helpers, and modal-portal logic.
Settings.tsx now imports them and threads in props (server URL, admin
token, current username).

Pure code-move. Settings.tsx: 4568 → 3552 LOC (−1016). 18 unused
imports trimmed (navidromeAdmin types/functions, serverMagicString
helpers, ConfirmModal, lucide icons, createPortal).
2026-05-13 01:39:00 +02:00
..