From ff62c07f156249b06e0102a456ba24cbbdebba6f Mon Sep 17 00:00:00 2001 From: Jokin Date: Sat, 11 Jul 2026 17:30:12 +0200 Subject: [PATCH] Text size setting for path bar + file list (Compact/Default/Large) Segmented row in the options popover; applied via data-text on driving CSS variables (--list-font / --list-meta-font / --path-font), persisted in settings.json like theme and speed unit. Co-Authored-By: Claude Fable 5 --- src/shared/types.ts | 3 +++ ui/src/app/file-panel/file-panel.html | 8 +++---- ui/src/app/settings.service.ts | 30 ++++++++++++++++++++++++--- ui/src/app/tab-bar/tab-bar.ts | 19 +++++++++++++++++ ui/src/styles.css | 17 +++++++++++++++ 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/src/shared/types.ts b/src/shared/types.ts index d1ef074..2110cdc 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -44,11 +44,14 @@ export interface ConnectionsFile { export interface AppSettings { theme: "system" | "light" | "dark"; speedUnit: "MBps" | "Mbps"; + /** Font size of the path bar and file list. */ + textSize: "compact" | "default" | "large"; } export const DEFAULT_SETTINGS: AppSettings = { theme: "system", speedUnit: "MBps", + textSize: "default", }; export type TransferState = diff --git a/ui/src/app/file-panel/file-panel.html b/ui/src/app/file-panel/file-panel.html index 362ba19..8ba3a47 100644 --- a/ui/src/app/file-panel/file-panel.html +++ b/ui/src/app/file-panel/file-panel.html @@ -144,7 +144,7 @@ (keydown.escape)="resetPath()" (keydown)="$event.stopPropagation()" spellcheck="false" - class="h-7 min-w-0 flex-1 rounded-md border border-input bg-transparent px-2 font-mono text-xs outline-none focus:ring-2 focus:ring-ring" + class="h-7 min-w-0 flex-1 rounded-md border border-input bg-transparent px-2 font-mono text-(length:--path-font) outline-none focus:ring-2 focus:ring-ring" /> + } + + +
Speed unit
@@ -130,6 +148,7 @@ export class TabBar { readonly isMacChrome = IS_MAC_CHROME; readonly themes = THEMES; readonly speedUnits = SPEED_UNITS; + readonly textSizes = TEXT_SIZES; close(event: MouseEvent, id: number): void { event.stopPropagation(); diff --git a/ui/src/styles.css b/ui/src/styles.css index 637300f..2471c45 100644 --- a/ui/src/styles.css +++ b/ui/src/styles.css @@ -100,6 +100,23 @@ --radius-lg: var(--radius); } +/* Text-size setting for the path bar + file list (data-text set by SettingsService). */ +:root { + --list-font: 13px; + --list-meta-font: 12px; + --path-font: 12px; +} +:root[data-text='compact'] { + --list-font: 12px; + --list-meta-font: 11px; + --path-font: 11px; +} +:root[data-text='large'] { + --list-font: 14px; + --list-meta-font: 13px; + --path-font: 13px; +} + html, body { height: 100%;