From 8c283f949ca27c052e869d64e8311a8bca1ac255 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Sat, 11 May 2019 23:01:59 +0900
Subject: [PATCH 1/3] refs #772 Add follow requests menu in side menu
---
.../store/TimelineSpace/SideMenu.spec.ts | 6 +-
src/config/locales/en/translation.json | 1 +
src/renderer/components/TimelineSpace.vue | 95 +++++++++---------
.../components/TimelineSpace/SideMenu.vue | 98 +++++++++++--------
src/renderer/store/TimelineSpace/SideMenu.ts | 36 ++++---
5 files changed, 126 insertions(+), 110 deletions(-)
diff --git a/spec/renderer/integration/store/TimelineSpace/SideMenu.spec.ts b/spec/renderer/integration/store/TimelineSpace/SideMenu.spec.ts
index 65905392..300c388a 100644
--- a/spec/renderer/integration/store/TimelineSpace/SideMenu.spec.ts
+++ b/spec/renderer/integration/store/TimelineSpace/SideMenu.spec.ts
@@ -26,6 +26,7 @@ const state = (): SideMenuState => {
unreadLocalTimeline: false,
unreadDirectMessagesTimeline: false,
unreadPublicTimeline: false,
+ unreadFollowRequests: false,
lists: [],
tags: [],
collapse: false
@@ -62,10 +63,7 @@ describe('SideMenu', () => {
get: (_path: string, _params: object) => {
return new Promise>(resolve => {
const res: Response = {
- data: [
- list1,
- list2
- ],
+ data: [list1, list2],
status: 200,
statusText: 'OK',
headers: {}
diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json
index ebcf2f16..d427bb46 100644
--- a/src/config/locales/en/translation.json
+++ b/src/config/locales/en/translation.json
@@ -49,6 +49,7 @@
"notification": "Notification",
"mention": "Mention",
"direct": "Direct messages",
+ "follow_requests": "Follow Requests",
"favourite": "Favourite",
"local": "Local timeline",
"public": "Public timeline",
diff --git a/src/renderer/components/TimelineSpace.vue b/src/renderer/components/TimelineSpace.vue
index 3c870594..dc4ebac6 100644
--- a/src/renderer/components/TimelineSpace.vue
+++ b/src/renderer/components/TimelineSpace.vue
@@ -1,23 +1,23 @@
-
+
+
diff --git a/src/renderer/components/TimelineSpace/HeaderMenu.vue b/src/renderer/components/TimelineSpace/HeaderMenu.vue
index de5bdfe2..17a38191 100644
--- a/src/renderer/components/TimelineSpace/HeaderMenu.vue
+++ b/src/renderer/components/TimelineSpace/HeaderMenu.vue
@@ -115,6 +115,9 @@ export default {
case 'mentions':
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', this.$t('header_menu.mention'))
break
+ case 'follow-requests':
+ this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', this.$t('header_menu.follow_requests'))
+ break
case 'local':
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', this.$t('header_menu.local'))
break
@@ -134,7 +137,7 @@ export default {
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', this.$t('header_menu.lists'))
break
case 'direct-messages':
- this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', 'Direct Messages')
+ this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', this.$t('header_menu.direct_messages'))
break
case 'edit-list':
this.$store.commit('TimelineSpace/HeaderMenu/updateTitle', this.$t('header_menu.members'))
diff --git a/src/renderer/components/TimelineSpace/SideMenu.vue b/src/renderer/components/TimelineSpace/SideMenu.vue
index 0353cc4f..566958a7 100644
--- a/src/renderer/components/TimelineSpace/SideMenu.vue
+++ b/src/renderer/components/TimelineSpace/SideMenu.vue
@@ -61,7 +61,12 @@
{{ $t('side_menu.direct') }}
-
+
{{ $t('side_menu.follow_requests') }}
diff --git a/src/renderer/components/molecules/User.vue b/src/renderer/components/molecules/User.vue
index 09e6733d..293323e4 100644
--- a/src/renderer/components/molecules/User.vue
+++ b/src/renderer/components/molecules/User.vue
@@ -1,34 +1,51 @@
-
-
-
-
-
-
-
+
+
+
-
- @{{ user.acct }}
+
+
+
+
+
@{{ user.acct }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-