Switch to timeline on nav panel actions

This commit is contained in:
eal 2018-11-25 19:00:24 +02:00
parent 3263aa323c
commit 668087a29e
3 changed files with 8 additions and 7 deletions

View file

@ -26,7 +26,7 @@
<div class="sidebar-scroller">
<div class="sidebar">
<user-panel></user-panel>
<nav-panel></nav-panel>
<nav-panel :activatePanel="activatePanel"></nav-panel>
<instance-specific-panel v-if="showInstanceSpecificPanel"></instance-specific-panel>
<features-panel v-if="!currentUser"></features-panel>
<who-to-follow-panel v-if="currentUser && suggestionsEnabled"></who-to-follow-panel>

View file

@ -1,4 +1,5 @@
const NavPanel = {
props: [ 'activatePanel' ],
computed: {
currentUser () {
return this.$store.state.users.currentUser

View file

@ -3,32 +3,32 @@
<div class="panel panel-default">
<ul>
<li v-if='currentUser'>
<router-link to='/main/friends'>
<router-link @click.native="activatePanel('timeline')" to='/main/friends'>
{{ $t("nav.timeline") }}
</router-link>
</li>
<li v-if='currentUser'>
<router-link :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
<router-link @click.native="activatePanel('timeline')" :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
{{ $t("nav.mentions") }}
</router-link>
</li>
<li v-if='currentUser'>
<router-link :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
<router-link @click.native="activatePanel('timeline')" :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
{{ $t("nav.dms") }}
</router-link>
</li>
<li v-if='currentUser && currentUser.locked'>
<router-link to='/friend-requests'>
<router-link @click.native="activatePanel('timeline')" to='/friend-requests'>
{{ $t("nav.friend_requests") }}
</router-link>
</li>
<li>
<router-link to='/main/public'>
<router-link @click.native="activatePanel('timeline')" to='/main/public'>
{{ $t("nav.public_tl") }}
</router-link>
</li>
<li>
<router-link to='/main/all'>
<router-link @click.native="activatePanel('timeline')" to='/main/all'>
{{ $t("nav.twkn") }}
</router-link>
</li>