mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 00:49:17 +09:00
✌️
This commit is contained in:
parent
fd01b4d204
commit
a7cbdbc1f2
@ -82,12 +82,12 @@ Vue.mixin({
|
|||||||
methods: {
|
methods: {
|
||||||
_updateDarkmode_(v) {
|
_updateDarkmode_(v) {
|
||||||
localStorage.setItem('darkmode', v.toString());
|
localStorage.setItem('darkmode', v.toString());
|
||||||
bus.$emit('updated', v);
|
|
||||||
if (v) {
|
if (v) {
|
||||||
document.documentElement.setAttribute('data-darkmode', 'true');
|
document.documentElement.setAttribute('data-darkmode', 'true');
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.removeAttribute('data-darkmode');
|
document.documentElement.removeAttribute('data-darkmode');
|
||||||
}
|
}
|
||||||
|
bus.$emit('updated', v);
|
||||||
},
|
},
|
||||||
_onDarkmodeUpdated_(v) {
|
_onDarkmodeUpdated_(v) {
|
||||||
if (!this.$el || !this.$el.setAttribute) return;
|
if (!this.$el || !this.$el.setAttribute) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user