From 6bcbed38d0952a332a900a615bfe8c7a553e8fc4 Mon Sep 17 00:00:00 2001
From: wakarimasen <wakarimasen@airmail.cc>
Date: Sat, 4 Mar 2017 21:25:59 +0100
Subject: Add option to only hide attachments on timeline

---
 src/components/settings/settings.vue | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

(limited to 'src/components/settings/settings.vue')

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>
-- 
cgit v1.2.3-70-g09d2


From c921662036fe39f5146d5a36b4b018af3cfc2635 Mon Sep 17 00:00:00 2001
From: wakarimasen <wakarimasen@airmail.cc>
Date: Sun, 5 Mar 2017 14:34:14 +0100
Subject: Add inConversation prop to status

---
 src/components/conversation/conversation.vue                     | 2 +-
 src/components/settings/settings.vue                             | 2 +-
 src/components/status/status.js                                  | 7 ++++---
 src/components/status/status.vue                                 | 4 ++--
 src/components/status_or_conversation/status_or_conversation.vue | 2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

(limited to 'src/components/settings/settings.vue')

diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index 9675e69f..8e24fcbe 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -8,7 +8,7 @@
     </div>
     <div class="panel-body">
       <div class="timeline">
-        <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false'></status>
+        <status v-for="status in conversation" :key="status.id" v-bind:statusoid="status":expandable='false':inConversation='true'></status>
       </div>
     </div>
   </div>
diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue
index cebf62f7..478d761a 100644
--- a/src/components/settings/settings.vue
+++ b/src/components/settings/settings.vue
@@ -13,7 +13,7 @@
         <ul class="setting-list">
             <li>
                 <input type="checkbox" id="hideAttachments" v-model="hideAttachmentsLocal">
-                <label for="hideAttachments">Hide attachments on timeline</label>
+                <label for="hideAttachments">Hide attachments in timeline</label>
             </li>
             <li>
                 <input type="checkbox" id="hideAttachmentsInConv" v-model="hideAttachmentsInConvLocal">
diff --git a/src/components/status/status.js b/src/components/status/status.js
index cca5f7fc..0783604d 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -8,7 +8,8 @@ import UserCardContent from '../user_card_content/user_card_content.vue'
 const Status = {
   props: [
     'statusoid',
-    'expandable'
+    'expandable',
+    'inConversation'
   ],
   data: () => ({
     replying: false,
@@ -18,8 +19,8 @@ const Status = {
   }),
   computed: {
     hideAttachments () {
-      return (this.$store.state.config.hideAttachments && this.expandable) ||
-        (this.$store.state.config.hideAttachmentsInConv && !this.expandable)
+      return (this.$store.state.config.hideAttachments && !this.inConversation) ||
+        (this.$store.state.config.hideAttachmentsInConv && this.inConversation)
     },
     retweet () { return !!this.statusoid.retweeted_status },
     retweeter () { return this.statusoid.user.name },
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 585bf621..d8dce423 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="status-el base00-background" v-if="!status.deleted" v-bind:class="{ 'expanded-status': !expandable }">
+  <div class="status-el base00-background" v-if="!status.deleted" v-bind:class="{ 'status-conversation': inConversation }">
     <template v-if="muted">
       <div class="media status container muted">
         <small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
@@ -121,7 +121,7 @@
      }
  }
 
- .expanded-status {
+ .status-conversation {
    border-left: 4px solid rgba(255, 48, 16, 0.65);
  }
 
diff --git a/src/components/status_or_conversation/status_or_conversation.vue b/src/components/status_or_conversation/status_or_conversation.vue
index 4fabfab2..1e21bdcd 100644
--- a/src/components/status_or_conversation/status_or_conversation.vue
+++ b/src/components/status_or_conversation/status_or_conversation.vue
@@ -1,7 +1,7 @@
 <template>
   <div>
     <conversation v-if="expanded" @toggleExpanded="toggleExpanded" :collapsable="true" :statusoid="statusoid"></conversation>
-    <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :statusoid="statusoid"></status>
+    <status v-if="!expanded" @toggleExpanded="toggleExpanded" :expandable="true" :inConversation="false" :statusoid="statusoid"></status>
   </div>
 </template>
 
-- 
cgit v1.2.3-70-g09d2

