fix(accounts): refresh active logins and toggle instantly

Split bulk account checks into active-only and all-configured scopes so disabled providers, Mega-Debrid accounts, and Debrid-Link keys no longer distort the normal result count. Preserve explicit full checks for diagnosing disabled credentials and surface their failed status.

Render account enablement from the optimistic settings draft, persist it with revision-safe rollback, and apply the same immediate behavior to individual and bulk switches. Extend the IPC contract, translations, changelog, and regression coverage.
This commit is contained in:
Sucukdeluxe
2026-08-15 01:14:54 +02:00
parent 64c846861b
commit 0119534e07
15 changed files with 272 additions and 81 deletions
@@ -75,9 +75,10 @@ export interface AccountWorkspaceActions {
onEdit: (rowId: string) => void;
onContextMenu: (rowId: string, x: number, y: number) => void;
onCopyIdentity: (label: "Benutzername" | "E-Mail", value: string) => void;
onAdd: () => void;
onRemoveSelected: () => void;
onCheckAll: () => void;
onAdd: () => void;
onRemoveSelected: () => void;
onCheckActive: () => void;
onCheckAll: () => void;
onSetAllEnabled?: (enabled: boolean) => void;
onStatusSort?: () => void;
onMoveProvider?: (index: number, direction: -1 | 1) => void;
@@ -336,7 +337,8 @@ function AccountOverview({ model, actions }: AccountWorkspaceProps): ReactElemen
<div>
<button className="settings-button settings-button-secondary" disabled={model.busy} onClick={actions.onAdd} type="button"> Hinzufügen</button>
<button className="settings-button settings-button-secondary" disabled={model.busy || model.selectedIds.length === 0} onClick={actions.onRemoveSelected} type="button"> Entfernen</button>
<button className="settings-button settings-button-secondary" disabled={model.busy} onClick={actions.onCheckAll} type="button"> Aktualisieren</button>
<button className="settings-button settings-button-secondary" disabled={model.busy} onClick={actions.onCheckActive} title="Prüft nur aktivierte Accounts." type="button"> Aktive aktualisieren</button>
<button className="settings-button settings-button-secondary" disabled={model.busy} onClick={actions.onCheckAll} title="Prüft alle angelegten Accounts, auch deaktivierte." type="button"> Alle aktualisieren</button>
</div>
<span>{model.rows.length} {model.rows.length === 1 ? "Account" : "Accounts"}</span>
</div>