diff options
| author | shpuld <shp@cock.li> | 2018-12-22 17:32:07 +0200 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2018-12-22 17:32:07 +0200 |
| commit | 4836c8ac74569668001f1adc39fe84377ddb7dba (patch) | |
| tree | ac00848b441b66925b2719295e789531ac7ae460 /src/components | |
| parent | 67263cde05cacd6bf2a8941cce4c562ef88977e4 (diff) | |
Add some more routes to side drawer
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/side_drawer/side_drawer.js | 6 | ||||
| -rw-r--r-- | src/components/side_drawer/side_drawer.vue | 30 | ||||
| -rw-r--r-- | src/components/user_profile/user_profile.js | 1 |
3 files changed, 26 insertions, 11 deletions
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js index b1b7701c..6541077b 100644 --- a/src/components/side_drawer/side_drawer.js +++ b/src/components/side_drawer/side_drawer.js @@ -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') } } } diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue index b5f399b5..1593ae65 100644 --- a/src/components/side_drawer/side_drawer.vue +++ b/src/components/side_drawer/side_drawer.vue @@ -3,10 +3,19 @@ <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'> @@ -14,11 +23,6 @@ </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") }} </router-link> @@ -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; diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index deee77dd..d8d0c532 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -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) { |
