From d040944ed863281ea8f0ef837983618b76decb68 Mon Sep 17 00:00:00 2001 From: M3chD09 Date: Mon, 25 May 2020 08:22:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=B7=B1=E8=89=B2=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 5 +++++ frontend/src/plugins/vuetify.js | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 0cef91b..82d0b8f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -41,6 +41,11 @@ export default { props: { source: String }, + mounted() { + this.$vuetify.theme.dark = window.matchMedia( + "(prefers-color-scheme: dark)" + ).matches; + }, methods: { switchDrawer() { this.$refs.DrawerList.switchDrawer(); diff --git a/frontend/src/plugins/vuetify.js b/frontend/src/plugins/vuetify.js index 32f09a6..46a7cf8 100644 --- a/frontend/src/plugins/vuetify.js +++ b/frontend/src/plugins/vuetify.js @@ -7,7 +7,6 @@ Vue.use(Vuetify) export default new Vuetify({ theme: { - dark: false, themes: { light: { primary: colors.blue.lighten1,