From a43208d834d0b6f1575221104ef3edec90be806a Mon Sep 17 00:00:00 2001 From: Silberengel Date: Fri, 10 Apr 2026 08:19:31 +0200 Subject: [PATCH] make cache mandatory for everyone. --- .../EventArchiveCacheSettings/index.tsx | 18 +------------ src/constants.ts | 2 -- src/i18n/locales/ar.ts | 4 +-- src/i18n/locales/de.ts | 4 +-- src/i18n/locales/en.ts | 4 +-- src/i18n/locales/es.ts | 4 +-- src/i18n/locales/fa.ts | 4 +-- src/i18n/locales/fr.ts | 4 +-- src/i18n/locales/hi.ts | 4 +-- src/i18n/locales/it.ts | 4 +-- src/i18n/locales/ja.ts | 4 +-- src/i18n/locales/ko.ts | 4 +-- src/i18n/locales/pl.ts | 4 +-- src/i18n/locales/pt-BR.ts | 4 +-- src/i18n/locales/pt-PT.ts | 4 +-- src/i18n/locales/ru.ts | 4 +-- src/i18n/locales/th.ts | 4 +-- src/i18n/locales/zh.ts | 4 +-- src/lib/event-archive-config.ts | 26 +++++++++---------- src/services/event-archive.service.ts | 11 ++------ 20 files changed, 48 insertions(+), 73 deletions(-) diff --git a/src/components/EventArchiveCacheSettings/index.tsx b/src/components/EventArchiveCacheSettings/index.tsx index 658d41e5..d222d031 100644 --- a/src/components/EventArchiveCacheSettings/index.tsx +++ b/src/components/EventArchiveCacheSettings/index.tsx @@ -1,6 +1,5 @@ import { Button } from '@/components/ui/button' import { Label } from '@/components/ui/label' -import { Switch } from '@/components/ui/switch' import { Input } from '@/components/ui/input' import { StorageKey } from '@/constants' import { @@ -22,7 +21,6 @@ function platformLabel(): string { export default function EventArchiveCacheSettings() { const { t } = useTranslation() - const [enabled, setEnabled] = useState(true) const [maxMb, setMaxMb] = useState('') const [maxEvents, setMaxEvents] = useState('') const [sessionLru, setSessionLru] = useState('') @@ -51,14 +49,12 @@ export default function EventArchiveCacheSettings() { }, [t]) useEffect(() => { - setEnabled(window.localStorage.getItem(StorageKey.EVENT_ARCHIVE_ENABLED) !== 'false') setMaxMb(window.localStorage.getItem(StorageKey.EVENT_ARCHIVE_MAX_MB) ?? '') setMaxEvents(window.localStorage.getItem(StorageKey.EVENT_ARCHIVE_MAX_EVENTS) ?? '') setSessionLru(window.localStorage.getItem(StorageKey.SESSION_EVENT_LRU_MAX) ?? '') }, []) const apply = useCallback(() => { - window.localStorage.setItem(StorageKey.EVENT_ARCHIVE_ENABLED, enabled ? 'true' : 'false') const mb = maxMb.trim() if (mb) window.localStorage.setItem(StorageKey.EVENT_ARCHIVE_MAX_MB, mb) else window.localStorage.removeItem(StorageKey.EVENT_ARCHIVE_MAX_MB) @@ -71,7 +67,7 @@ export default function EventArchiveCacheSettings() { client.reapplySessionLruFromSettings() invalidateArchiveFootprintCache() toast.success(t('eventArchive.appliedToast')) - }, [enabled, maxMb, maxEvents, sessionLru, t]) + }, [maxMb, maxEvents, sessionLru, t]) const effective = getEventArchiveConfig() @@ -81,17 +77,6 @@ export default function EventArchiveCacheSettings() {

{t('eventArchive.sectionBlurb')}

{defaultsHint}

-
- - setEnabled(Boolean(v))} - /> -
-