mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 19:22:14 +01:00
add format check, update prettier rules, apply rules consistently
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import { usePreferredColorScheme, useStorage } from "@vueuse/core";
|
||||
import { computed, watch } from "vue";
|
||||
import { usePreferredColorScheme, useStorage } from '@vueuse/core';
|
||||
import { computed, watch } from 'vue';
|
||||
|
||||
type themeOption = "system" | "light" | "dark";
|
||||
const themeSetting = useStorage<themeOption>("theme", "system");
|
||||
type themeOption = 'system' | 'light' | 'dark';
|
||||
const themeSetting = useStorage<themeOption>('theme', 'system');
|
||||
const preferredColor = usePreferredColorScheme();
|
||||
const theme = computed(() => {
|
||||
if(themeSetting.value === "system"){
|
||||
if (themeSetting.value === 'system') {
|
||||
console.log(preferredColor.value);
|
||||
if (preferredColor.value === 'no-preference') {
|
||||
return 'dark';
|
||||
}
|
||||
return preferredColor.value;
|
||||
}
|
||||
return themeSetting.value
|
||||
return themeSetting.value;
|
||||
});
|
||||
|
||||
function useTheme() {
|
||||
|
||||
Reference in New Issue
Block a user