Skip to content

Commit f9091a2

Browse files
committed
--wip--
1 parent bb49112 commit f9091a2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

frontend/layers/base/app/components/BaseColormode.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@ const colorMode = useColorMode()
33
const cookie = useBcCookie<'dark' | 'light'>('theme')
44
colorMode.preference = cookie.value || 'dark'
55
const handleUpdate = () => {
6+
console.log('👉', 'handleUpdate')
67
cookie.value = colorMode.preference as 'dark' | 'light'
8+
window.localStorage.setItem('theme', colorMode.preference)
9+
console.log('updated', colorMode.preference, window.localStorage.getItem('theme'))
710
}
811
</script>
912

1013
<template>
14+
<pre>
15+
{{ colorMode }}
16+
{{ cookie }}
17+
</pre>
1118
<BaseSwitch
1219
v-model="colorMode.preference"
1320
class="w-fit"

frontend/nuxt.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ export default defineNuxtConfig({
7171
'resize-detector',
7272
],
7373
},
74+
routeRules: {
75+
'**': {
76+
headers: {
77+
'Cache-Control': 'no-store',
78+
},
79+
},
80+
},
7481
devServer: {
7582
host: 'local.beaconcha.in',
7683
https: {

0 commit comments

Comments
 (0)