mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
Compare commits
1 Commits
dark-mode
...
dark-switc
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d49d7f1b1 |
@ -16,6 +16,13 @@ defineProps({
|
|||||||
|
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
|
const isDark = ref(
|
||||||
|
localStorage.getItem('theme') === 'dark'
|
||||||
|
|| document.documentElement.classList.contains('dark'),
|
||||||
|
)
|
||||||
|
|
||||||
|
globalStore.isDarkModeOn = isDark
|
||||||
|
|
||||||
const enabled = computed({
|
const enabled = computed({
|
||||||
get: () => globalStore.isDarkModeOn,
|
get: () => globalStore.isDarkModeOn,
|
||||||
set: (value) => {
|
set: (value) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user