From 84f1ce866b1485c200c27266451195410faf072e Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 31 Dec 2018 00:59:13 +0900 Subject: [PATCH] =?UTF-8?q?[Client]=20line=20thikness=E3=81=AE=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=AF=E3=83=87=E3=83=90=E3=82=A4=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/desktop/views/components/settings.vue | 4 ++-- src/client/app/init.ts | 6 +++--- src/client/app/mobile/views/pages/settings.vue | 4 ++-- src/client/app/store.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index 676dfe670..5ffe69ef4 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -414,8 +414,8 @@ export default Vue.extend({ }, lineWidth: { - get() { return this.$store.state.settings.lineWidth; }, - set(value) { this.$store.dispatch('settings/set', { key: 'lineWidth', value }); } + get() { return this.$store.state.device.lineWidth; }, + set(value) { this.$store.commit('device/set', { key: 'lineWidth', value }); } }, fetchOnScroll: { diff --git a/src/client/app/init.ts b/src/client/app/init.ts index af9e5f6e0..c9d6fa473 100644 --- a/src/client/app/init.ts +++ b/src/client/app/init.ts @@ -414,11 +414,11 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void, //#endregion //#region line width - document.documentElement.style.setProperty('--lineWidth', `${os.store.state.settings.lineWidth}px`); + document.documentElement.style.setProperty('--lineWidth', `${os.store.state.device.lineWidth}px`); os.store.watch(s => { - return s.settings.lineWidth; + return s.device.lineWidth; }, v => { - document.documentElement.style.setProperty('--lineWidth', `${os.store.state.settings.lineWidth}px`); + document.documentElement.style.setProperty('--lineWidth', `${os.store.state.device.lineWidth}px`); }); //#endregion diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index e37291247..e8bf0becb 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -267,8 +267,8 @@ export default Vue.extend({ }, lineWidth: { - get() { return this.$store.state.settings.lineWidth; }, - set(value) { this.$store.dispatch('settings/set', { key: 'lineWidth', value }); } + get() { return this.$store.state.device.lineWidth; }, + set(value) { this.$store.commit('device/set', { key: 'lineWidth', value }); } }, contrastedAcct: { diff --git a/src/client/app/store.ts b/src/client/app/store.ts index 604bf2d46..03fc9565d 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -21,7 +21,6 @@ const defaultSettings = { showClockOnHeader: true, useShadow: true, roundedCorners: false, - lineWidth: 1, circleIcons: true, contrastedAcct: true, showFullAcct: false, @@ -53,6 +52,7 @@ const defaultDeviceSettings = { darkmode: false, darkTheme: 'dark', lightTheme: 'light', + lineWidth: 1, themes: [], enableSounds: true, soundVolume: 0.5,