diff --git a/CHANGELOG.md b/CHANGELOG.md index f45bd35..6558a63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to Multi-Debrid Downloader are documented in this file. +## [2.0.32] - 2026-08-13 + +### Account controls + +- Prevented rapid account enable and disable interactions from opening the account editor. +- Removed the redundant global account toggle so every configured account remains independently controlled. + ## [2.0.31] - 2026-08-13 ### Account rotation and lifecycle diff --git a/package-lock.json b/package-lock.json index f0379ac..0535e14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "real-debrid-downloader", - "version": "2.0.31", + "version": "2.0.32", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "real-debrid-downloader", - "version": "2.0.31", + "version": "2.0.32", "license": "MIT", "dependencies": { "adm-zip": "0.6.0", diff --git a/package.json b/package.json index 2b606f6..2f5c3e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "2.0.31", + "version": "2.0.32", "description": "Desktop downloader", "main": "build/main/main/main.js", "author": "Sucukdeluxe", diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index 325857e..c8359e4 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -45,7 +45,7 @@ import { sortPackageOrderByName } from "./package-order"; import { pruneSelection, shouldClearDownloadSelection, shouldClearDownloadSelectionOnEscape } from "./selection"; -import { buildBulkAccountEnabledState, buildConfiguredProviderOrder, getAccountDialogSelectableOptions, matchesAccountModeFilter, pruneAccountRowSelection, resolveAccountUsername, resolveVisibleAccountKind } from "./account-ui"; +import { buildConfiguredProviderOrder, getAccountDialogSelectableOptions, matchesAccountModeFilter, pruneAccountRowSelection, resolveAccountUsername, resolveVisibleAccountKind } from "./account-ui"; import type { AccountModeFilter } from "./account-ui"; import { buildAccountDeleteCommand, buildAccountReplaceCommand, createAccountEditState, validateAccountEdit } from "./account-edit"; import type { AccountEditState, AccountEditTarget, AccountKind, AccountService, SingleAccountKind } from "./account-edit"; @@ -3038,34 +3038,6 @@ export function App(): ReactElement { } }; - const setAllAccountsEnabled = (enabled: boolean): void => { - const configuredProviderIds = [...new Set(configuredAccounts.map((entry) => entry.service as DebridProvider))]; - const nextEnabledState = buildBulkAccountEnabledState( - settingsDraftRef.current.disabledProviders || [], - configuredProviderIds, - accountRows.filter((row) => row.toggleKind === "mega" && row.accountId).map((row) => row.accountId as string), - accountRows.filter((row) => row.toggleKind === "dl" && row.accountId).map((row) => row.accountId as string), - enabled - ); - const nextDraft: RendererSettingsDraft = { - ...settingsDraftRef.current, - ...nextEnabledState, - megaDebridApiDisabledAccountIds: enabled ? [] : accountRows.filter((row) => row.entry.kind === "megadebrid-api" && row.accountId).map((row) => row.accountId as string), - megaDebridWebDisabledAccountIds: enabled ? [] : accountRows.filter((row) => row.entry.kind === "megadebrid-web" && row.accountId).map((row) => row.accountId as string) - }; - nextDraft.megaDebridDisabledAccountIds = [...new Set([ - ...nextDraft.megaDebridApiDisabledAccountIds, - ...nextDraft.megaDebridWebDisabledAccountIds - ])]; - const nextOverrides = Object.fromEntries(accountRows.map((row) => [row.rowKey, enabled])); - enqueueAccountSettingsChange( - nextDraft, - nextOverrides, - enabled ? "Accounts aktiviert" : "Accounts deaktiviert", - "Accounts konnten nicht umgeschaltet werden" - ); - }; - const removeAccountTableRow = (row: AccountTableRow): void => { setAccountContextMenu(null); void (async () => { @@ -5068,7 +5040,6 @@ export function App(): ReactElement { rows: visibleAccountRows, selectedIds: selectedAccountViewId ? [selectedAccountViewId] : [], busy: actionBusy || accountCheckBusy, - allEnabled: accountRows.length > 0 && accountRows.some((row) => !row.disabled), statusSort: accountStatusSort, rules: { providerOrder: activeProviderOrder.map((provider) => providerLabelWithMode(provider, settingsDraft)), @@ -5121,7 +5092,6 @@ export function App(): ReactElement { if (row) removeAccountTableRow(row); }, onCheckAll: () => { void checkAllAccounts(); }, - onSetAllEnabled: (enabled) => { void setAllAccountsEnabled(enabled); }, onStatusSort: cycleAccountStatusSort, onMoveProvider: (index, direction) => { const target = index + direction; diff --git a/src/renderer/account-ui.ts b/src/renderer/account-ui.ts index 6c278a2..806caea 100644 --- a/src/renderer/account-ui.ts +++ b/src/renderer/account-ui.ts @@ -58,24 +58,3 @@ export function isAccountRowSelectionKey(key: string, originatedOnRow: boolean): export function resolveAccountUsername(storedUsername: string, checkedEmail?: string): string { return checkedEmail?.trim() || storedUsername.trim() || "—"; } - -export function buildBulkAccountEnabledState( - currentDisabledProviders: DebridProvider[], - configuredProviders: DebridProvider[], - megaAccountIds: string[], - debridLinkKeyIds: string[], - enabled: boolean -): { - disabledProviders: DebridProvider[]; - megaDebridDisabledAccountIds: string[]; - debridLinkDisabledKeyIds: string[]; -} { - const configured = new Set(configuredProviders); - return { - disabledProviders: enabled - ? currentDisabledProviders.filter((provider) => !configured.has(provider)) - : [...new Set([...currentDisabledProviders, ...configuredProviders])], - megaDebridDisabledAccountIds: enabled ? [] : [...new Set(megaAccountIds)], - debridLinkDisabledKeyIds: enabled ? [] : [...new Set(debridLinkKeyIds)] - }; -} diff --git a/src/renderer/i18n.ts b/src/renderer/i18n.ts index f322380..fffc1ae 100644 --- a/src/renderer/i18n.ts +++ b/src/renderer/i18n.ts @@ -29,7 +29,7 @@ const pairs = [ ["Hoch", "High"], ["Normal", "Normal"], ["Niedrig", "Low"], ["In Warteschlange", "Queued"], ["Abgeschlossen", "Completed"], ["Entpackt", "Extracted"], ["Automatisch entpacken", "Extract automatically"], ["Liste leeren", "Clear list"], ["Sitzung", "Session"], ["Gesamt", "Total"], ["Bereit", "Ready"], ["Download läuft", "Download running"], ["Wartet", "Waiting"], ["Offline", "Offline"], ["Übersicht", "Overview"], ["Verwendungsregeln", "Usage rules"], ["Accountverwaltung", "Account management"], ["Accounts hinzufügen, prüfen und verwalten.", "Add, check and manage accounts."], - ["Accounts zum Herunterladen verwenden", "Use accounts for downloads"], ["Download-Traffic übrig", "Download traffic remaining"], ["Benutzername", "Username"], ["E-Mail", "Email"], ["Verfallsdatum", "Expiration date"], ["Passwort/Zugang", "Password/access"], + ["Download-Traffic übrig", "Download traffic remaining"], ["Benutzername", "Username"], ["E-Mail", "Email"], ["Verfallsdatum", "Expiration date"], ["Passwort/Zugang", "Password/access"], ["Account hinzufügen", "Add account"], ["Ausgewählte prüfen", "Check selected"], ["Ausgewählte entfernen", "Remove selected"], ["Aktivieren", "Enable"], ["Deaktivieren", "Disable"], ["Noch nicht geprüft", "Not checked yet"], ["Aktiviert", "Enabled"], ["Aktionen", "Actions"], ["Deaktiviert", "Disabled"], ["Premium aktiv", "Premium active"], ["API-Key aktiv", "API key active"], ["API-Account", "API account"], ["API-Key", "API key"], ["Ungültiger API-Key (nicht autorisiert)", "Invalid API key (not authorized)"], ["Free Account", "Free account"], ["Unbeschränkt", "Unlimited"], ["Keine Accounts eingerichtet", "No accounts configured"], diff --git a/src/renderer/views/settings/AccountWorkspace.tsx b/src/renderer/views/settings/AccountWorkspace.tsx index de28da7..c48fba4 100644 --- a/src/renderer/views/settings/AccountWorkspace.tsx +++ b/src/renderer/views/settings/AccountWorkspace.tsx @@ -63,10 +63,9 @@ export interface AccountWorkspaceViewModel { selectedIds: readonly string[]; busy: boolean; error?: string; - allEnabled?: boolean; statusSort?: "none" | "desc" | "asc"; rules: AccountRulesViewModel; -} +} export interface AccountWorkspaceActions { onPanelChange: (panel: AccountWorkspacePanel) => void; @@ -77,8 +76,7 @@ export interface AccountWorkspaceActions { onAdd: () => void; onRemoveSelected: () => void; onCheckAll: () => void; - onSetAllEnabled?: (enabled: boolean) => void; - onStatusSort?: () => void; + onStatusSort?: () => void; onMoveProvider?: (index: number, direction: -1 | 1) => void; onProviderDragStart?: (event: DragEvent, index: number) => void; onProviderDragOver?: (event: DragEvent, index: number) => void; @@ -226,8 +224,9 @@ function AccountRow({ disabled={busy} onChange={() => actions.onToggleEnabled(row.id)} onClick={(event) => event.stopPropagation()} + onDoubleClick={(event) => event.stopPropagation()} type="checkbox" - /> + /> @@ -440,18 +439,7 @@ export function AccountWorkspace({ model, actions }: AccountWorkspaceProps): Rea

Accountverwaltung

Accounts hinzufügen, prüfen und verwalten.

- {typeof model.allEnabled === "boolean" && actions.onSetAllEnabled ? ( - - ) : null} - + {ACCOUNT_WORKSPACE_PANELS.map((panel, index) => (