From 4c12de262ff1ca9cde925195de20158c33f7bad0 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Tue, 14 Feb 2017 00:01:50 +0100
Subject: Add muting to statuses.

---
 src/components/status/status.vue | 115 +++++++++++++++++++++------------------
 1 file changed, 63 insertions(+), 52 deletions(-)

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

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index f113fb7e..95abdd5b 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,70 +1,78 @@
 <template>
   <div class="status-el base00-background" v-if="!status.deleted">
-    <div v-if="retweet" class="media container retweet-info">
-      <div class="media-left">
-        <i class='fa icon-retweet retweeted'></i>
+    <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>
+        <button @click="toggleMute">show</button>
       </div>
-      <div class="media-body">
-        Retweeted by {{retweeter}}
-      </div>
-    </div>
-    <div class="media status container">
-      <div class="media-left">
-        <a :href="status.user.statusnet_profile_url">
-          <img class='avatar' :src="status.user.profile_image_url_original">
-        </a>
+    </template>
+    <template v-if="!muted">
+      <div v-if="retweet" class="media container retweet-info">
+        <div class="media-left">
+          <i class='fa icon-retweet retweeted'></i>
+        </div>
+        <div class="media-body">
+          Retweeted by {{retweeter}}
+        </div>
       </div>
-      <div class="media-body">
-        <div class="user-content">
-          <h4 class="media-heading">
-            {{status.user.name}}
-            <small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
-            <small v-if="status.in_reply_to_screen_name"> &gt;
-              <router-link :to="{ name: 'user-profile', params: { id: status.in_reply_to_user_id } }">
-                {{status.in_reply_to_screen_name}}
-              </router-link>
-            </small>
-            -
-            <small>
-              <router-link :to="{ name: 'conversation', params: { id: status.id } }">
-                <timeago :since="status.created_at" :auto-update="60"></timeago>
-              </router-link>
-            </small>
-            <template v-if="expandable">
+      <div class="media status container">
+        <div class="media-left">
+          <a :href="status.user.statusnet_profile_url">
+            <img class='avatar' :src="status.user.profile_image_url_original">
+          </a>
+        </div>
+        <div class="media-body">
+          <div class="user-content">
+            <h4 class="media-heading">
+              {{status.user.name}}
+              <small><router-link :to="{ name: 'user-profile', params: { id: status.user.id } }">{{status.user.screen_name}}</router-link></small>
+              <small v-if="status.in_reply_to_screen_name"> &gt;
+                <router-link :to="{ name: 'user-profile', params: { id: status.in_reply_to_user_id } }">
+                  {{status.in_reply_to_screen_name}}
+                </router-link>
+              </small>
               -
               <small>
-                <a href="#" @click.prevent="toggleExpanded" >Expand</a>
+                <router-link :to="{ name: 'conversation', params: { id: status.id } }">
+                  <timeago :since="status.created_at" :auto-update="60"></timeago>
+                </router-link>
+              </small>
+              <template v-if="expandable">
+                -
+                <small>
+                  <a href="#" @click.prevent="toggleExpanded" >Expand</a>
+                </small>
+              </template>
+              <small v-if="!status.is_local" class="source_url">
+                <a :href="status.external_url" target="_blank" >Source</a>
               </small>
-            </template>
-            <small v-if="!status.is_local" class="source_url">
-              <a :href="status.external_url" target="_blank" >Source</a>
-            </small>
-          </h4>
+            </h4>
 
-          <div class="status-content" v-html="status.statusnet_html"></div>
+            <div class="status-content" v-html="status.statusnet_html"></div>
 
-          <div v-if='status.attachments' class='attachments'>
-            <attachment :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments">
-            </attachment>
+            <div v-if='status.attachments' class='attachments'>
+              <attachment :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments">
+              </attachment>
+            </div>
           </div>
-        </div>
 
-        <div v-if="loggedIn">
-          <div class='status-actions'>
-            <div>
-              <a href="#" v-on:click.prevent="toggleReplying">
-                <i class='fa icon-reply'></i>
-              </a>
+          <div v-if="loggedIn">
+            <div class='status-actions'>
+              <div>
+                <a href="#" v-on:click.prevent="toggleReplying">
+                  <i class='fa icon-reply'></i>
+                </a>
+              </div>
+              <retweet-button :status=status></retweet-button>
+              <favorite-button :status=status></favorite-button>
+              <delete-button :status=status></delete-button>
             </div>
-            <retweet-button :status=status></retweet-button>
-            <favorite-button :status=status></favorite-button>
-            <delete-button :status=status></delete-button>
-          </div>
 
-          <post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form>
+            <post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form>
+          </div>
         </div>
       </div>
-    </div>
+    </template>
   </div>
 </template>
 
@@ -128,4 +136,7 @@
      padding-right: 1em;
      border-bottom: 1px solid;
  }
+ .muted button {
+   margin-left: auto;
+ }
 </style>
-- 
cgit v1.2.3-70-g09d2


From 340b21475d94542e1ddb7c34f192749c229b58eb Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Tue, 14 Feb 2017 21:47:37 +0100
Subject: Make temporarily unmuted posts hideable again.

---
 src/components/status/status.vue | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

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

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 95abdd5b..c215a00b 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -3,7 +3,7 @@
     <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>
-        <button @click="toggleMute">show</button>
+        <a href="#" class="unmute" @click.prevent="toggleMute"><i class="icon-eye-off"></i></a>
       </div>
     </template>
     <template v-if="!muted">
@@ -40,11 +40,14 @@
               <template v-if="expandable">
                 -
                 <small>
-                  <a href="#" @click.prevent="toggleExpanded" >Expand</a>
+                  <a href="#" @click.prevent="toggleExpanded" ><i class="icon-plus-squared"></i></a>
+                </small>
+                <small v-if="status.user.muted">
+                  <a href="#" @click.prevent="toggleMute" ><i class="icon-eye-off"></i></a>
                 </small>
               </template>
               <small v-if="!status.is_local" class="source_url">
-                <a :href="status.external_url" target="_blank" >Source</a>
+                <a :href="status.external_url" target="_blank" ><i class="icon-binoculars"></i></a>
               </small>
             </h4>
 
@@ -139,4 +142,9 @@
  .muted button {
    margin-left: auto;
  }
+
+ a.unmute {
+   display: block;
+   margin-left: auto;
+ }
 </style>
-- 
cgit v1.2.3-70-g09d2


From 5481cf00a3c8cc2a8707155e7b7383f2ebff92b1 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Thu, 16 Feb 2017 15:58:49 +0100
Subject: Make user profiles visible inline.

---
 src/components/status/status.js           | 10 ++++++++--
 src/components/status/status.vue          | 12 +++++++++++-
 src/services/style_setter/style_setter.js |  2 +-
 3 files changed, 20 insertions(+), 4 deletions(-)

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

diff --git a/src/components/status/status.js b/src/components/status/status.js
index 3d1d50fb..030e22b5 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -3,6 +3,7 @@ import FavoriteButton from '../favorite_button/favorite_button.vue'
 import RetweetButton from '../retweet_button/retweet_button.vue'
 import DeleteButton from '../delete_button/delete_button.vue'
 import PostStatusForm from '../post_status_form/post_status_form.vue'
+import UserCardContent from '../user_card_content/user_card_content.vue'
 
 const Status = {
   props: [
@@ -12,7 +13,8 @@ const Status = {
   data: () => ({
     replying: false,
     expanded: false,
-    unmuted: false
+    unmuted: false,
+    userExpanded: false
   }),
   computed: {
     retweet () { return !!this.statusoid.retweeted_status },
@@ -34,7 +36,8 @@ const Status = {
     FavoriteButton,
     RetweetButton,
     DeleteButton,
-    PostStatusForm
+    PostStatusForm,
+    UserCardContent
   },
   methods: {
     toggleReplying () {
@@ -45,6 +48,9 @@ const Status = {
     },
     toggleMute () {
       this.unmuted = !this.unmuted
+    },
+    toggleUserExpanded () {
+      this.userExpanded = !this.userExpanded
     }
   }
 }
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index c215a00b..0c004936 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -18,10 +18,13 @@
       <div class="media status container">
         <div class="media-left">
           <a :href="status.user.statusnet_profile_url">
-            <img class='avatar' :src="status.user.profile_image_url_original">
+            <img @click.prevent="toggleUserExpanded" class='avatar' :src="status.user.profile_image_url_original">
           </a>
         </div>
         <div class="media-body">
+          <div class="base05 base05=border usercard" v-if="userExpanded">
+            <user-card-content :user="status.user"></user-card-content>
+          </div>
           <div class="user-content">
             <h4 class="media-heading">
               {{status.user.name}}
@@ -147,4 +150,11 @@
    display: block;
    margin-left: auto;
  }
+
+ .usercard {
+   border-style: solid;
+   border-width: 1px;
+   border-radius: 1em;
+   margin-bottom: 1em;
+ }
 </style>
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
index 79b68b38..0a5be77d 100644
--- a/src/services/style_setter/style_setter.js
+++ b/src/services/style_setter/style_setter.js
@@ -34,7 +34,7 @@ const setStyle = (href) => {
 
     styleSheet.insertRule(`a { color: ${base08Color}`, 'index-max')
     styleSheet.insertRule(`body { color: ${base05Color}`, 'index-max')
-    styleSheet.insertRule(`.base05-border { color: ${base05Color}`, 'index-max')
+    styleSheet.insertRule(`.base05-border { border-color: ${base05Color}`, 'index-max')
     body.style.display = 'initial'
   }
   cssEl.addEventListener('load', setDynamic)
-- 
cgit v1.2.3-70-g09d2

