Skip to content
Snippets Groups Projects
Commit a7cbdbc1 authored by syuilo's avatar syuilo
Browse files

✌️

parent fd01b4d2
No related branches found
No related tags found
No related merge requests found
......@@ -82,12 +82,12 @@ Vue.mixin({
methods: {
_updateDarkmode_(v) {
localStorage.setItem('darkmode', v.toString());
bus.$emit('updated', v);
if (v) {
document.documentElement.setAttribute('data-darkmode', 'true');
} else {
document.documentElement.removeAttribute('data-darkmode');
}
bus.$emit('updated', v);
},
_onDarkmodeUpdated_(v) {
if (!this.$el || !this.$el.setAttribute) return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment