fix quick view settings
This commit is contained in:
parent
f7c67130f5
commit
a4845bf275
1 changed files with 18 additions and 18 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
import { mapState } from 'pinia'
|
import { mapState } from 'pinia'
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
|
|
||||||
import Popover from 'src/components/popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue'
|
import QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue'
|
||||||
|
|
||||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||||
|
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
|
|
@ -25,18 +25,12 @@ const QuickViewSettings = {
|
||||||
QuickFilterSettings,
|
QuickFilterSettings,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setConversationDisplay(visibility) {
|
|
||||||
this.$store.dispatch('setOption', {
|
|
||||||
name: 'conversationDisplay',
|
|
||||||
value: visibility,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openTab(tab) {
|
openTab(tab) {
|
||||||
useInterfaceStore().openSettingsModalTab(tab)
|
useInterfaceStore().openSettingsModalTab(tab)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['mergedConfig']),
|
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||||
...mapState(useInterfaceStore, {
|
...mapState(useInterfaceStore, {
|
||||||
mobileLayout: (state) => state.layoutType === 'mobile',
|
mobileLayout: (state) => state.layoutType === 'mobile',
|
||||||
}),
|
}),
|
||||||
|
|
@ -47,8 +41,11 @@ const QuickViewSettings = {
|
||||||
get() {
|
get() {
|
||||||
return this.mergedConfig.conversationDisplay
|
return this.mergedConfig.conversationDisplay
|
||||||
},
|
},
|
||||||
set(newVal) {
|
set(value) {
|
||||||
this.setConversationDisplay(newVal)
|
useSyncConfigStore().setPreference({
|
||||||
|
path: 'simple.conversationDisplay',
|
||||||
|
value,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
autoUpdate: {
|
autoUpdate: {
|
||||||
|
|
@ -57,7 +54,7 @@ const QuickViewSettings = {
|
||||||
},
|
},
|
||||||
set() {
|
set() {
|
||||||
const value = !this.autoUpdate
|
const value = !this.autoUpdate
|
||||||
this.$store.dispatch('setOption', { name: 'streaming', value })
|
useSyncConfigStore().setPreference({ path: 'simple.streaming', value })
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
collapseWithSubjects: {
|
collapseWithSubjects: {
|
||||||
|
|
@ -66,8 +63,8 @@ const QuickViewSettings = {
|
||||||
},
|
},
|
||||||
set() {
|
set() {
|
||||||
const value = !this.collapseWithSubjects
|
const value = !this.collapseWithSubjects
|
||||||
this.$store.dispatch('setOption', {
|
useSyncConfigStore().setPreference({
|
||||||
name: 'collapseMessageWithSubject',
|
path: 'simple.collapseMessageWithSubject',
|
||||||
value,
|
value,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -78,8 +75,8 @@ const QuickViewSettings = {
|
||||||
},
|
},
|
||||||
set() {
|
set() {
|
||||||
const value = !this.showUserAvatars
|
const value = !this.showUserAvatars
|
||||||
this.$store.dispatch('setOption', {
|
useSyncConfigStore().setPreference({
|
||||||
name: 'mentionLinkShowAvatar',
|
path: 'simple.mentionLinkShowAvatar',
|
||||||
value,
|
value,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -90,7 +87,10 @@ const QuickViewSettings = {
|
||||||
},
|
},
|
||||||
set() {
|
set() {
|
||||||
const value = !this.muteBotStatuses
|
const value = !this.muteBotStatuses
|
||||||
this.$store.dispatch('setOption', { name: 'muteBotStatuses', value })
|
useSyncConfigStore().setPreference({
|
||||||
|
path: 'simple.muteBotStatuses',
|
||||||
|
value,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
muteSensitiveStatuses: {
|
muteSensitiveStatuses: {
|
||||||
|
|
@ -99,8 +99,8 @@ const QuickViewSettings = {
|
||||||
},
|
},
|
||||||
set() {
|
set() {
|
||||||
const value = !this.muteSensitiveStatuses
|
const value = !this.muteSensitiveStatuses
|
||||||
this.$store.dispatch('setOption', {
|
useSyncConfigStore().setPreference({
|
||||||
name: 'muteSensitiveStatuses',
|
path: 'simple.muteSensitiveStatuses',
|
||||||
value,
|
value,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue