We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f29cac commit 62e5dbbCopy full SHA for 62e5dbb
src/App.vue
@@ -107,7 +107,8 @@ export default {
107
},
108
beforeCreate() {
109
const t = localStorage.getItem("dark-theme");
110
- if (t === "dark") {
+ //if the storage doesn't indicate one, and the system is dark, use dark
111
+ if ((window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches && !t) || t === 'dark') {
112
this.$vuetify.theme.dark = true;
113
}
114
0 commit comments