From e8bded89e668efa4129562b5c7941b641574fe89 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Mon, 1 Jun 2026 16:26:19 +0200 Subject: [PATCH] large text is default setting --- src/constants.ts | 2 ++ src/pages/secondary/GeneralSettingsPage/index.tsx | 3 ++- src/services/local-storage.service.ts | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index d14013f5..c5bcba9d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -424,6 +424,8 @@ export const FONT_SIZE = { LARGE: 'large' } as const +export const DEFAULT_FONT_SIZE = FONT_SIZE.LARGE + /** * Random public relays (from NIP-66 lively list; write-tested monitors preferred) merged into the * publish relay picker. More candidates improve odds some accept open writes. diff --git a/src/pages/secondary/GeneralSettingsPage/index.tsx b/src/pages/secondary/GeneralSettingsPage/index.tsx index 8aba8e9d..0f6fda64 100644 --- a/src/pages/secondary/GeneralSettingsPage/index.tsx +++ b/src/pages/secondary/GeneralSettingsPage/index.tsx @@ -3,6 +3,7 @@ import { Label } from '@/components/ui/label' import { Select, SelectContent, SelectItem, SelectTrigger } from '@/components/ui/select' import { Switch } from '@/components/ui/switch' import { + DEFAULT_FONT_SIZE, FONT_SIZE, MEDIA_AUTO_LOAD_POLICY, NOTIFICATION_LIST_STYLE, @@ -111,7 +112,7 @@ const GeneralSettingsPage = forwardRef(({ index, hideTitlebar = false }: { index - diff --git a/src/services/local-storage.service.ts b/src/services/local-storage.service.ts index bfd2b29c..052cc047 100644 --- a/src/services/local-storage.service.ts +++ b/src/services/local-storage.service.ts @@ -1,4 +1,5 @@ import { + DEFAULT_FONT_SIZE, DEFAULT_NIP_96_SERVICE, ExtendedKind, MEDIA_AUTO_LOAD_POLICY, @@ -89,7 +90,7 @@ class LocalStorageService { private themeSetting: TThemeSetting = 'system' private theme: TTheme = 'light' private addClientTag: boolean = true - private fontSize: TFontSize = 'medium' + private fontSize: TFontSize = DEFAULT_FONT_SIZE private accounts: TAccount[] = [] private currentAccount: TAccount | null = null private noteListMode: TNoteListMode = 'posts' @@ -139,7 +140,7 @@ class LocalStorageService { const addClientTagStr = window.localStorage.getItem(StorageKey.ADD_CLIENT_TAG) this.addClientTag = addClientTagStr === null ? true : addClientTagStr === 'true' this.fontSize = - (window.localStorage.getItem(StorageKey.FONT_SIZE) as TFontSize) ?? 'medium' + (window.localStorage.getItem(StorageKey.FONT_SIZE) as TFontSize) ?? DEFAULT_FONT_SIZE const accountsStr = window.localStorage.getItem(StorageKey.ACCOUNTS) this.accounts = accountsStr ? JSON.parse(accountsStr) : [] const currentAccountStr = window.localStorage.getItem(StorageKey.CURRENT_ACCOUNT)