diff options
Diffstat (limited to 'src/components/settings')
| -rw-r--r-- | src/components/settings/settings.js | 14 | ||||
| -rw-r--r-- | src/components/settings/settings.vue | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index f979e7ab..c1b88f82 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -1,8 +1,22 @@ 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 }) + } } } diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 57aafac8..89b89a39 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -8,6 +8,13 @@ <h2>Theme</h2> <style-switcher></style-switcher> </div> + <div class="setting-item"> + <h2>Attachments</h2> + <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal"> + <label for="hideAttachments">Hide Attachments</label> + <input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal"> + <label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label> + </div> </div> </div> </template> |
