From 4acfff88f6c229776ee7071c13c39560e65a17bd Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Mon, 5 Oct 2026 09:01:47 +0100 Subject: [PATCH] restore server-rendered theme colors when leaving the theme selector --- resources/js/components/themes/Selector.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/js/components/themes/Selector.vue b/resources/js/components/themes/Selector.vue index d67cb532205..42faad3de9d 100644 --- a/resources/js/components/themes/Selector.vue +++ b/resources/js/components/themes/Selector.vue @@ -54,8 +54,9 @@ watch( (newValue) => newValue ? applyTheme(newValue) : applyDefaultTheme(), ) -const originalTheme = props.modelValue; -onUnmounted(() => originalTheme ? applyTheme(originalTheme) : applyDefaultTheme()); +const themeColors = document.getElementById('theme-colors'); +const originalThemeColors = themeColors.textContent; +onUnmounted(() => themeColors.textContent = originalThemeColors); function selectNewlyPublishedTheme() { if (!props.modelValue || props.modelValue.id !== 'custom') return;