Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
自动深色模式
Browse files Browse the repository at this point in the history
  • Loading branch information
M3chD09 committed May 25, 2020
1 parent bbe777c commit d040944
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion frontend/src/plugins/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Vue.use(Vuetify)

export default new Vuetify({
theme: {
dark: false,
themes: {
light: {
primary: colors.blue.lighten1,
Expand Down

0 comments on commit d040944

Please sign in to comment.