aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorwakarimasen <wakarimasen@airmail.cc>2017-03-04 21:25:59 +0100
committerwakarimasen <wakarimasen@airmail.cc>2017-03-04 21:25:59 +0100
commit6bcbed38d0952a332a900a615bfe8c7a553e8fc4 (patch)
treecfed85e21222b368cc2d5b0a69a03de350456990 /src/components
parent049c74f8e87e0aa19ee416bb72c987296a3e2dc9 (diff)
Add option to only hide attachments on timeline
Diffstat (limited to 'src/components')
-rw-r--r--src/components/settings/settings.js4
-rw-r--r--src/components/settings/settings.vue21
-rw-r--r--src/components/status/status.js5
3 files changed, 25 insertions, 5 deletions
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 @@
</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>
+ <ul class="setting-list">
+ <li>
+ <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal">
+ <label for="hideAttachments">Hide attachments on timeline</label>
+ </li>
+ <li>
+ <input type="checkbox" id="hideAttachmentsInConv" v-model="hideAttachmentsInConvLocal">
+ <label for="hideAttachmentsInConv">Hide attachments in conversations</label>
+ </li>
+ <li>
+ <input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal">
+ <label for="hideNsfw">Enable clickthrough NSFW attachment hiding</label>
+ </li>
+ </ul>
</div>
</div>
</div>
@@ -26,4 +36,7 @@
.setting-item {
margin: 1em 1em 1.4em;
}
+ .setting-list {
+ list-style-type: none;
+ }
</style>
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 () {