Add sync-limit config UI + Restart button, fix restart teardown

- Expose the sync limit in the config panel: "Fetch all mail" checkbox (sync_limit=0) + a max-per-folder number input.
- Config fields are editable while the bridge runs; Save persists anytime, a Restart button (stop+start) applies changes.
- Fix the in-process restart: stop() was fire-and-forget and left IMAP/SMTP tasks holding their ports, so the next start failed to bind and aborted the new syncer before it listed folders (empty store). stop() now aborts all three tasks and awaits full teardown.
This commit is contained in:
Anthony M
2026-05-27 17:31:03 +02:00
committed by GitHub
parent bc03d244c6
commit f0656b595b
6 changed files with 128 additions and 13 deletions
+2
View File
@@ -3,6 +3,8 @@ export interface Config {
imap_port: number;
smtp_port: number;
api_url: string;
/** Max mails synced per folder; 0 = fetch all. */
sync_limit: number;
}
export type BridgeStatus = "Stopped" | "Starting" | "Running" | { Error: string };