From c758d103bdb0cb0ac2945722c0666d309cd19a75 Mon Sep 17 00:00:00 2001 From: Xiaofeng An Date: Tue, 5 Feb 2019 13:47:27 -0500 Subject: [PATCH] fix #308 - show login hint above timeline when user is not logged in --- .../public_timeline/public_timeline.js | 3 ++- .../public_timeline/public_timeline.vue | 25 ++++++++++++++++++- src/i18n/en.json | 3 ++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/public_timeline/public_timeline.js b/src/components/public_timeline/public_timeline.js index 9b866be8..e54e49fa 100644 --- a/src/components/public_timeline/public_timeline.js +++ b/src/components/public_timeline/public_timeline.js @@ -4,7 +4,8 @@ const PublicTimeline = { Timeline }, computed: { - timeline () { return this.$store.state.statuses.timelines.public } + timeline () { return this.$store.state.statuses.timelines.public }, + currentUser () { return this.$store.state.users.currentUser } }, created () { this.$store.dispatch('startFetching', 'public') diff --git a/src/components/public_timeline/public_timeline.vue b/src/components/public_timeline/public_timeline.vue index 85d42cca..6fbebd9e 100644 --- a/src/components/public_timeline/public_timeline.vue +++ b/src/components/public_timeline/public_timeline.vue @@ -1,5 +1,28 @@ + + diff --git a/src/i18n/en.json b/src/i18n/en.json index f80d8ba2..51c3026b 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -28,7 +28,8 @@ "password": "Password", "placeholder": "e.g. lain", "register": "Register", - "username": "Username" + "username": "Username", + "hint": "Log in to join discussion" }, "nav": { "about": "About",