diff --git a/CHANGELOG.md b/CHANGELOG.md index 0420db5b..f6ce05bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Display 'people voted' instead of 'votes' for multi-choice polls -- Changed the "Timelines" link in side panel to toggle show all timeline options inside the panel - Renamed "Timeline" to "Home Timeline" to be more clear - Optimized chat to not get horrible performance after keeping the same chat open for a long time - When opening emoji picker or react picker, it automatically focuses the search field diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index 37bcb409..81d49cc2 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -1,4 +1,4 @@ -import TimelineMenuContent from '../timeline_menu/timeline_menu_content.vue' +import { timelineNames } from '../timeline_menu/timeline_menu.js' import { mapState, mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' @@ -7,12 +7,10 @@ import { faGlobe, faBookmark, faEnvelope, - faChevronDown, - faChevronUp, + faHome, faComments, faBell, - faInfoCircle, - faStream + faInfoCircle } from '@fortawesome/free-solid-svg-icons' library.add( @@ -20,12 +18,10 @@ library.add( faGlobe, faBookmark, faEnvelope, - faChevronDown, - faChevronUp, + faHome, faComments, faBell, - faInfoCircle, - faStream + faInfoCircle ) const NavPanel = { @@ -34,20 +30,16 @@ const NavPanel = { this.$store.dispatch('startFetchingFollowRequests') } }, - components: { - TimelineMenuContent - }, - data () { - return { - showTimelines: false - } - }, - methods: { - toggleTimelines () { - this.showTimelines = !this.showTimelines - } - }, 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, followRequestCount: state => state.api.followRequests.length, diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index 7ae7b1d6..0c83d0fe 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -3,33 +3,19 @@