diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index c1b88f82..3d373283 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -4,6 +4,7 @@ const settings = { data () { return { hideAttachmentsLocal: this.$store.state.config.hideAttachments, + hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv, hideNsfwLocal: this.$store.state.config.hideNsfw } }, @@ -14,6 +15,9 @@ const settings = { hideAttachmentsLocal (value) { this.$store.dispatch('setOption', { name: 'hideAttachments', value }) }, + hideAttachmentsInConvLocal (value) { + this.$store.dispatch('setOption', { name: 'hideAttachmentsInConv', 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 89b89a39..cebf62f7 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -10,10 +10,20 @@

Attachments

- - - - +
@@ -26,4 +36,7 @@ .setting-item { margin: 1em 1em 1.4em; } + .setting-list { + list-style-type: none; + } diff --git a/src/components/status/status.js b/src/components/status/status.js index 22292ffa..cca5f7fc 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -17,7 +17,10 @@ const Status = { userExpanded: false }), computed: { - hideAttachments () { return this.$store.state.config.hideAttachments }, + hideAttachments () { + return (this.$store.state.config.hideAttachments && this.expandable) || + (this.$store.state.config.hideAttachmentsInConv && !this.expandable) + }, retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name }, status () { diff --git a/src/main.js b/src/main.js index fa0a872f..b5c148ff 100644 --- a/src/main.js +++ b/src/main.js @@ -31,6 +31,7 @@ Vue.use(VueTimeago, { const persistedStateOptions = { paths: [ 'config.hideAttachments', + 'config.hideAttachmentsInConv', 'config.hideNsfw', 'statuses.notifications', 'users.users' diff --git a/src/modules/config.js b/src/modules/config.js index 896a6978..05b4ab3b 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -5,6 +5,7 @@ const defaultState = { name: 'Pleroma FE', colors: {}, hideAttachments: false, + hideAttachmentsInConv: false, hideNsfw: true }