1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-31 23:31:48 +09:00

[Client] line thiknessの設定はデバイスに保存するように

This commit is contained in:
syuilo 2018-12-31 00:59:13 +09:00
parent e68c6175ce
commit 84f1ce866b
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
4 changed files with 8 additions and 8 deletions

View File

@ -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: {

View File

@ -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

View File

@ -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: {

View File

@ -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,