From 6af870cd9069a8fc45b7684d264656dad0cf4a70 Mon Sep 17 00:00:00 2001
From: kPherox <admin@mail.kr-kp.com>
Date: Wed, 11 Dec 2019 00:00:10 +0900
Subject: Add view for moves notifications

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

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

diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 1f192c77..cf4d8072 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -74,9 +74,13 @@
               <i class="fa icon-user-plus lit" />
               <small>{{ $t('notifications.followed_you') }}</small>
             </span>
+            <span v-if="notification.type === 'move'">
+              <i class="fa icon-arrow-curved lit" />
+              <small>{{ $t('notifications.moved_to') }}</small>
+            </span>
           </div>
           <div
-            v-if="notification.type === 'follow'"
+            v-if="notification.type === 'follow' || notification.type === 'move'"
             class="timeago"
           >
             <span class="faint">
@@ -115,6 +119,14 @@
             @{{ notification.from_profile.screen_name }}
           </router-link>
         </div>
+        <div
+          v-else-if="notification.type === 'move'"
+          class="move-text"
+        >
+          <router-link :to="userProfileLink">
+            @{{ notification.target.screen_name }}
+          </router-link>
+        </div>
         <template v-else>
           <status
             class="faint"
-- 
cgit v1.2.3-70-g09d2


From 31aa177eea8f2e50e1802d1dd51a8470199b6bcb Mon Sep 17 00:00:00 2001
From: kPherox <admin@mail.kr-kp.com>
Date: Wed, 11 Dec 2019 04:02:25 +0900
Subject: Fix target account link

---
 src/components/notification/notification.js  | 12 ++++++++++++
 src/components/notification/notification.vue |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

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

diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index 7d46eb5a..93edf2fa 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -55,6 +55,18 @@ const Notification = {
     userProfileLink () {
       return this.generateUserProfileLink(this.user)
     },
+    targetUserInStore () {
+      return this.$store.getters.findUser(this.notification.target.id)
+    },
+    targetUser () {
+      if (this.targetUserInStore) {
+        return this.targetUserInStore
+      }
+      return this.notification.target
+    },
+    targetUserProfileLink () {
+      return this.generateUserProfileLink(this.targetUser)
+    },
     needMute () {
       return this.user.muted
     }
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index cf4d8072..33ae054f 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -123,7 +123,7 @@
           v-else-if="notification.type === 'move'"
           class="move-text"
         >
-          <router-link :to="userProfileLink">
+          <router-link :to="targetUserProfileLink">
             @{{ notification.target.screen_name }}
           </router-link>
         </div>
-- 
cgit v1.2.3-70-g09d2


From e8333fff8dc048f5d5d8406c71cb80e95ea1982c Mon Sep 17 00:00:00 2001
From: kPherox <admin@mail.kr-kp.com>
Date: Wed, 11 Dec 2019 18:20:23 +0900
Subject: change the expression of `move`

---
 src/components/notification/notification.vue | 2 +-
 src/i18n/en.json                             | 4 ++--
 src/modules/statuses.js                      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

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

diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 33ae054f..16124e50 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -76,7 +76,7 @@
             </span>
             <span v-if="notification.type === 'move'">
               <i class="fa icon-arrow-curved lit" />
-              <small>{{ $t('notifications.moved_to') }}</small>
+              <small>{{ $t('notifications.migrated_to') }}</small>
             </span>
           </div>
           <div
diff --git a/src/i18n/en.json b/src/i18n/en.json
index dcd2f3d7..4fd8ee0b 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -111,7 +111,7 @@
     "read": "Read!",
     "repeated_you": "repeated your status",
     "no_more_notifications": "No more notifications",
-    "moved_to": "moved to"
+    "migrated_to": "migrated to"
   },
   "polls": {
     "add_poll": "Add Poll",
@@ -312,7 +312,7 @@
     "notification_visibility_likes": "Likes",
     "notification_visibility_mentions": "Mentions",
     "notification_visibility_repeats": "Repeats",
-    "notification_visibility_moves": "Moves",
+    "notification_visibility_moves": "User Migrates",
     "no_rich_text_description": "Strip rich text formatting from all posts",
     "no_blocks": "No blocks",
     "no_mutes": "No mutes",
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 420b3183..f3fc0f21 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -340,7 +340,7 @@ const addNewNotifications = (state, { dispatch, notifications, older, visibleNot
             i18nString = 'followed_you'
             break
           case 'move':
-            i18nString = 'moved_to'
+            i18nString = 'migrated_to'
             break
         }
 
-- 
cgit v1.2.3-70-g09d2

