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%;