From c758d103bdb0cb0ac2945722c0666d309cd19a75 Mon Sep 17 00:00:00 2001
From: Xiaofeng An <futureweb2020@yandex.com>
Date: Tue, 5 Feb 2019 13:47:27 -0500
Subject: fix #308 - show login hint above timeline when user is not logged in

---
 src/components/public_timeline/public_timeline.vue | 25 +++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

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

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 @@
 <template>
-  <Timeline :title="$t('nav.public_tl')" v-bind:timeline="timeline" v-bind:timeline-name="'public'"/>
+  <div>
+    <div v-if="!currentUser" class="login-hint panel panel-default">
+      <div class="panel-body">
+        <router-link :to="{ name: 'login' }">
+          {{ $t("login.hint") }}
+        </router-link>
+      </div>
+    </div>
+    <Timeline :title="$t('nav.public_tl')" v-bind:timeline="timeline" v-bind:timeline-name="'public'"/>
+  </div>
 </template>
 
 <script src="./public_timeline.js"></script>
+
+<style lang="scss">
+@import '../../_variables.scss';
+
+.login-hint {
+  text-align: center;
+
+  a {
+    display: inline-block;
+    padding: 1em 0px;
+    width: 100%;
+  }
+}
+</style>
-- 
cgit v1.2.3-70-g09d2

