diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index ba7a64ff2..e79573c77 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -46,15 +46,28 @@ init(async (launch) => { // Dark/Light Vue.mixin({ + data() { + return { + _darkmode_: false + }; + }, + beforeCreate() { + // なぜか警告が出るため + this._darkmode_ = false; + }, mounted() { const set = () => { - if (!this.$el || !this.os || !this.os.i) return; + if (!this.$el || !this.$el.setAttribute || !this.os || !this.os.i) return; if (this.os.i.clientSettings.dark) { document.documentElement.setAttribute('data-darkmode', 'true'); this.$el.setAttribute('data-darkmode', 'true'); + this._darkmode_ = true; + this.$forceUpdate(); } else { document.documentElement.removeAttribute('data-darkmode'); this.$el.removeAttribute('data-darkmode'); + this._darkmode_ = false; + this.$forceUpdate(); } }; diff --git a/src/client/app/desktop/views/widgets/users.vue b/src/client/app/desktop/views/widgets/users.vue index 0955ebbd7..3967ffaf6 100644 --- a/src/client/app/desktop/views/widgets/users.vue +++ b/src/client/app/desktop/views/widgets/users.vue @@ -1,23 +1,26 @@ @@ -71,43 +74,10 @@ export default define({