diff options
| -rw-r--r-- | src/App.vue | 8 | ||||
| -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 | ||||
| -rw-r--r-- | src/i18n/en.json | 1 |
5 files changed, 34 insertions, 12 deletions
diff --git a/src/App.vue b/src/App.vue index 2effc983..55cac52c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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> 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) { diff --git a/src/i18n/en.json b/src/i18n/en.json index f445bfc2..f9262f08 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -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", |
