feat: refine account management and targeted editing

Add local provider icons, larger compact account rows, the requested column order, and full username display while keeping secrets masked. Replace provider-wide editing with a row-specific editor that preserves sibling accounts, exact limits, live usage counters, and status metadata. Add targeted credential validation, release notices, and regression coverage.
This commit is contained in:
Sucukdeluxe
2026-08-09 21:32:09 +02:00
parent cf72ea2db1
commit 9f0140dd3c
30 changed files with 1356 additions and 130 deletions
+28
View File
@@ -0,0 +1,28 @@
import { describe, expect, it } from "vitest";
import { canPersistExpectedAccountStatus } from "../src/main/account-status-persistence";
import type { DebridAccountStatus } from "../src/shared/types";
function status(accountId: string, valid = true): DebridAccountStatus {
return {
accountId,
provider: "megadebrid",
label: "Account 1",
maskedLogin: "us***om",
valid,
isPremium: true,
premiumUntilMs: null,
message: valid ? "OK" : "Ungültig",
checkedAt: 1
};
}
describe("account status persistence", () => {
it("accepts only one valid status for the expected account", () => {
expect(canPersistExpectedAccountStatus([status("expected")], "expected")).toBe(true);
expect(canPersistExpectedAccountStatus([], "expected")).toBe(false);
expect(canPersistExpectedAccountStatus([status("other")], "expected")).toBe(false);
expect(canPersistExpectedAccountStatus([status("expected", false)], "expected")).toBe(false);
expect(canPersistExpectedAccountStatus([status("expected"), status("other")], "expected")).toBe(false);
expect(canPersistExpectedAccountStatus([status("expected")], "")).toBe(false);
});
});