forked from verdnatura/salix-front
refs #6383 set dark
This commit is contained in:
parent
a59a86dfd6
commit
9e314276bd
|
@ -1,10 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar, Dark } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const { availableLocales, locale, fallbackLocale } = useI18n();
|
const { availableLocales, locale, fallbackLocale } = useI18n();
|
||||||
|
Dark.set(true);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let userLang = window.navigator.language;
|
let userLang = window.navigator.language;
|
||||||
|
|
|
@ -2,16 +2,7 @@
|
||||||
import { onMounted, computed } from 'vue';
|
import { onMounted, computed } from 'vue';
|
||||||
import { Dark, Quasar, useQuasar } from 'quasar';
|
import { Dark, Quasar, useQuasar } from 'quasar';
|
||||||
import Navbar from 'src/components/NavBar.vue';
|
import Navbar from 'src/components/NavBar.vue';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const darkMode = computed({
|
|
||||||
get() {
|
|
||||||
return Dark.isActive;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
Dark.set(value);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -26,6 +26,7 @@ const userLocale = computed({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const darkMode = computed({
|
const darkMode = computed({
|
||||||
get() {
|
get() {
|
||||||
return Dark.isActive;
|
return Dark.isActive;
|
||||||
|
|
Loading…
Reference in New Issue