1
0
mirror of https://git.pleroma.social/sjw/pleroma-fe.git synced 2024-12-24 00:05:16 +01:00

Merge branch 'fix/switch-to-timeline-on-mobile' into 'develop'

Switch to timeline view on mobile when clicking relevant actions

See merge request pleroma/pleroma-fe!383
This commit is contained in:
lambda 2018-11-30 19:49:09 +00:00
commit 7d12a65b3b
3 changed files with 9 additions and 8 deletions

View File

@ -11,7 +11,7 @@
</div>
<div class='item right'>
<user-finder class="nav-icon"></user-finder>
<router-link :to="{ name: 'settings'}"><i class="icon-cog nav-icon"></i></router-link>
<router-link @click.native="activatePanel('timeline')" :to="{ name: 'settings'}"><i class="icon-cog nav-icon"></i></router-link>
<a href="#" v-if="currentUser" @click.prevent="logout"><i class="icon-logout nav-icon" :title="$t('login.logout')"></i></a>
</div>
</div>
@ -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>