8958f386be
* origin/develop: (306 commits) fallback if shadows aren't defined Translated using Weblate (Chinese (Traditional)) Translated using Weblate (Ukrainian) Translated using Weblate (Italian) Translated using Weblate (Ukrainian) Translated using Weblate (Portuguese) Translated using Weblate (Italian) Translated using Weblate (Russian) Translated using Weblate (Portuguese) Translated using Weblate (Russian) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese) ...
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
import { filter, trim } from 'lodash'
|
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
|
|
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
import {
|
|
faChevronDown
|
|
} from '@fortawesome/free-solid-svg-icons'
|
|
|
|
library.add(
|
|
faChevronDown
|
|
)
|
|
|
|
const FilteringTab = {
|
|
data () {
|
|
return {
|
|
muteWordsStringLocal: this.$store.getters.mergedConfig.muteWords.join('\n')
|
|
}
|
|
},
|
|
components: {
|
|
BooleanSetting
|
|
},
|
|
computed: {
|
|
...SharedComputedObject(),
|
|
muteWordsString: {
|
|
get () {
|
|
return this.muteWordsStringLocal
|
|
},
|
|
set (value) {
|
|
this.muteWordsStringLocal = value
|
|
this.$store.dispatch('setOption', {
|
|
name: 'muteWords',
|
|
value: filter(value.split('\n'), (word) => trim(word).length > 0)
|
|
})
|
|
}
|
|
}
|
|
},
|
|
// Updating nested properties
|
|
watch: {
|
|
notificationVisibility: {
|
|
handler (value) {
|
|
this.$store.dispatch('setOption', {
|
|
name: 'notificationVisibility',
|
|
value: this.$store.getters.mergedConfig.notificationVisibility
|
|
})
|
|
},
|
|
deep: true
|
|
},
|
|
replyVisibility () {
|
|
this.$store.dispatch('queueFlushAll')
|
|
}
|
|
}
|
|
}
|
|
|
|
export default FilteringTab
|