From beac25be269531343c08a94105db0329ea13e6b5 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 30 Jan 2026 06:49:52 +0000 Subject: [PATCH] fix: prevent settings accent color being unset on hydration --- app/components/AccentColorPicker.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/components/AccentColorPicker.vue b/app/components/AccentColorPicker.vue index 5e5201267c..89988e3b47 100644 --- a/app/components/AccentColorPicker.vue +++ b/app/components/AccentColorPicker.vue @@ -2,6 +2,17 @@ import { useAccentColor } from '~/composables/useSettings' const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor() + +onPrehydrate(el => { + const settings = JSON.parse(localStorage.getItem('npmx-settings') || '{}') + const id = settings.accentColorId + if (id) { + const input = el.querySelector(`input[value="${id}"]`) + if (input) { + input.checked = true + } + } +})