This commit is contained in:
iVampireSP.com 2023-12-06 09:49:15 +08:00
parent 0fded66d7e
commit d8f152c40b
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 46 additions and 23 deletions

View File

@ -8,6 +8,24 @@
@click="drawer = !drawer" @click="drawer = !drawer"
></v-btn> ></v-btn>
</div> </div>
<!-- <v-divider></v-divider> -->
<v-list density="compact" nav>
<template v-for="item in items">
<v-list-item
:prepend-icon="item.icon"
:title="item.text"
:to="item.to"
></v-list-item>
</template>
<!-- <v-list-item
prepend-icon="mdi-forum"
title="About"
value="about"
></v-list-item> -->
</v-list>
</v-navigation-drawer> </v-navigation-drawer>
<v-app-bar> <v-app-bar>
@ -22,7 +40,14 @@
import { ref } from "vue"; import { ref } from "vue";
import { useConfigStore } from "@/store/config"; import { useConfigStore } from "@/store/config";
const configStore = useConfigStore() const configStore = useConfigStore();
const drawer = ref(false); const drawer = ref(false);
const items = [
{ icon: "mdi-contacts", text: "Contacts", to: "/" },
{ icon: "mdi-history", text: "Frequently contacted", to: "/" },
{ icon: "mdi-content-copy", text: "Duplicates", to: "/" },
];
</script> </script>

View File

@ -1,26 +1,24 @@
<template> <template>
<v-theme-provider :theme="theme" with-background>
<v-app id="d"> <v-app id="d">
<default-bar /> <default-bar />
<default-view /> <default-view />
</v-app> </v-app>
</v-theme-provider>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import DefaultBar from "./AppBar.vue"; import DefaultBar from "./AppBar.vue";
import DefaultView from "./View.vue"; import DefaultView from "./View.vue";
import { ref } from "vue"; import { useTheme } from "vuetify";
const theme = ref("dark"); const theme = useTheme();
// //
function updateTheme() { function updateTheme() {
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches; const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
theme.value = prefersDark ? "dark" : "light"; theme.global.name.value = prefersDark ? "dark" : "light";
} }
updateTheme(); updateTheme();