forked from AkkomaGang/akkoma-fe
Add some more routes to side drawer
This commit is contained in:
parent
67263cde05
commit
4836c8ac74
5 changed files with 34 additions and 12 deletions
|
@ -24,7 +24,13 @@
|
|||
|
||||
|
||||
<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.notifications)">notifs</button>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const SideDrawer = {
|
||||
props: [ 'activatePanel', 'closed', 'clickoutside' ],
|
||||
props: [ 'activatePanel', 'closed', 'clickoutside', 'logout' ],
|
||||
computed: {
|
||||
currentUser () {
|
||||
return this.$store.state.users.currentUser
|
||||
|
@ -14,6 +14,10 @@ const SideDrawer = {
|
|||
if (typeof this.clickoutside === 'function') {
|
||||
this.clickoutside()
|
||||
}
|
||||
},
|
||||
doLogout () {
|
||||
this.logout()
|
||||
this.gotoPanel('timeline')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,21 +3,25 @@
|
|||
<div class="panel panel-default side-drawer" :class="{'side-drawer-closed': closed}">
|
||||
<ul>
|
||||
<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 v-if='currentUser'>
|
||||
<a href="#" @click="gotoPanel('notifications')">notifications</a>
|
||||
<a href="#" @click="gotoPanel('notifications')">
|
||||
{{ $t("notifications.notifications") }}
|
||||
</a>
|
||||
</li>
|
||||
<li v-if='currentUser'>
|
||||
<router-link @click.native="gotoPanel('timeline')" to='/main/friends'>
|
||||
{{ $t("nav.timeline") }}
|
||||
</router-link>
|
||||
</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'>
|
||||
<router-link @click.native="gotoPanel('timeline')" :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
|
||||
{{ $t("nav.dms") }}
|
||||
|
@ -38,6 +42,16 @@
|
|||
{{ $t("nav.twkn") }}
|
||||
</router-link>
|
||||
</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>
|
||||
</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 {
|
||||
font-weight: bolder;
|
||||
background-color: $fallback--lightBg;
|
||||
background-color: var(--lightBg, $fallback--lightBg);
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
|
|
|
@ -4,7 +4,6 @@ import Timeline from '../timeline/timeline.vue'
|
|||
|
||||
const UserProfile = {
|
||||
created () {
|
||||
debugger
|
||||
this.$store.commit('clearTimeline', { timeline: 'user' })
|
||||
this.$store.dispatch('startFetching', ['user', this.fetchBy])
|
||||
if (!this.user) {
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
"repeated_you": "repeated your 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_link": "locked",
|
||||
"attachments_sensitive": "Mark attachments as sensitive",
|
||||
|
|
Loading…
Reference in a new issue