akkoma-fe/src/components/settings/settings.js
Hector A. Escobedo c338940084 Fix syntax errors and hiding logic.
This has been tested.
2017-02-22 19:31:49 -05:00

24 lines
548 B
JavaScript

import StyleSwitcher from '../style_switcher/style_switcher.vue'
const settings = {
data () {
return {
hideAttachmentsLocal: this.$store.state.config.hideAttachments,
hideNsfwLocal: this.$store.state.config.hideNsfw
}
},
components: {
StyleSwitcher
},
watch: {
hideAttachmentsLocal (value) {
this.$store.dispatch('setOption', { name: 'hideAttachments', value })
},
hideNsfwLocal (value) {
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
}
}
}
export default settings