Compare commits
No commits in common. "1e7a3b15aa8f427f3b6c0353f38dbb313cd53152" and "f5fe52bbb35eac44f348ac19dd62f44a95372f75" have entirely different histories.
1e7a3b15aa
...
f5fe52bbb3
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.7.207",
|
"version": "1.7.206",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -2617,9 +2617,6 @@ export function App(): ReactElement {
|
|||||||
return rows;
|
return rows;
|
||||||
}, [configuredAccounts, settingsDraft, snapshot.settings]);
|
}, [configuredAccounts, settingsDraft, snapshot.settings]);
|
||||||
|
|
||||||
const [accountStatusSort, setAccountStatusSort] = useState<"none" | "desc" | "asc">("none");
|
|
||||||
const cycleAccountStatusSort = (): void => setAccountStatusSort((s) => (s === "none" ? "desc" : s === "desc" ? "asc" : "none"));
|
|
||||||
|
|
||||||
const groupedAccountRows = useMemo(() => {
|
const groupedAccountRows = useMemo(() => {
|
||||||
const groups: { service: string; serviceLabel: string; rows: typeof accountRows }[] = [];
|
const groups: { service: string; serviceLabel: string; rows: typeof accountRows }[] = [];
|
||||||
const byService = new Map<string, { service: string; serviceLabel: string; rows: typeof accountRows }>();
|
const byService = new Map<string, { service: string; serviceLabel: string; rows: typeof accountRows }>();
|
||||||
@ -2633,26 +2630,8 @@ export function App(): ReactElement {
|
|||||||
}
|
}
|
||||||
group.rows.push(row);
|
group.rows.push(row);
|
||||||
}
|
}
|
||||||
if (accountStatusSort !== "none") {
|
|
||||||
const statuses = snapshot.settings?.debridAccountStatuses || {};
|
|
||||||
const now = Date.now();
|
|
||||||
const remainingMs = (row: (typeof accountRows)[number]): number => {
|
|
||||||
const st = row.accountId ? statuses[row.accountId] : null;
|
|
||||||
return st && st.premiumUntilMs && st.premiumUntilMs > now ? st.premiumUntilMs - now : -1;
|
|
||||||
};
|
|
||||||
for (const group of groups) {
|
|
||||||
group.rows = [...group.rows].sort((a, b) => {
|
|
||||||
const ra = remainingMs(a);
|
|
||||||
const rb = remainingMs(b);
|
|
||||||
if (ra > 0 && rb > 0) return accountStatusSort === "desc" ? rb - ra : ra - rb;
|
|
||||||
if (ra > 0) return -1;
|
|
||||||
if (rb > 0) return 1;
|
|
||||||
return 0;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return groups;
|
return groups;
|
||||||
}, [accountRows, accountStatusSort, snapshot.settings]);
|
}, [accountRows]);
|
||||||
|
|
||||||
const [collapsedAccountGroups, setCollapsedAccountGroups] = useState<Set<string>>(() => {
|
const [collapsedAccountGroups, setCollapsedAccountGroups] = useState<Set<string>>(() => {
|
||||||
try {
|
try {
|
||||||
@ -5424,7 +5403,7 @@ export function App(): ReactElement {
|
|||||||
<span className="acct2-c-check" />
|
<span className="acct2-c-check" />
|
||||||
<span>Hoster</span>
|
<span>Hoster</span>
|
||||||
<span>Download-Traffic</span>
|
<span>Download-Traffic</span>
|
||||||
<span className="acct2-sortable" title="Nach Premium-Restlaufzeit sortieren (längste/kürzeste)" onClick={cycleAccountStatusSort}>Status{accountStatusSort === "desc" ? " ▼" : accountStatusSort === "asc" ? " ▲" : ""}</span>
|
<span>Status</span>
|
||||||
<span>Benutzername</span>
|
<span>Benutzername</span>
|
||||||
<span>Verfallsdatum</span>
|
<span>Verfallsdatum</span>
|
||||||
<span className="acct2-c-actions">Aktion</span>
|
<span className="acct2-c-actions">Aktion</span>
|
||||||
|
|||||||
@ -3321,8 +3321,6 @@ td {
|
|||||||
.acct2-expiry { font-variant-numeric: tabular-nums; color: var(--muted); }
|
.acct2-expiry { font-variant-numeric: tabular-nums; color: var(--muted); }
|
||||||
.acct2-head > span:nth-child(3),
|
.acct2-head > span:nth-child(3),
|
||||||
.acct2-traffic { text-align: center; }
|
.acct2-traffic { text-align: center; }
|
||||||
.acct2-sortable { cursor: pointer; user-select: none; }
|
|
||||||
.acct2-sortable:hover { color: var(--text); }
|
|
||||||
.acct2-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.acct2-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.acct2-status .account-validity-badge { margin-top: 0; }
|
.acct2-status .account-validity-badge { margin-top: 0; }
|
||||||
.acct2-nostatus { color: var(--muted); opacity: 0.6; font-variant-numeric: tabular-nums; }
|
.acct2-nostatus { color: var(--muted); opacity: 0.6; font-variant-numeric: tabular-nums; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user