From 75fdc72e222dee612137e4521dab1e44191948bb Mon Sep 17 00:00:00 2001
From: Jiayi Zheng <thebluber@gmail.com>
Date: Sun, 4 Dec 2016 18:30:00 +0100
Subject: Implements feature status delete Fixes issue #4

---
 src/components/status/status.vue | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

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

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 86632876..35b381ba 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="status-el">
+  <div class="status-el" v-if="!status.deleted">
     <div v-if="retweet" class="media container retweet-info">
       <div class="media-left">
         <i class='fa icon-retweet'></i>
@@ -52,6 +52,11 @@
             </div>
             <retweet-button :status=status></retweet-button>
             <favorite-button :status=status></favorite-button>
+            <div v-if="canDelete">
+              <a href="#" v-on:click.prevent="deleteStatus">
+                <i class='fa icon-cancel delete-status'></i>
+              </a>
+            </div>
           </div>
 
           <post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form>
@@ -125,4 +130,11 @@
  .status-el:last-child .status {
      border: none
  }
+
+ .icon-cancel,.delete-status {
+   cursor: pointer;
+   &:hover {
+    color: $red;
+   }
+ }
 </style>
-- 
cgit v1.2.3-70-g09d2

