Skip to content

Commit

Permalink
Add dark mode query string (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
karimi authored Sep 13, 2024
1 parent b0ca4ab commit e7f64ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion quasar_site/src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ export default {
if (this.$route.query.plain) {
this.forScriptEditor = true;
}
const wasDark = localStorage.getItem('darkMode');
let wasDark = localStorage.getItem('darkMode');
if (this.$route.query.dark){
wasDark = true;
}
if (this.$q.dark.isActive.toString() != wasDark){
this.$q.dark.toggle()
}
Expand Down

0 comments on commit e7f64ac

Please sign in to comment.