Add some more routes to side drawer
This commit is contained in:
parent
67263cde05
commit
4836c8ac74
|
@ -24,7 +24,13 @@
|
||||||
|
|
||||||
|
|
||||||
<div v-if="" class="container" id="content">
|
<div v-if="" class="container" id="content">
|
||||||
<side-drawer :activatePanel="activatePanel" :closed="!showMobileSidebar" :clickoutside="toggleMobileSidebar"></side-drawer>
|
<side-drawer
|
||||||
|
:activatePanel="activatePanel"
|
||||||
|
:closed="!showMobileSidebar"
|
||||||
|
:clickoutside="toggleMobileSidebar"
|
||||||
|
:logout="logout"
|
||||||
|
>
|
||||||
|
</side-drawer>
|
||||||
<!--
|
<!--
|
||||||
<button @click="activatePanel(mobileViews.postStatus)">post status</button>
|
<button @click="activatePanel(mobileViews.postStatus)">post status</button>
|
||||||
<button @click="activatePanel(mobileViews.notifications)">notifs</button>
|
<button @click="activatePanel(mobileViews.notifications)">notifs</button>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const SideDrawer = {
|
const SideDrawer = {
|
||||||
props: [ 'activatePanel', 'closed', 'clickoutside' ],
|
props: [ 'activatePanel', 'closed', 'clickoutside', 'logout' ],
|
||||||
computed: {
|
computed: {
|
||||||
currentUser () {
|
currentUser () {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
|
@ -14,6 +14,10 @@ const SideDrawer = {
|
||||||
if (typeof this.clickoutside === 'function') {
|
if (typeof this.clickoutside === 'function') {
|
||||||
this.clickoutside()
|
this.clickoutside()
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
doLogout () {
|
||||||
|
this.logout()
|
||||||
|
this.gotoPanel('timeline')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,21 +3,25 @@
|
||||||
<div class="panel panel-default side-drawer" :class="{'side-drawer-closed': closed}">
|
<div class="panel panel-default side-drawer" :class="{'side-drawer-closed': closed}">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-if='currentUser'>
|
<li v-if='currentUser'>
|
||||||
<a href="#" @click="gotoPanel('poststatus')">poststatus</a>
|
<a href="#" @click="gotoPanel('poststatus')">
|
||||||
|
{{ $t("post_status.new_status") }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li v-else>
|
||||||
|
<a href="#" @click="gotoPanel('poststatus')">
|
||||||
|
{{ $t("login.login") }}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if='currentUser'>
|
<li v-if='currentUser'>
|
||||||
<a href="#" @click="gotoPanel('notifications')">notifications</a>
|
<a href="#" @click="gotoPanel('notifications')">
|
||||||
|
{{ $t("notifications.notifications") }}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if='currentUser'>
|
<li v-if='currentUser'>
|
||||||
<router-link @click.native="gotoPanel('timeline')" to='/main/friends'>
|
<router-link @click.native="gotoPanel('timeline')" to='/main/friends'>
|
||||||
{{ $t("nav.timeline") }}
|
{{ $t("nav.timeline") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li v-if='currentUser'>
|
|
||||||
<router-link @click.native="gotoPanel('timeline')" :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
|
|
||||||
{{ $t("nav.mentions") }}
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
<li v-if='currentUser'>
|
<li v-if='currentUser'>
|
||||||
<router-link @click.native="gotoPanel('timeline')" :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
|
<router-link @click.native="gotoPanel('timeline')" :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
|
||||||
{{ $t("nav.dms") }}
|
{{ $t("nav.dms") }}
|
||||||
|
@ -38,6 +42,16 @@
|
||||||
{{ $t("nav.twkn") }}
|
{{ $t("nav.twkn") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<router-link @click.native="gotoPanel('timeline')" :to="{ name: 'settings'}">
|
||||||
|
{{ $t("settings.settings") }}
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
<li v-if="currentUser">
|
||||||
|
<a @click="doLogout" href="#">
|
||||||
|
{{ $t("login.logout") }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="side-drawer-click-outside" @click.stop.prevent="clickedOutside" :class="{'side-drawer-click-outside-closed': closed}"></div>
|
<div class="side-drawer-click-outside" @click.stop.prevent="clickedOutside" :class="{'side-drawer-click-outside-closed': closed}"></div>
|
||||||
|
@ -139,8 +153,6 @@
|
||||||
|
|
||||||
&.router-link-active {
|
&.router-link-active {
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
background-color: $fallback--lightBg;
|
|
||||||
background-color: var(--lightBg, $fallback--lightBg);
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import Timeline from '../timeline/timeline.vue'
|
||||||
|
|
||||||
const UserProfile = {
|
const UserProfile = {
|
||||||
created () {
|
created () {
|
||||||
debugger
|
|
||||||
this.$store.commit('clearTimeline', { timeline: 'user' })
|
this.$store.commit('clearTimeline', { timeline: 'user' })
|
||||||
this.$store.dispatch('startFetching', ['user', this.fetchBy])
|
this.$store.dispatch('startFetching', ['user', this.fetchBy])
|
||||||
if (!this.user) {
|
if (!this.user) {
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
"repeated_you": "repeated your status"
|
"repeated_you": "repeated your status"
|
||||||
},
|
},
|
||||||
"post_status": {
|
"post_status": {
|
||||||
|
"new_status": "Post new status",
|
||||||
"account_not_locked_warning": "Your account is not {0}. Anyone can follow you to view your follower-only posts.",
|
"account_not_locked_warning": "Your account is not {0}. Anyone can follow you to view your follower-only posts.",
|
||||||
"account_not_locked_warning_link": "locked",
|
"account_not_locked_warning_link": "locked",
|
||||||
"attachments_sensitive": "Mark attachments as sensitive",
|
"attachments_sensitive": "Mark attachments as sensitive",
|
||||||
|
|
Loading…
Reference in New Issue