feat: improve proxy account setup and backup portability

This commit is contained in:
Sucukdeluxe
2026-08-31 22:52:36 +02:00
parent 67dcc305ef
commit 486507d4b2
17 changed files with 618 additions and 63 deletions
+19
View File
@@ -7,6 +7,7 @@ import {
createAccountToggleQueue,
enqueueAccountToggleIntent,
filterAccountDialogOptions,
formatAccountOperationError,
getAvailableAccountOptions,
getAccountDialogSelectableOptions,
isAccountRowSelectionKey,
@@ -33,6 +34,24 @@ describe("account mode filter", () => {
});
});
describe("account operation errors", () => {
it("replaces wrapped IPC proxy markers with actionable messages", () => {
expect(formatAccountOperationError(
"Account konnte nicht gespeichert werden",
new Error("Error invoking remote method: proxy_only_account:proxy_list_missing")
)).toBe("Account konnte nicht gespeichert werden: Proxy-only ist aktiviert, aber es ist keine Proxy-Liste hinterlegt. Hinterlege sie unter Einstellungen → Geschwindigkeit.");
expect(formatAccountOperationError(
"Prüfung fehlgeschlagen",
"proxy_only_account:proxy_unreachable"
)).toContain("feste API-Proxy ist nicht erreichbar");
});
it("preserves non-proxy account failures", () => {
expect(formatAccountOperationError("Prüfung fehlgeschlagen", new Error("Ungültiger API-Key")))
.toBe("Prüfung fehlgeschlagen: Error: Ungültiger API-Key");
});
});
describe("account dialog filter", () => {
const options = [
{ id: "rd-api", serviceLabel: "Real-Debrid", title: "Real-Debrid API", modeLabel: "API", pickerDescription: "API-Token" },