aboutsummaryrefslogtreecommitdiff
path: root/src/components/nav_panel/nav_panel.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/nav_panel/nav_panel.js')
-rw-r--r--src/components/nav_panel/nav_panel.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js
index b142ffe0..623dfaec 100644
--- a/src/components/nav_panel/nav_panel.js
+++ b/src/components/nav_panel/nav_panel.js
@@ -1,3 +1,4 @@
+import { timelineNames } from '../timeline_menu/timeline_menu.js'
import { mapState, mapGetters } from 'vuex'
const NavPanel = {
@@ -7,9 +8,17 @@ const NavPanel = {
}
},
computed: {
+ onTimelineRoute () {
+ return !!timelineNames()[this.$route.name]
+ },
+ timelinesRoute () {
+ if (this.$store.state.interface.lastTimeline) {
+ return this.$store.state.interface.lastTimeline
+ }
+ return this.currentUser ? 'friends' : 'public-timeline'
+ },
...mapState({
currentUser: state => state.users.currentUser,
- chat: state => state.chat.channel,
followRequestCount: state => state.api.followRequests.length,
privateMode: state => state.instance.private,
federating: state => state.instance.federating,