A full-featured download manager.
feat(downloads): keep statistics visible with task details (#2527)
Dr_rOot3d1d92442821
diff --git a/src/main/index.ts b/src/main/index.tsindex f7405885..ee303bab 100644--- a/src/main/index.ts+++ b/src/main/index.ts@@ -428,6 +428,11 @@ const settingsManager = new SettingsManager(settingsPath, {) {eventBus.emit(Events.NotificationsChanged)}+ if (old.app.keepStatsBarVisible !== updated.app.keepStatsBarVisible) {+ eventBus.emit(Events.StatsBarVisibilityChanged, {+ keepStatsBarVisible: updated.app.keepStatsBarVisible,+ })+ }if (old.app.sidebarColor !== updated.app.sidebarColor) {eventBus.emit(Events.SidebarColorChanged, {sidebarColor: updated.app.sidebarColor,diff --git a/src/renderer/components/desktop-kit/inspector-drawer.tsx b/src/renderer/components/desktop-kit/inspector-drawer.tsxindex fa2d2d61..eb97b221 100644--- a/src/renderer/components/desktop-kit/inspector-drawer.tsx+++ b/src/renderer/components/desktop-kit/inspector-drawer.tsx@@ -12,10 +12,17 @@ import { type ReactNode, useEffect, useRef, useState } from 'react'export type InspectorSnap = 'compact' | 'medium' | 'expanded'export const SNAP_NAMES: InspectorSnap[] = ['compact', 'medium', 'expanded']-export function getInspectorSnapHeights(availableHeight: number) {+export function getInspectorSnapHeights(+ availableHeight: number,+ maxHeight = Number.POSITIVE_INFINITY+) {const maximum = Math.max(1,- Math.min(Math.round(availableHeight * 0.75), availableHeight - 64)+ Math.min(+ Math.round(availableHeight * 0.75),+ availableHeight - 64,+ maxHeight+ ))// Keep useful detents at least 48px apart in short windows. The semantic// preference survives merging, so resizing the window restores its intent.@@ -28,6 +35,8 @@ export function getInspectorSnapHeights(availableHeight: number) {export function InspectorDrawer({container,+ bottomInset = 0,+ maxHeight,open,snap,onSnapChange,@@ -38,6 +47,10 @@ export function InspectorDrawer({children,}: {container: HTMLElement | null+ /** Space below the drawer reserved for persistent controls. */+ bottomInset?: number+ /** Optional limit that keeps content above the drawer reachable. */+ maxHeight?: numberopen: booleansnap: InspectorSnaponSnapChange: (snap: InspectorSnap) => void@@ -61,7 +74,10 @@ export function InspectorDrawer({observer.observe(container)return () => observer.disconnect()}, [container])- const heights = getInspectorSnapHeights(availableHeight)+ const heights = getInspectorSnapHeights(+ Math.max(0, availableHeight - bottomInset),+ maxHeight+ )const maximum = heights[2]const snapPoints = [...new Set(heights)]const height = heights[SNAP_NAMES.indexOf(snap)]@@ -102,7 +118,10 @@ export function InspectorDrawer({}}><DrawerPortal container={container}>- <DrawerViewport className="pointer-events-none absolute inset-0 z-30 flex items-end overflow-hidden">+ <DrawerViewport+ className="pointer-events-none absolute inset-0 z-30 flex items-end overflow-hidden"+ style={{ bottom: bottomInset }}+ ><DrawerPopupref={popupRef}initialFocus={false}diff --git a/src/renderer/routes/downloads/downloads-page.tsx b/src/renderer/routes/downloads/downloads-page.tsxindex 2b986696..04f3a916 100644--- a/src/renderer/routes/downloads/downloads-page.tsx+++ b/src/renderer/routes/downloads/downloads-page.tsx@@ -2,7 +2,12 @@ import { PanelShell } from '@renderer/components/desktop-kit/panel/panel-shell'import { Button } from '@renderer/components/ui/button'import { Skeleton } from '@renderer/components/ui/skeleton'import { useTaskList } from '@renderer/hooks/use-task-list'+import { useTransportMirror } from '@renderer/hooks/use-transport-mirror'import { isTaskAvailable, resolveTaskRoute } from '@shared/lib/task-navigation'+import { Events } from '@shared/protocol/events'+import { Queries } from '@shared/protocol/queries'+import { DEFAULT_APP_SETTINGS } from '@shared/schemas/app-settings'+import type { AppSettings } from '@shared/types/settings'import type { TaskType } from '@shared/types/task'import {useCallback,@@ -19,6 +24,7 @@ import {useParams,useSearchParams,} from 'react-router'+import { TASK_HEADER_HEIGHT, TASK_ROW_HEIGHT } from './columns'import { DownloadsToolbar } from './downloads-toolbar'import {applyFilter,@@ -285,6 +291,19 @@ export function DownloadsPage() {types,])+ const [keepStatsBarVisible, setKeepStatsBarVisible] = useState(+ DEFAULT_APP_SETTINGS.keepStatsBarVisible+ )+ useTransportMirror({+ events: [Events.StatsBarVisibilityChanged],+ refreshOnSettingsSave: true,+ load: async (stale, read) => {+ const settings = (await read(Queries.GetSettings)) as AppSettings+ if (!stale())+ setKeepStatsBarVisible(settings?.app?.keepStatsBarVisible === true)+ },+ })+const [container, setContainer] = useState<HTMLElement | null>(null)const taskListKey = `${filter}:${serializeTypeParam(types)}`@@ -313,7 +332,7 @@ export function DownloadsPage() {grid: 0,})// biome-ignore lint/correctness/useExhaustiveDependencies: rebind when loading/empty states or the keyed task panel replace the observed elements without resizing the page root- useEffect(() => {+ useLayoutEffect(() => {if (!container) returnconst footerElement = container.querySelector<HTMLElement>('[data-slot="panel-shell-footer"]'@@ -343,10 +362,21 @@ export function DownloadsPage() {if (gridElement) observer.observe(gridElement)return () => observer.disconnect()}, [container, status, hasReadySnapshot, filtered.length, taskListKey])+ const inspectorBottomInset = keepStatsBarVisible ? inspectorMetrics.footer : 0+ // A wrapping footer in a short window must still leave one complete row+ // below the sticky list header, even at the largest drawer snap.+ const inspectorMaxHeight =+ keepStatsBarVisible && inspectorMetrics.grid > 0+ ? Math.max(+ 1,+ inspectorMetrics.grid - TASK_HEADER_HEIGHT - TASK_ROW_HEIGHT+ )+ : undefinedconst inspectorInset = resolveInspectorInset({- pageHeight: inspectorMetrics.page,- footerHeight: inspectorMetrics.footer,+ pageHeight: inspectorMetrics.page - inspectorBottomInset,+ footerHeight: inspectorMetrics.footer - inspectorBottomInset,gridHeight: inspectorMetrics.grid,+ maxHeight: inspectorMaxHeight,snap: inspectorSnap,open: inspectorOpen,})@@ -413,6 +443,8 @@ export function DownloadsPage() {selection={useDownloadsSelection}tasks={tasks}container={container}+ bottomInset={inspectorBottomInset}+ maxHeight={inspectorMaxHeight}onDismiss={removeTaskQuery}/></div>diff --git a/src/renderer/routes/downloads/inspector-inset.ts b/src/renderer/routes/downloads/inspector-inset.tsindex 5cc4fa40..6b820a28 100644--- a/src/renderer/routes/downloads/inspector-inset.ts+++ b/src/renderer/routes/downloads/inspector-inset.ts@@ -6,12 +6,13 @@ import {import { TASK_HEADER_HEIGHT, TASK_ROW_HEIGHT } from './columns'export interface InspectorInsetInput {- /** Height of the portal container the drawer overlays (the page root). */+ /** Height available to the drawer after reserving any persistent footer. */pageHeight: number- /** Height of the PanelShell footer, which the drawer also overlays. */+ /** Height of the footer inside the overlaid area; zero when kept visible. */footerHeight: number/** Height of the task grid wrapper that owns the scroll region. */gridHeight: number+ maxHeight?: numbersnap: InspectorSnapopen: boolean}@@ -27,15 +28,15 @@ export function resolveInspectorInset({pageHeight,footerHeight,gridHeight,+ maxHeight,snap,open,}: InspectorInsetInput): number {if (!open || pageHeight <= 0) return 0const snapIndex = SNAP_NAMES.indexOf(snap)- const drawerHeight =- getInspectorSnapHeights(pageHeight)[- snapIndex === -1 ? SNAP_NAMES.length - 1 : snapIndex- ]+ const drawerHeight = getInspectorSnapHeights(pageHeight, maxHeight)[+ snapIndex === -1 ? SNAP_NAMES.length - 1 : snapIndex+ ]const overlap = Math.max(0, drawerHeight - footerHeight)// A drawer tall enough to swallow nearly the whole grid must not push rows// out of reach in the other direction: cap the compensation so the last rowdiff --git a/src/renderer/routes/downloads/task-inspector-drawer.tsx b/src/renderer/routes/downloads/task-inspector-drawer.tsxindex 52a776df..43c9a016 100644--- a/src/renderer/routes/downloads/task-inspector-drawer.tsx+++ b/src/renderer/routes/downloads/task-inspector-drawer.tsx@@ -57,6 +57,8 @@ export interface TaskInspectorDrawerProps {tasks: readonly DownloadTask[]/** Bounded portal target. The inspector overlays the list without resizing it. */container: HTMLElement | null+ bottomInset?: number+ maxHeight?: numberonDismiss?: () => void}@@ -64,6 +66,8 @@ export function TaskInspectorDrawer({selection,tasks,container,+ bottomInset,+ maxHeight,onDismiss,}: TaskInspectorDrawerProps) {const { t } = useTranslation()@@ -106,6 +110,8 @@ export function TaskInspectorDrawer({return (<InspectorDrawercontainer={container}+ bottomInset={bottomInset}+ maxHeight={maxHeight}open={open}snap={snap}onSnapChange={setSnap}diff --git a/src/renderer/routes/settings/cards/appearance-dialog.tsx b/src/renderer/routes/settings/cards/appearance-dialog.tsxindex 23a8939f..7ed8f5e3 100644--- a/src/renderer/routes/settings/cards/appearance-dialog.tsx+++ b/src/renderer/routes/settings/cards/appearance-dialog.tsx@@ -67,6 +67,7 @@ type AppearanceFields = Pick<| 'byteUnitSystem'| 'traySpeedometer'| 'showDownloadProgress'+ | 'keepStatsBarVisible'| 'trayIconColor'| 'liquidGlassEffect'>@@ -83,6 +84,7 @@ const DEFAULTS: AppearanceFields = {byteUnitSystem: DEFAULT_APP_SETTINGS.byteUnitSystem,traySpeedometer: DEFAULT_APP_SETTINGS.traySpeedometer,showDownloadProgress: DEFAULT_APP_SETTINGS.showDownloadProgress,+ keepStatsBarVisible: DEFAULT_APP_SETTINGS.keepStatsBarVisible,trayIconColor: DEFAULT_APP_SETTINGS.trayIconColor,liquidGlassEffect: DEFAULT_APP_SETTINGS.liquidGlassEffect,}@@ -121,6 +123,8 @@ export function AppearanceDialog({traySpeedometer: all.app.traySpeedometer,showDownloadProgress:all.app.showDownloadProgress ?? DEFAULTS.showDownloadProgress,+ keepStatsBarVisible:+ all.app.keepStatsBarVisible ?? DEFAULTS.keepStatsBarVisible,trayIconColor: all.app.trayIconColor ?? DEFAULTS.trayIconColor,liquidGlassEffect: all.app.liquidGlassEffect,})@@ -466,6 +470,28 @@ export function AppearanceDialog({</SettingsFormRow>)}/>+ <FormField+ control={form.control}+ name="keepStatsBarVisible"+ render={({ field }) => (+ <SettingsFormRow>+ <div className="space-y-1">+ <FormLabel>+ {t('settings.appearance.keepStatsBarVisible')}+ </FormLabel>+ <FormDescription className="text-xs">+ {t('settings.appearance.keepStatsBarVisibleDesc')}+ </FormDescription>+ </div>+ <FormControl>+ <Switch+ checked={field.value}+ onCheckedChange={field.onChange}+ />+ </FormControl>+ </SettingsFormRow>+ )}+ />{(isMac || isWindows || isLinux) && (<><Separator className="my-4" />diff --git a/src/renderer/routes/settings/cards/settings-form-schemas.ts b/src/renderer/routes/settings/cards/settings-form-schemas.tsindex 5567e103..04d66fe6 100644--- a/src/renderer/routes/settings/cards/settings-form-schemas.ts+++ b/src/renderer/routes/settings/cards/settings-form-schemas.ts@@ -29,6 +29,7 @@ export const appearanceFormSchema = appSettingsInputSchema.pick({byteUnitSystem: true,traySpeedometer: true,showDownloadProgress: true,+ keepStatsBarVisible: true,trayIconColor: true,liquidGlassEffect: true,})diff --git a/src/server/index.ts b/src/server/index.tsindex 444c69a8..2e77e0d7 100644--- a/src/server/index.ts+++ b/src/server/index.ts@@ -420,6 +420,11 @@ async function main() {) {eventBus.emit(Events.NotificationsChanged)}+ if (old.app.keepStatsBarVisible !== updated.app.keepStatsBarVisible) {+ eventBus.emit(Events.StatsBarVisibilityChanged, {+ keepStatsBarVisible: updated.app.keepStatsBarVisible,+ })+ }if (old.app.sidebarColor !== updated.app.sidebarColor) {eventBus.emit(Events.SidebarColorChanged, {sidebarColor: updated.app.sidebarColor,diff --git a/src/shared/locales/ar.json b/src/shared/locales/ar.jsonindex 4489e154..a30cacf6 100644--- a/src/shared/locales/ar.json+++ b/src/shared/locales/ar.json@@ -1952,6 +1952,8 @@"appearance": {"byteUnitBinary": "ثنائية ({{megabyte}}، {{gigabyte}} · 1024)","byteUnitDecimal": "عشرية ({{megabyte}}، {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "إبقاء الإحصاءات ظاهرة عند فتح التفاصيل",+ "keepStatsBarVisibleDesc": "إبقاء شريط إحصاءات التنزيل أسفل لوحة تفاصيل المهمة.","byteUnitSystem": "وحدات الحجم والسرعة","byteUnitSystemDefault": "اتباع النظام ({{units}})","byteUnitSystemDesc": "اختر كيفية عرض أحجام الملفات والسرعات.",diff --git a/src/shared/locales/bg.json b/src/shared/locales/bg.jsonindex 0d4ab1de..fd36465a 100644--- a/src/shared/locales/bg.json+++ b/src/shared/locales/bg.json@@ -1876,6 +1876,8 @@"appearance": {"byteUnitBinary": "Двоични ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Десетични ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Показване на статистиката при отворени подробности",+ "keepStatsBarVisibleDesc": "Запазване на лентата със статистика под панела с подробности за задачата.","byteUnitSystem": "Мерни единици за размер и скорост","byteUnitSystemDefault": "Според системата ({{units}})","byteUnitSystemDesc": "Изберете как да се показват размерите на файловете и скоростите.",diff --git a/src/shared/locales/ca.json b/src/shared/locales/ca.jsonindex af53a0df..a6cdf503 100644--- a/src/shared/locales/ca.json+++ b/src/shared/locales/ca.json@@ -1895,6 +1895,8 @@"appearance": {"byteUnitBinary": "Binàries ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Decimals ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Mantén les estadístiques visibles amb els detalls oberts",+ "keepStatsBarVisibleDesc": "Mantén la barra d’estadístiques de baixada sota el tauler de detalls de la tasca.","byteUnitSystem": "Unitats de mida i velocitat","byteUnitSystemDefault": "Seguir el sistema ({{units}})","byteUnitSystemDesc": "Trieu com es mostren les mides dels fitxers i les velocitats.",diff --git a/src/shared/locales/de.json b/src/shared/locales/de.jsonindex cf8ec9f1..1c1f7947 100644--- a/src/shared/locales/de.json+++ b/src/shared/locales/de.json@@ -1387,6 +1387,8 @@"runModeLinuxDesc": "Die Verfügbarkeit des Infobereichs und das Aktivierungsverhalten hängen von Ihrer Desktop-Umgebung ab.","lightweightMode": "Speichersparmodus","lightweightModeDesc": "Bei geschlossenem Fenster Arbeitsspeicher sparen. Downloads laufen weiter, aber das erneute Öffnen dauert länger und nicht gespeicherte Eingaben werden verworfen.",+ "keepStatsBarVisible": "Statistik bei geöffneten Details sichtbar halten",+ "keepStatsBarVisibleDesc": "Die Download-Statistikleiste unter dem Aufgabendetailbereich anzeigen.","byteUnitSystem": "Einheiten für Größe und Geschwindigkeit","byteUnitSystemDesc": "Wählen Sie die Anzeigeeinheiten für Dateigrößen und Übertragungsgeschwindigkeiten.","byteUnitDecimal": "Dezimal ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/el.json b/src/shared/locales/el.jsonindex ff912d90..4a5fb589 100644--- a/src/shared/locales/el.json+++ b/src/shared/locales/el.json@@ -1876,6 +1876,8 @@"appearance": {"byteUnitBinary": "Δυαδικές ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Δεκαδικές ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Διατήρηση στατιστικών με ανοιχτές λεπτομέρειες",+ "keepStatsBarVisibleDesc": "Διατήρηση της γραμμής στατιστικών λήψης κάτω από το πλαίσιο λεπτομερειών εργασίας.","byteUnitSystem": "Μονάδες μεγέθους και ταχύτητας","byteUnitSystemDefault": "Σύμφωνα με το σύστημα ({{units}})","byteUnitSystemDesc": "Επιλέξτε πώς εμφανίζονται τα μεγέθη αρχείων και οι ταχύτητες.",diff --git a/src/shared/locales/en-US.json b/src/shared/locales/en-US.jsonindex 87d0844d..541585e9 100644--- a/src/shared/locales/en-US.json+++ b/src/shared/locales/en-US.json@@ -1387,6 +1387,8 @@"runModeLinuxDesc": "System tray availability and activation behavior depend on your desktop environment.","lightweightMode": "Lightweight mode","lightweightModeDesc": "Save memory when the window is closed. Downloads continue, but reopening takes longer and clears unsaved input.",+ "keepStatsBarVisible": "Keep statistics visible with details open",+ "keepStatsBarVisibleDesc": "Keep the download statistics bar below the task details drawer.","byteUnitSystem": "Size and speed units","byteUnitSystemDesc": "Choose how file sizes and speeds are displayed.","byteUnitDecimal": "Decimal ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/es.json b/src/shared/locales/es.jsonindex e5db91b8..96e47865 100644--- a/src/shared/locales/es.json+++ b/src/shared/locales/es.json@@ -1401,6 +1401,8 @@"runModeLinuxDesc": "La disponibilidad de la bandeja del sistema y su comportamiento de activación dependen del entorno de escritorio.","lightweightMode": "Modo ligero","lightweightModeDesc": "Ahorra memoria al cerrar la ventana. Las descargas continúan, pero volver a abrirla tarda más y se borran los datos sin guardar.",+ "keepStatsBarVisible": "Mantener las estadísticas visibles al abrir los detalles",+ "keepStatsBarVisibleDesc": "Mantener la barra de estadísticas de descarga debajo del panel de detalles de la tarea.","byteUnitSystem": "Unidades de tamaño y velocidad","byteUnitSystemDesc": "Elige cómo se muestran los tamaños de archivo y las velocidades.","byteUnitDecimal": "Decimal ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/fa.json b/src/shared/locales/fa.jsonindex c4d77e51..48615adc 100644--- a/src/shared/locales/fa.json+++ b/src/shared/locales/fa.json@@ -1876,6 +1876,8 @@"appearance": {"byteUnitBinary": "دودویی ({{megabyte}}، {{gigabyte}} · 1024)","byteUnitDecimal": "دهدهی ({{megabyte}}، {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "نمایش آمار هنگام باز بودن جزئیات",+ "keepStatsBarVisibleDesc": "نوار آمار بارگیری در زیر پنل جزئیات کار نمایش داده شود.","byteUnitSystem": "واحدهای اندازه و سرعت","byteUnitSystemDefault": "پیروی از سیستم ({{units}})","byteUnitSystemDesc": "نحوهٔ نمایش اندازهٔ فایلها و سرعتها را انتخاب کنید.",diff --git a/src/shared/locales/fr.json b/src/shared/locales/fr.jsonindex 7be9ee4e..a12c787e 100644--- a/src/shared/locales/fr.json+++ b/src/shared/locales/fr.json@@ -1895,6 +1895,8 @@"appearance": {"byteUnitBinary": "Binaires ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Décimales ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Garder les statistiques visibles avec les détails ouverts",+ "keepStatsBarVisibleDesc": "Afficher la barre des statistiques de téléchargement sous le panneau des détails de la tâche.","byteUnitSystem": "Unités de taille et de débit","byteUnitSystemDefault": "Suivre le système ({{units}})","byteUnitSystemDesc": "Choisissez les unités d’affichage des tailles de fichiers et des débits.",diff --git a/src/shared/locales/hu.json b/src/shared/locales/hu.jsonindex 75becaed..c8685567 100644--- a/src/shared/locales/hu.json+++ b/src/shared/locales/hu.json@@ -1387,6 +1387,8 @@"runModeLinuxDesc": "A rendszertálca elérhetősége és működése az asztali környezettől függ.","lightweightMode": "Könnyített mód","lightweightModeDesc": "Memóriamegtakarítás az ablak bezárásakor. A letöltések folytatódnak, de az újbóli megnyitás lassabb, és a nem mentett bevitt adatok törlődnek.",+ "keepStatsBarVisible": "Statisztikák megjelenítése a részletek mellett",+ "keepStatsBarVisibleDesc": "A letöltési statisztikasáv megtartása a feladat részletei alatt.","byteUnitSystem": "Méret és sebesség mértékegységei","byteUnitSystemDesc": "Válaszd ki, hogyan jelenjenek meg a fájlméretek és a sebességek.","byteUnitDecimal": "Decimális ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/id.json b/src/shared/locales/id.jsonindex b1e5cd2a..00fe9462 100644--- a/src/shared/locales/id.json+++ b/src/shared/locales/id.json@@ -1373,6 +1373,8 @@"runModeLinuxDesc": "Ketersediaan baki sistem dan perilaku aktivasinya bergantung pada lingkungan desktop.","lightweightMode": "Mode ringan","lightweightModeDesc": "Hemat memori saat jendela ditutup. Unduhan tetap berjalan, tetapi jendela lebih lama dibuka kembali dan isian yang belum disimpan akan dihapus.",+ "keepStatsBarVisible": "Tetap tampilkan statistik saat detail terbuka",+ "keepStatsBarVisibleDesc": "Pertahankan bilah statistik unduhan di bawah panel detail tugas.","byteUnitSystem": "Satuan ukuran dan kecepatan","byteUnitSystemDesc": "Pilih cara menampilkan ukuran berkas dan kecepatan.","byteUnitDecimal": "Desimal ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/it.json b/src/shared/locales/it.jsonindex bd342c81..924af8fc 100644--- a/src/shared/locales/it.json+++ b/src/shared/locales/it.json@@ -1401,6 +1401,8 @@"runModeLinuxDesc": "La disponibilità dell’area di notifica e il comportamento di attivazione dipendono dall’ambiente desktop.","lightweightMode": "Modalità leggera","lightweightModeDesc": "Risparmia memoria quando la finestra è chiusa. I download continuano, ma la riapertura richiede più tempo e i dati non salvati vengono cancellati.",+ "keepStatsBarVisible": "Mantieni visibili le statistiche con i dettagli aperti",+ "keepStatsBarVisibleDesc": "Mantieni la barra delle statistiche di download sotto il pannello dei dettagli dell’attività.","byteUnitSystem": "Unità di dimensione e velocità","byteUnitSystemDesc": "Scegli come visualizzare le dimensioni dei file e le velocità.","byteUnitDecimal": "Decimali ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/ja.json b/src/shared/locales/ja.jsonindex 580ffe19..21000dc2 100644--- a/src/shared/locales/ja.json+++ b/src/shared/locales/ja.json@@ -1373,6 +1373,8 @@"runModeLinuxDesc": "システムトレイの利用可否やアプリの表示動作は、デスクトップ環境によって異なります。","lightweightMode": "軽量モード","lightweightModeDesc": "ウインドウを閉じたときにメモリーを節約します。ダウンロードは続行されますが、再度開くときに時間がかかり、未保存の入力内容は消去されます。",+ "keepStatsBarVisible": "詳細表示中も統計バーを表示",+ "keepStatsBarVisibleDesc": "タスクの詳細パネルの下にダウンロード統計バーを表示します。","byteUnitSystem": "サイズと速度の単位","byteUnitSystemDesc": "ファイルサイズと速度の表示方法を選択します。","byteUnitDecimal": "10 進単位({{megabyte}}、{{gigabyte}} · 1000)",diff --git a/src/shared/locales/ko.json b/src/shared/locales/ko.jsonindex 89089696..1966cd02 100644--- a/src/shared/locales/ko.json+++ b/src/shared/locales/ko.json@@ -1373,6 +1373,8 @@"runModeLinuxDesc": "시스템 트레이 지원 여부와 활성화 동작은 데스크톱 환경에 따라 다릅니다.","lightweightMode": "경량 모드","lightweightModeDesc": "창을 닫으면 메모리를 절약합니다. 다운로드는 계속되지만 창을 다시 여는 데 더 오래 걸리며 저장하지 않은 입력 내용은 지워집니다.",+ "keepStatsBarVisible": "세부 정보가 열려 있을 때 통계 표시",+ "keepStatsBarVisibleDesc": "작업 세부 정보 패널 아래에 다운로드 통계 표시줄을 유지합니다.","byteUnitSystem": "크기 및 속도 단위","byteUnitSystemDesc": "파일 크기와 속도의 표시 방식을 선택하세요.","byteUnitDecimal": "십진수({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/nb.json b/src/shared/locales/nb.jsonindex 0890c382..df02da1b 100644--- a/src/shared/locales/nb.json+++ b/src/shared/locales/nb.json@@ -1876,6 +1876,8 @@"appearance": {"byteUnitBinary": "Binære ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Desimale ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Behold statistikken når detaljer er åpne",+ "keepStatsBarVisibleDesc": "Behold nedlastingsstatistikken under panelet med oppgavedetaljer.","byteUnitSystem": "Enheter for størrelse og hastighet","byteUnitSystemDefault": "Følg systemet ({{units}})","byteUnitSystemDesc": "Velg hvordan filstørrelser og hastigheter vises.",diff --git a/src/shared/locales/nl.json b/src/shared/locales/nl.jsonindex cf39babb..6506a7d0 100644--- a/src/shared/locales/nl.json+++ b/src/shared/locales/nl.json@@ -1876,6 +1876,8 @@"appearance": {"byteUnitBinary": "Binair ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Decimaal ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Statistieken zichtbaar houden bij geopende details",+ "keepStatsBarVisibleDesc": "Houd de downloadstatistiekenbalk onder het taakdetailpaneel zichtbaar.","byteUnitSystem": "Eenheden voor grootte en snelheid","byteUnitSystemDefault": "Systeem volgen ({{units}})","byteUnitSystemDesc": "Kies hoe bestandsgroottes en snelheden worden weergegeven.",diff --git a/src/shared/locales/pl.json b/src/shared/locales/pl.jsonindex 82e05f8c..74e52427 100644--- a/src/shared/locales/pl.json+++ b/src/shared/locales/pl.json@@ -1415,6 +1415,8 @@"runModeLinuxDesc": "Dostępność zasobnika systemowego i sposób aktywacji zależą od środowiska graficznego.","lightweightMode": "Tryb oszczędzania pamięci","lightweightModeDesc": "Oszczędzaj pamięć po zamknięciu okna. Pobieranie trwa nadal, ale ponowne otwarcie zajmuje więcej czasu i usuwa niezapisane dane.",+ "keepStatsBarVisible": "Pokazuj statystyki przy otwartych szczegółach",+ "keepStatsBarVisibleDesc": "Zachowaj pasek statystyk pobierania pod panelem szczegółów zadania.","byteUnitSystem": "Jednostki rozmiaru i prędkości","byteUnitSystemDesc": "Wybierz sposób wyświetlania rozmiarów plików i prędkości.","byteUnitDecimal": "Dziesiętne ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/pt-BR.json b/src/shared/locales/pt-BR.jsonindex 3f338bcf..d563050b 100644--- a/src/shared/locales/pt-BR.json+++ b/src/shared/locales/pt-BR.json@@ -1401,6 +1401,8 @@"runModeLinuxDesc": "A disponibilidade da bandeja do sistema e o comportamento de ativação dependem do seu ambiente de área de trabalho.","lightweightMode": "Modo leve","lightweightModeDesc": "Economiza memória com a janela fechada. Os downloads continuam, mas reabrir demora mais e as alterações não salvas são descartadas.",+ "keepStatsBarVisible": "Manter estatísticas visíveis com os detalhes abertos",+ "keepStatsBarVisibleDesc": "Manter a barra de estatísticas de download abaixo do painel de detalhes da tarefa.","byteUnitSystem": "Unidades de tamanho e velocidade","byteUnitSystemDesc": "Escolha como os tamanhos dos arquivos e as velocidades são exibidos.","byteUnitDecimal": "Decimal ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/ro.json b/src/shared/locales/ro.jsonindex e8092ea5..e46c06a0 100644--- a/src/shared/locales/ro.json+++ b/src/shared/locales/ro.json@@ -1895,6 +1895,8 @@"appearance": {"byteUnitBinary": "Binare ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Zecimale ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Păstrează statisticile vizibile cu detaliile deschise",+ "keepStatsBarVisibleDesc": "Păstrează bara de statistici de descărcare sub panoul cu detaliile sarcinii.","byteUnitSystem": "Unități pentru dimensiune și viteză","byteUnitSystemDefault": "Urmează sistemul ({{units}})","byteUnitSystemDesc": "Alege cum sunt afișate dimensiunile fișierelor și vitezele.",diff --git a/src/shared/locales/ru.json b/src/shared/locales/ru.jsonindex d07b1124..01220278 100644--- a/src/shared/locales/ru.json+++ b/src/shared/locales/ru.json@@ -1415,6 +1415,8 @@"runModeLinuxDesc": "Доступность системного трея и поведение при активации зависят от окружения рабочего стола.","lightweightMode": "Режим экономии памяти","lightweightModeDesc": "Экономить память при закрытом окне. Загрузки продолжатся, но повторное открытие займёт больше времени и очистит несохранённые данные.",+ "keepStatsBarVisible": "Показывать статистику при открытых подробностях",+ "keepStatsBarVisibleDesc": "Оставлять панель статистики загрузок под панелью сведений о задаче.","byteUnitSystem": "Единицы размера и скорости","byteUnitSystemDesc": "Выберите, как отображать размеры файлов и скорость.","byteUnitDecimal": "Десятичные ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/th.json b/src/shared/locales/th.jsonindex 10644acd..868b4f85 100644--- a/src/shared/locales/th.json+++ b/src/shared/locales/th.json@@ -1857,6 +1857,8 @@"appearance": {"byteUnitBinary": "ฐานสอง ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "ฐานสิบ ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "แสดงสถิติต่อไปเมื่อเปิดรายละเอียด",+ "keepStatsBarVisibleDesc": "แสดงแถบสถิติการดาวน์โหลดไว้ด้านล่างแผงรายละเอียดงาน","byteUnitSystem": "หน่วยขนาดและความเร็ว","byteUnitSystemDefault": "ตามระบบ ({{units}})","byteUnitSystemDesc": "เลือกรูปแบบหน่วยที่ใช้แสดงขนาดไฟล์และความเร็ว",diff --git a/src/shared/locales/tr.json b/src/shared/locales/tr.jsonindex 30deddd6..1b6f124d 100644--- a/src/shared/locales/tr.json+++ b/src/shared/locales/tr.json@@ -1387,6 +1387,8 @@"runModeLinuxDesc": "Sistem tepsisinin kullanılabilirliği ve etkinleştirme davranışı masaüstü ortamınıza bağlıdır.","lightweightMode": "Hafif mod","lightweightModeDesc": "Pencere kapalıyken bellekten tasarruf edin. İndirmeler devam eder ancak pencerenin yeniden açılması daha uzun sürer ve kaydedilmemiş girişler temizlenir.",+ "keepStatsBarVisible": "Ayrıntılar açıkken istatistikleri görünür tut",+ "keepStatsBarVisibleDesc": "İndirme istatistikleri çubuğunu görev ayrıntıları panelinin altında tut.","byteUnitSystem": "Boyut ve hız birimleri","byteUnitSystemDesc": "Dosya boyutlarının ve hızların nasıl gösterileceğini seçin.","byteUnitDecimal": "Ondalık ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/uk.json b/src/shared/locales/uk.jsonindex d45dcc56..e08c4c9c 100644--- a/src/shared/locales/uk.json+++ b/src/shared/locales/uk.json@@ -1914,6 +1914,8 @@"appearance": {"byteUnitBinary": "Двійкові ({{megabyte}}, {{gigabyte}} · 1024)","byteUnitDecimal": "Десяткові ({{megabyte}}, {{gigabyte}} · 1000)",+ "keepStatsBarVisible": "Показувати статистику з відкритими подробицями",+ "keepStatsBarVisibleDesc": "Залишати панель статистики завантажень під панеллю відомостей про завдання.","byteUnitSystem": "Одиниці розміру та швидкості","byteUnitSystemDefault": "Як у системі ({{units}})","byteUnitSystemDesc": "Виберіть спосіб відображення розмірів файлів і швидкості.",diff --git a/src/shared/locales/vi.json b/src/shared/locales/vi.jsonindex 8bdae0cc..3f91cf70 100644--- a/src/shared/locales/vi.json+++ b/src/shared/locales/vi.json@@ -1373,6 +1373,8 @@"runModeLinuxDesc": "Khả năng dùng khay hệ thống và cách kích hoạt phụ thuộc vào môi trường màn hình nền của bạn.","lightweightMode": "Chế độ nhẹ","lightweightModeDesc": "Tiết kiệm bộ nhớ khi đóng cửa sổ. Tải xuống vẫn tiếp tục, nhưng cửa sổ mở lại lâu hơn và nội dung chưa lưu sẽ bị xóa.",+ "keepStatsBarVisible": "Giữ thống kê hiển thị khi mở chi tiết",+ "keepStatsBarVisibleDesc": "Giữ thanh thống kê tải xuống bên dưới bảng chi tiết tác vụ.","byteUnitSystem": "Đơn vị kích thước và tốc độ","byteUnitSystemDesc": "Chọn cách hiển thị kích thước tệp và tốc độ.","byteUnitDecimal": "Thập phân ({{megabyte}}, {{gigabyte}} · 1000)",diff --git a/src/shared/locales/zh-CN.json b/src/shared/locales/zh-CN.jsonindex cce27a55..7f529e4a 100644--- a/src/shared/locales/zh-CN.json+++ b/src/shared/locales/zh-CN.json@@ -1373,6 +1373,8 @@"runModeLinuxDesc": "系统托盘的可用性和激活方式取决于桌面环境。","lightweightMode": "轻量模式","lightweightModeDesc": "关闭窗口后节省内存,下载不受影响。重新打开稍慢,未保存的输入会清除。",+ "keepStatsBarVisible": "详情展开时保留统计栏",+ "keepStatsBarVisibleDesc": "在任务详情抽屉下方保留下载统计栏。","byteUnitSystem": "大小和速度单位","byteUnitSystemDesc": "选择文件大小和速度的显示单位。","byteUnitDecimal": "十进制({{megabyte}}、{{gigabyte}} · 1000)",diff --git a/src/shared/locales/zh-TW.json b/src/shared/locales/zh-TW.jsonindex 756afdf2..53d24872 100644--- a/src/shared/locales/zh-TW.json+++ b/src/shared/locales/zh-TW.json@@ -1373,6 +1373,8 @@"runModeLinuxDesc": "系統匣的可用性和啟用方式取決於桌面環境。","lightweightMode": "輕量模式","lightweightModeDesc": "關閉視窗後節省記憶體,下載不受影響。重新開啟稍慢,未儲存的輸入會清除。",+ "keepStatsBarVisible": "詳情展開時保留統計列",+ "keepStatsBarVisibleDesc": "在工作詳情抽屜下方保留下載統計列。","byteUnitSystem": "大小與速度單位","byteUnitSystemDesc": "選擇檔案大小和速度的顯示單位。","byteUnitDecimal": "十進位({{megabyte}}、{{gigabyte}} · 1000)",diff --git a/src/shared/protocol/events.ts b/src/shared/protocol/events.tsindex 30245a1d..7c5e87e0 100644--- a/src/shared/protocol/events.ts+++ b/src/shared/protocol/events.ts@@ -48,6 +48,7 @@ export const Events = {LiquidGlassChanged: 'event:liquidGlassChanged',// Payload: { sidebarColor: SidebarColor }.SidebarColorChanged: 'event:sidebarColorChanged',+ StatsBarVisibilityChanged: 'event:statsBarVisibilityChanged',// Payload: { color: string | null }, an RGB hex color from the desktop host.SystemAccentColorChanged: 'event:systemAccentColorChanged',// Payload: { byteUnitSystem: ByteUnitPreference }.diff --git a/src/shared/protocol/forwardable-events.ts b/src/shared/protocol/forwardable-events.tsindex 1c8119db..3444cfc1 100644--- a/src/shared/protocol/forwardable-events.ts+++ b/src/shared/protocol/forwardable-events.ts@@ -47,6 +47,7 @@ export const ForwardableEvents = [Events.ReducedMotionChanged,Events.LiquidGlassChanged,Events.SidebarColorChanged,+ Events.StatsBarVisibilityChanged,Events.SystemAccentColorChanged,Events.ByteUnitSystemChanged,Events.DirectoryPreferencesChanged,diff --git a/src/shared/schemas/app-settings.ts b/src/shared/schemas/app-settings.tsindex cda1027b..d72ea400 100644--- a/src/shared/schemas/app-settings.ts+++ b/src/shared/schemas/app-settings.ts@@ -67,6 +67,7 @@ export const appSettingsSchema = z.object({runMode: z.enum(RunMode).catch(RunMode.Standard),lightweightMode: z.boolean().catch(false),showDownloadProgress: z.boolean().catch(false),+ keepStatsBarVisible: z.boolean().catch(false),traySpeedometer: z.boolean().catch(true),trayIconColor: trayIconColorSchema.catch(DEFAULT_TRAY_ICON_COLOR),magnetFileSelection: z.boolean().catch(true),diff --git a/src/shared/types/settings.ts b/src/shared/types/settings.tsindex 1b980f6d..912e6fe3 100644--- a/src/shared/types/settings.ts+++ b/src/shared/types/settings.ts@@ -258,6 +258,7 @@ export interface MotrixAppSettings {lightweightMode: boolean/** Show download progress in the macOS Dock or Windows taskbar. Default false. */showDownloadProgress: boolean+ keepStatsBarVisible: booleantraySpeedometer: boolean/** Linux tray artwork color; auto follows the resolved application theme. */trayIconColor: TrayIconColor