diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-06-21 15:08:17 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-06-21 15:08:17 +0900 |
| commit | aec5911821cf55dbe8704be964c5ebd3a4a7b66b (patch) | |
| tree | f11432c834359413dfbc730f1f5e872024b7431a /src/client/app/common/views | |
| parent | Merge branch 'develop' of https://github.com/syuilo/misskey into develop (diff) | |
| download | misskey-aec5911821cf55dbe8704be964c5ebd3a4a7b66b.tar.gz misskey-aec5911821cf55dbe8704be964c5ebd3a4a7b66b.tar.bz2 misskey-aec5911821cf55dbe8704be964c5ebd3a4a7b66b.zip | |
Improve sync
Diffstat (limited to 'src/client/app/common/views')
5 files changed, 26 insertions, 38 deletions
diff --git a/src/client/app/common/views/components/settings/settings.vue b/src/client/app/common/views/components/settings/settings.vue index 094791a153..2d962aaafa 100644 --- a/src/client/app/common/views/components/settings/settings.vue +++ b/src/client/app/common/views/components/settings/settings.vue @@ -133,8 +133,8 @@ <section> <header>{{ $t('@._settings.sync') }}</header> - <ui-input v-if="$root.isMobile" v-model="homeProfile">{{ $t('@._settings.home-profile') }}</ui-input> - <ui-input v-else v-model="mobileHomeProfile">{{ $t('@._settings.home-profile') }}</ui-input> + <ui-input v-if="$root.isMobile" v-model="mobileHomeProfile">{{ $t('@._settings.home-profile') }}</ui-input> + <ui-input v-else v-model="homeProfile">{{ $t('@._settings.home-profile') }}</ui-input> <ui-input v-model="deckProfile">{{ $t('@._settings.deck-profile') }}</ui-input> </section> diff --git a/src/client/app/common/views/deck/deck.column.vue b/src/client/app/common/views/deck/deck.column.vue index b09fdfbfee..b5c0896bba 100644 --- a/src/client/app/common/views/deck/deck.column.vue +++ b/src/client/app/common/views/deck/deck.column.vue @@ -180,50 +180,50 @@ export default Vue.extend({ } }).then(({ canceled, result: name }) => { if (canceled) return; - this.$store.commit('device/renameDeckColumn', { id: this.column.id, name }); + this.$store.commit('renameDeckColumn', { id: this.column.id, name }); }); } }, null, { icon: 'arrow-left', text: this.$t('swap-left'), action: () => { - this.$store.commit('device/swapLeftDeckColumn', this.column.id); + this.$store.commit('swapLeftDeckColumn', this.column.id); } }, { icon: 'arrow-right', text: this.$t('swap-right'), action: () => { - this.$store.commit('device/swapRightDeckColumn', this.column.id); + this.$store.commit('swapRightDeckColumn', this.column.id); } }, this.isStacked ? { icon: faArrowUp, text: this.$t('swap-up'), action: () => { - this.$store.commit('device/swapUpDeckColumn', this.column.id); + this.$store.commit('swapUpDeckColumn', this.column.id); } } : undefined, this.isStacked ? { icon: faArrowDown, text: this.$t('swap-down'), action: () => { - this.$store.commit('device/swapDownDeckColumn', this.column.id); + this.$store.commit('swapDownDeckColumn', this.column.id); } } : undefined, null, { icon: ['far', 'window-restore'], text: this.$t('stack-left'), action: () => { - this.$store.commit('device/stackLeftDeckColumn', this.column.id); + this.$store.commit('stackLeftDeckColumn', this.column.id); } }, this.isStacked ? { icon: faWindowMaximize, text: this.$t('pop-right'), action: () => { - this.$store.commit('device/popRightDeckColumn', this.column.id); + this.$store.commit('popRightDeckColumn', this.column.id); } } : undefined, null, { icon: ['far', 'trash-alt'], text: this.$t('remove'), action: () => { - this.$store.commit('device/removeDeckColumn', this.column.id); + this.$store.commit('removeDeckColumn', this.column.id); } }]; @@ -307,7 +307,7 @@ export default Vue.extend({ const id = e.dataTransfer.getData('mk-deck-column'); if (id != null && id != '') { - this.$store.commit('device/swapDeckColumn', { + this.$store.commit('swapDeckColumn', { a: this.column.id, b: id }); diff --git a/src/client/app/common/views/deck/deck.tl-column.vue b/src/client/app/common/views/deck/deck.tl-column.vue index 5ab8ccb12f..cad140ed5f 100644 --- a/src/client/app/common/views/deck/deck.tl-column.vue +++ b/src/client/app/common/views/deck/deck.tl-column.vue @@ -90,7 +90,7 @@ export default Vue.extend({ methods: { onChangeSettings(v) { - this.$store.commit('device/updateDeckColumn', this.column); + this.$store.commit('updateDeckColumn', this.column); }, focus() { diff --git a/src/client/app/common/views/deck/deck.vue b/src/client/app/common/views/deck/deck.vue index e07e504ed6..070312d839 100644 --- a/src/client/app/common/views/deck/deck.vue +++ b/src/client/app/common/views/deck/deck.vue @@ -32,11 +32,7 @@ export default Vue.extend({ computed: { deck() { - if (this.$store.state.device.deckProfile) { - return this.$store.state.settings.deckProfiles[this.$store.state.device.deckProfile] || this.$store.state.device.deck; - } else { - return this.$store.state.device.deck; - } + return this.$store.getters.deck; }, columns(): any[] { @@ -115,14 +111,6 @@ export default Vue.extend({ value: deck }); } - - if (this.$store.state.device.deckProfile) { - this.$watch('$store.state.device.deck', () => { - this.$store.dispatch('settings/updateDeckProfile'); - }, { - deep: true - }); - } }, mounted() { @@ -146,7 +134,7 @@ export default Vue.extend({ icon: 'home', text: this.$t('@deck.home'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'home' }); @@ -155,7 +143,7 @@ export default Vue.extend({ icon: ['far', 'comments'], text: this.$t('@deck.local'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'local' }); @@ -164,7 +152,7 @@ export default Vue.extend({ icon: 'share-alt', text: this.$t('@deck.hybrid'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'hybrid' }); @@ -173,7 +161,7 @@ export default Vue.extend({ icon: 'globe', text: this.$t('@deck.global'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'global' }); @@ -182,7 +170,7 @@ export default Vue.extend({ icon: 'at', text: this.$t('@deck.mentions'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'mentions' }); @@ -191,7 +179,7 @@ export default Vue.extend({ icon: ['far', 'envelope'], text: this.$t('@deck.direct'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'direct' }); @@ -212,7 +200,7 @@ export default Vue.extend({ showCancelButton: true }); if (canceled) return; - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'list', list: lists.find(l => l.id === listId) @@ -227,7 +215,7 @@ export default Vue.extend({ input: true }).then(({ canceled, result: title }) => { if (canceled) return; - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'hashtag', tagTlId: this.$store.state.settings.tagTimelines.find(x => x.title == title).id @@ -238,7 +226,7 @@ export default Vue.extend({ icon: ['far', 'bell'], text: this.$t('@deck.notifications'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'notifications' }); @@ -247,7 +235,7 @@ export default Vue.extend({ icon: 'calculator', text: this.$t('@deck.widgets'), action: () => { - this.$store.commit('device/addDeckColumn', { + this.$store.commit('addDeckColumn', { id: uuid(), type: 'widgets', widgets: [] diff --git a/src/client/app/common/views/deck/deck.widgets-column.vue b/src/client/app/common/views/deck/deck.widgets-column.vue index f2385c8a48..dd28a3a8b3 100644 --- a/src/client/app/common/views/deck/deck.widgets-column.vue +++ b/src/client/app/common/views/deck/deck.widgets-column.vue @@ -110,7 +110,7 @@ export default Vue.extend({ }, addWidget() { - this.$store.commit('device/addDeckWidget', { + this.$store.commit('addDeckWidget', { id: this.column.id, widget: { name: this.widgetAdderSelected, @@ -123,14 +123,14 @@ export default Vue.extend({ }, removeWidget(widget) { - this.$store.commit('device/removeDeckWidget', { + this.$store.commit('removeDeckWidget', { id: this.column.id, widget }); }, saveWidgets() { - this.$store.commit('device/updateDeckColumn', this.column); + this.$store.commit('updateDeckColumn', this.column); } } }); |