From b445702ee918bfac39c53da3539fa309af4d5807 Mon Sep 17 00:00:00 2001 From: troogs Date: Mon, 2 Nov 2026 21:23:05 +0100 Subject: [PATCH] feat(ui): add persistent 75 percent text size option --- src/Duempelkas.App/Components/Layout/MainLayout.razor | 2 +- src/Duempelkas.App/Components/Layout/MainLayout.razor.cs | 2 +- src/Duempelkas.Desktop/wwwroot/js/app.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Duempelkas.App/Components/Layout/MainLayout.razor b/src/Duempelkas.App/Components/Layout/MainLayout.razor index d2abd81..32f3c1d 100644 --- a/src/Duempelkas.App/Components/Layout/MainLayout.razor +++ b/src/Duempelkas.App/Components/Layout/MainLayout.razor @@ -13,7 +13,7 @@ Hilfe diff --git a/src/Duempelkas.App/Components/Layout/MainLayout.razor.cs b/src/Duempelkas.App/Components/Layout/MainLayout.razor.cs index 7fec86b..0a2128a 100644 --- a/src/Duempelkas.App/Components/Layout/MainLayout.razor.cs +++ b/src/Duempelkas.App/Components/Layout/MainLayout.razor.cs @@ -11,7 +11,7 @@ public partial class MainLayout if (firstRender) { var value = await JS.InvokeAsync("duempelkasReading.get"); - fontScale = value is 125 or 150 or 200 ? value : 100; + fontScale = value is 75 or 125 or 150 or 200 ? value : 100; StateHasChanged(); } } diff --git a/src/Duempelkas.Desktop/wwwroot/js/app.js b/src/Duempelkas.Desktop/wwwroot/js/app.js index 6b035f2..3a2e36d 100644 --- a/src/Duempelkas.Desktop/wwwroot/js/app.js +++ b/src/Duempelkas.Desktop/wwwroot/js/app.js @@ -31,7 +31,7 @@ window.duempelkasDialog = { window.duempelkasReading = { get() { let value = 100; try { value = Number(localStorage.getItem('duempelkas-text-scale')) || 100; } catch (_) {} return this.set(value, false); }, set(value, persist = true) { - const scale = [100,125,150,200].includes(Number(value)) ? Number(value) : 100; + const scale = [75,100,125,150,200].includes(Number(value)) ? Number(value) : 100; document.documentElement.style.setProperty('--app-font-size', (16 * scale / 100) + 'px'); if (persist) { try { localStorage.setItem('duempelkas-text-scale', String(scale)); } catch (_) {} } return scale;