From 390b2bcfee4842ca10a53e036da7f1a1076042cb Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Mon, 25 Feb 2019 23:34:24 -0500
Subject: Add FollowRequestCard component

---
 .../follow_request_card/follow_request_card.vue    | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 src/components/follow_request_card/follow_request_card.vue

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

diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue
new file mode 100644
index 00000000..945812fc
--- /dev/null
+++ b/src/components/follow_request_card/follow_request_card.vue
@@ -0,0 +1,27 @@
+<template>
+  <basic-user-card :user="user">
+    <template slot="third-area">
+      <div class="follow-request-card-action-buttons-container">
+        <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button>
+        <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button>
+      </div>
+    </template>
+  </basic-user-card>
+</template>
+
+<script src="./follow_request_card.js"></script>
+
+<style lang="scss">
+.follow-request-card-action-buttons-container {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: wrap;
+  button {
+    margin-top: 0.5em;
+    margin-right: 0.5em;
+    flex: 1 1;
+    max-width: 12em;
+    min-width: 8em;
+  }
+}
+</style>
-- 
cgit v1.2.3-70-g09d2


From 1fecac9ba6350216bb02ef156aa1573b546cee7f Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Tue, 26 Feb 2019 10:14:12 -0500
Subject: Update naming

---
 src/components/basic_user_card/basic_user_card.vue         |  4 ++--
 src/components/follow_card/follow_card.js                  | 10 +++++-----
 src/components/follow_card/follow_card.vue                 | 10 +++++-----
 src/components/follow_request_card/follow_request_card.vue |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

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

diff --git a/src/components/basic_user_card/basic_user_card.vue b/src/components/basic_user_card/basic_user_card.vue
index cb73d54d..af4ffc08 100644
--- a/src/components/basic_user_card/basic_user_card.vue
+++ b/src/components/basic_user_card/basic_user_card.vue
@@ -21,8 +21,8 @@
           <slot name="secondary-area"></slot>
         </div>
       </div>
-      <div class="user-card-third-area">
-        <slot name="third-area"></slot>
+      <div class="user-card-tertiary-area">
+        <slot name="tertiary-area"></slot>
       </div>
     </div>
   </div>
diff --git a/src/components/follow_card/follow_card.js b/src/components/follow_card/follow_card.js
index 85e6a6d2..425c9c3e 100644
--- a/src/components/follow_card/follow_card.js
+++ b/src/components/follow_card/follow_card.js
@@ -8,7 +8,7 @@ const FollowCard = {
   ],
   data () {
     return {
-      progress: false,
+      inProgress: false,
       requestSent: false,
       updated: false
     }
@@ -25,17 +25,17 @@ const FollowCard = {
   },
   methods: {
     followUser () {
-      this.progress = true
+      this.inProgress = true
       requestFollow(this.user, this.$store).then(({ sent, updated }) => {
-        this.progress = false
+        this.inProgress = false
         this.requestSent = sent
         this.updated = updated
       })
     },
     unfollowUser () {
-      this.progress = true
+      this.inProgress = true
       requestUnfollow(this.user, this.$store).then(({ updated }) => {
-        this.progress = false
+        this.inProgress = false
         this.updated = updated
       })
     }
diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue
index 936307c4..e6933e3c 100644
--- a/src/components/follow_card/follow_card.vue
+++ b/src/components/follow_card/follow_card.vue
@@ -5,10 +5,10 @@
         v-if="showFollow"
         class="btn btn-default"
         @click="followUser"
-        :disabled="progress"
+        :disabled="inProgress"
         :title="requestSent ? $t('user_card.follow_again') : ''"
       >
-        <template v-if="progress">
+        <template v-if="inProgress">
           {{ $t('user_card.follow_progress') }}
         </template>
         <template v-else-if="requestSent">
@@ -18,8 +18,8 @@
           {{ $t('user_card.follow') }}
         </template>
       </button>
-      <button v-if="following" class="btn btn-default pressed" @click="unfollowUser" :disabled="progress">
-        <template v-if="progress">
+      <button v-if="following" class="btn btn-default pressed" @click="unfollowUser" :disabled="inProgress">
+        <template v-if="inProgress">
           {{ $t('user_card.follow_progress') }}
         </template>
         <template v-else>
@@ -27,7 +27,7 @@
         </template>
       </button>
     </template>
-    <template slot="third-area">
+    <template slot="tertiary-area">
       <span class="faint" v-if="!noFollowsYou && user.follows_you">
         {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
       </span>
diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue
index 945812fc..4e2f3bf8 100644
--- a/src/components/follow_request_card/follow_request_card.vue
+++ b/src/components/follow_request_card/follow_request_card.vue
@@ -1,6 +1,6 @@
 <template>
   <basic-user-card :user="user">
-    <template slot="third-area">
+    <template slot="tertiary-area">
       <div class="follow-request-card-action-buttons-container">
         <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button>
         <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button>
-- 
cgit v1.2.3-70-g09d2


From c5519fa587925d7c6aabde1375d859ea0865dad8 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Tue, 26 Feb 2019 11:00:25 -0500
Subject: Improve mobile layout of user card

---
 src/components/basic_user_card/basic_user_card.vue | 22 +++++++++++++++++++---
 src/components/follow_card/follow_card.vue         | 10 +++++-----
 .../follow_request_card/follow_request_card.vue    |  4 ++++
 3 files changed, 28 insertions(+), 8 deletions(-)

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

diff --git a/src/components/basic_user_card/basic_user_card.vue b/src/components/basic_user_card/basic_user_card.vue
index af4ffc08..0563360a 100644
--- a/src/components/basic_user_card/basic_user_card.vue
+++ b/src/components/basic_user_card/basic_user_card.vue
@@ -13,9 +13,12 @@
             <span v-if="user.name_html" v-html="user.name_html"></span>
             <span v-else>{{ user.name }}</span>
           </div>
-          <router-link :to="userProfileLink(user)">
-            @{{user.screen_name}}
-          </router-link>
+          <div>
+            <router-link :to="userProfileLink(user)">
+              @{{user.screen_name}}
+            </router-link>
+          </div>
+          <slot name="primary-area"></slot>
         </div>
         <div class="user-card-secondary-area">
           <slot name="secondary-area"></slot>
@@ -49,6 +52,7 @@
     margin-left: 0.7em;
     text-align: left;
     flex: 1;
+    min-width: 0;
   }
 
   &-primary-secondary-wrapper {
@@ -59,6 +63,8 @@
 
   &-primary-area {
     flex: 1;
+    margin-right: 1em;
+    min-width: 0;
   }
 
   &-user-name {
@@ -100,5 +106,15 @@
       margin-bottom: 0;
     }
   }
+
+  @media (min-width: 320px) and (max-width: 480px) {
+    &-primary-secondary-wrapper {
+      flex-direction: column;
+    }
+
+    &-primary-area {
+      margin-right: 0;
+    }
+  }
 }
 </style>
diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue
index e6933e3c..8e6dd2fb 100644
--- a/src/components/follow_card/follow_card.vue
+++ b/src/components/follow_card/follow_card.vue
@@ -1,5 +1,10 @@
 <template>
   <basic-user-card :user="user">
+    <template slot="primary-area">
+      <span class="faint" v-if="!noFollowsYou && user.follows_you">
+        {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
+      </span>
+    </template>
     <template slot="secondary-area">
       <button
         v-if="showFollow"
@@ -27,11 +32,6 @@
         </template>
       </button>
     </template>
-    <template slot="tertiary-area">
-      <span class="faint" v-if="!noFollowsYou && user.follows_you">
-        {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
-      </span>
-    </template>
   </basic-user-card>
 </template>
 
diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue
index 4e2f3bf8..522db35f 100644
--- a/src/components/follow_request_card/follow_request_card.vue
+++ b/src/components/follow_request_card/follow_request_card.vue
@@ -22,6 +22,10 @@
     flex: 1 1;
     max-width: 12em;
     min-width: 8em;
+
+    &:last-child {
+      margin-right: 0;
+    }
   }
 }
 </style>
-- 
cgit v1.2.3-70-g09d2


From a6f2af4ad9fa2c05286f6cdf1a580121e2787d1f Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Tue, 26 Feb 2019 15:18:22 -0500
Subject: Shorten a classname

---
 src/components/follow_request_card/follow_request_card.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue
index 522db35f..45d02b89 100644
--- a/src/components/follow_request_card/follow_request_card.vue
+++ b/src/components/follow_request_card/follow_request_card.vue
@@ -1,7 +1,7 @@
 <template>
   <basic-user-card :user="user">
     <template slot="tertiary-area">
-      <div class="follow-request-card-action-buttons-container">
+      <div class="follow-request-card-btns-container">
         <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button>
         <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button>
       </div>
@@ -12,7 +12,7 @@
 <script src="./follow_request_card.js"></script>
 
 <style lang="scss">
-.follow-request-card-action-buttons-container {
+.follow-request-card-btns-container {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
-- 
cgit v1.2.3-70-g09d2


From 0e86681aba522f8c530a030b0e3c9745ec415eed Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Wed, 27 Feb 2019 11:58:29 -0500
Subject: Merge all slots of BasicUserCard into one

---
 src/components/basic_user_card/basic_user_card.vue | 58 +++-------------------
 src/components/block_card/block_card.vue           | 16 ++++--
 src/components/follow_card/follow_card.vue         | 25 ++++++++--
 .../follow_request_card/follow_request_card.vue    | 12 ++---
 4 files changed, 46 insertions(+), 65 deletions(-)

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

diff --git a/src/components/basic_user_card/basic_user_card.vue b/src/components/basic_user_card/basic_user_card.vue
index 0563360a..ff3d0d09 100644
--- a/src/components/basic_user_card/basic_user_card.vue
+++ b/src/components/basic_user_card/basic_user_card.vue
@@ -7,26 +7,16 @@
       <user-card-content :user="user" :switcher="false"></user-card-content>
     </div>
     <div class="user-card-collapsed-content" v-else>
-      <div class="user-card-primary-secondary-wrapper">
-        <div class="user-card-primary-area">
-          <div :title="user.name" class="user-card-user-name">
-            <span v-if="user.name_html" v-html="user.name_html"></span>
-            <span v-else>{{ user.name }}</span>
-          </div>
-          <div>
-            <router-link :to="userProfileLink(user)">
-              @{{user.screen_name}}
-            </router-link>
-          </div>
-          <slot name="primary-area"></slot>
-        </div>
-        <div class="user-card-secondary-area">
-          <slot name="secondary-area"></slot>
-        </div>
+      <div :title="user.name" class="user-card-user-name">
+        <span v-if="user.name_html" v-html="user.name_html"></span>
+        <span v-else>{{ user.name }}</span>
       </div>
-      <div class="user-card-tertiary-area">
-        <slot name="tertiary-area"></slot>
+      <div>
+        <router-link :to="userProfileLink(user)">
+          @{{user.screen_name}}
+        </router-link>
       </div>
+      <slot></slot>
     </div>
   </div>
 </template>
@@ -52,19 +42,6 @@
     margin-left: 0.7em;
     text-align: left;
     flex: 1;
-    min-width: 0;
-  }
-
-  &-primary-secondary-wrapper {
-    display: flex;
-    align-items: flex-start;
-    justify-content: space-between;
-  }
-
-  &-primary-area {
-    flex: 1;
-    margin-right: 1em;
-    min-width: 0;
   }
 
   &-user-name {
@@ -76,15 +53,6 @@
     }
   }
 
-  &-secondary-area {
-    flex: none;
-
-    .btn {
-      margin-top: .5em;
-      width: 10em;
-    }
-  }
-
   &-expanded-content {
     flex: 1;
     margin-left: 0.7em;
@@ -106,15 +74,5 @@
       margin-bottom: 0;
     }
   }
-
-  @media (min-width: 320px) and (max-width: 480px) {
-    &-primary-secondary-wrapper {
-      flex-direction: column;
-    }
-
-    &-primary-area {
-      margin-right: 0;
-    }
-  }
 }
 </style>
diff --git a/src/components/block_card/block_card.vue b/src/components/block_card/block_card.vue
index ed7fe30b..8eb56e25 100644
--- a/src/components/block_card/block_card.vue
+++ b/src/components/block_card/block_card.vue
@@ -1,6 +1,6 @@
 <template>
   <basic-user-card :user="user">
-    <template slot="secondary-area">
+    <div class="block-card-content-container">
       <button class="btn btn-default" @click="unblockUser" :disabled="progress" v-if="blocked">
         <template v-if="progress">
           {{ $t('user_card.unblock_progress') }}
@@ -17,8 +17,18 @@
           {{ $t('user_card.block') }}
         </template>
       </button>
-    </template>
+    </div>
   </basic-user-card>
 </template>
 
-<script src="./block_card.js"></script>
\ No newline at end of file
+<script src="./block_card.js"></script>
+
+<style lang="scss">
+.block-card-content-container {
+  margin-top: 0.5em;
+  text-align: right;
+  button {
+    width: 10em;
+  }
+}
+</style>
diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue
index 8e6dd2fb..1ae728a6 100644
--- a/src/components/follow_card/follow_card.vue
+++ b/src/components/follow_card/follow_card.vue
@@ -1,11 +1,9 @@
 <template>
   <basic-user-card :user="user">
-    <template slot="primary-area">
-      <span class="faint" v-if="!noFollowsYou && user.follows_you">
+    <div class="follow-card-content-container">
+      <span class="faint">
         {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }}
       </span>
-    </template>
-    <template slot="secondary-area">
       <button
         v-if="showFollow"
         class="btn btn-default"
@@ -31,8 +29,25 @@
           {{ $t('user_card.follow_unfollow') }}
         </template>
       </button>
-    </template>
+    </div>
   </basic-user-card>
 </template>
 
 <script src="./follow_card.js"></script>
+
+<style lang="scss">
+.follow-card-content-container {
+  flex-shrink: 0;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  line-height: 1.5em;
+
+  .btn {
+    margin-top: 0.5em;
+    margin-left: auto;
+    width: 10em;
+  }
+}
+</style>
diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue
index 45d02b89..4a3bbba4 100644
--- a/src/components/follow_request_card/follow_request_card.vue
+++ b/src/components/follow_request_card/follow_request_card.vue
@@ -1,18 +1,16 @@
 <template>
   <basic-user-card :user="user">
-    <template slot="tertiary-area">
-      <div class="follow-request-card-btns-container">
-        <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button>
-        <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button>
-      </div>
-    </template>
+    <div class="follow-request-card-content-container">
+      <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button>
+      <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button>
+    </div>
   </basic-user-card>
 </template>
 
 <script src="./follow_request_card.js"></script>
 
 <style lang="scss">
-.follow-request-card-btns-container {
+.follow-request-card-content-container {
   display: flex;
   flex-direction: row;
   flex-wrap: wrap;
-- 
cgit v1.2.3-70-g09d2

