diff options
| author | lain <lain@soykaf.club> | 2020-08-06 10:17:44 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-08-06 10:17:44 +0000 |
| commit | 3e6e6096bfd1dad3283396c086e45b09523faaee (patch) | |
| tree | dc322fff1bd377b920669287fbdd5653ba9bfede /src/components/nav_panel/nav_panel.js | |
| parent | 9a10ad38260cc4d1ef93a6988ef2cb0941080156 (diff) | |
| parent | e57562959f5e71fd6e3bf180e2856d504ffb1fcf (diff) | |
Merge branch 'feat/separate-timeline-navigation-from-navpanel' into 'develop'
Separate timeline navigation from navpanel
See merge request pleroma/pleroma-fe!1172
Diffstat (limited to 'src/components/nav_panel/nav_panel.js')
| -rw-r--r-- | src/components/nav_panel/nav_panel.js | 11 |
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, |
