summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-24 06:08:23 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-24 06:08:23 +0900
commitcb5c0ac2f587ffa895c1e4180cae6f66a6e4ab4c (patch)
tree06ce3b4cabe17c861fa4344b67620f594d0f22be /src/client
parentRefactor (diff)
downloadmisskey-cb5c0ac2f587ffa895c1e4180cae6f66a6e4ab4c.tar.gz
misskey-cb5c0ac2f587ffa895c1e4180cae6f66a6e4ab4c.tar.bz2
misskey-cb5c0ac2f587ffa895c1e4180cae6f66a6e4ab4c.zip
Fix bug
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/pages/messaging-room.vue15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/client/app/desktop/views/pages/messaging-room.vue b/src/client/app/desktop/views/pages/messaging-room.vue
index 1cc8d8a778..47d4963e2b 100644
--- a/src/client/app/desktop/views/pages/messaging-room.vue
+++ b/src/client/app/desktop/views/pages/messaging-room.vue
@@ -21,10 +21,20 @@ export default Vue.extend({
$route: 'fetch'
},
created() {
+ const applyBg = v =>
+ document.documentElement.style.setProperty('background', v ? '#191b22' : '#fff', 'important');
+
+ applyBg(this.$store.state.device.darkmode);
+
+ this.unwatchDarkmode = this.$store.watch(s => {
+ return s.device.darkmode;
+ }, applyBg);
+
this.fetch();
},
- mounted() {
- document.documentElement.style.background = '#fff';
+ beforeDestroy() {
+ document.documentElement.style.removeProperty('background');
+ this.unwatchDarkmode();
},
methods: {
fetch() {
@@ -50,6 +60,5 @@ export default Vue.extend({
flex 1
flex-direction column
min-height 100%
- background #fff
</style>