From 5eced8bf09ddd169ba174ece4b790d916cea32d9 Mon Sep 17 00:00:00 2001
From: eal <eal@waifu.club>
Date: Tue, 4 Dec 2018 18:24:31 +0200
Subject: [PATCH] Switch to "timeline" when pressing user-settings

---
 src/App.vue                                            | 2 +-
 src/components/user_card_content/user_card_content.js  | 2 +-
 src/components/user_card_content/user_card_content.vue | 2 +-
 src/components/user_panel/user_panel.js                | 1 +
 src/components/user_panel/user_panel.vue               | 2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 2f7dc4fe5..9d66b9d4b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -25,7 +25,7 @@
         <div class="sidebar-bounds">
           <div class="sidebar-scroller">
             <div class="sidebar">
-              <user-panel></user-panel>
+              <user-panel :activatePanel="activatePanel"></user-panel>
               <nav-panel :activatePanel="activatePanel"></nav-panel>
               <instance-specific-panel v-if="showInstanceSpecificPanel"></instance-specific-panel>
               <features-panel v-if="!currentUser"></features-panel>
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 9de27a9ec..d22d4ec18 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -2,7 +2,7 @@ import StillImage from '../still-image/still-image.vue'
 import { hex2rgb } from '../../services/color_convert/color_convert.js'
 
 export default {
-  props: [ 'user', 'switcher', 'selected', 'hideBio' ],
+  props: [ 'user', 'switcher', 'selected', 'hideBio', 'activatePanel' ],
   data () {
     return {
       hideUserStatsLocal: typeof this.$store.state.config.hideUserStats === 'undefined'
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index d2fd7591b..4b8a730f1 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -2,7 +2,7 @@
 <div id="heading" class="profile-panel-background" :style="headingStyle">
   <div class="panel-heading text-center">
     <div class='user-info'>
-      <router-link to='/user-settings' style="float: right; margin-top:16px;" v-if="!isOtherUser">
+      <router-link @click.native="activatePanel('timeline')" to='/user-settings' style="float: right; margin-top:16px;" v-if="!isOtherUser">
         <i class="icon-cog usersettings" :title="$t('tool_tip.user_settings')"></i>
       </router-link>
       <a :href="user.statusnet_profile_url" target="_blank" class="floater" v-if="isOtherUser">
diff --git a/src/components/user_panel/user_panel.js b/src/components/user_panel/user_panel.js
index 15804b884..eb7cb09c7 100644
--- a/src/components/user_panel/user_panel.js
+++ b/src/components/user_panel/user_panel.js
@@ -3,6 +3,7 @@ import PostStatusForm from '../post_status_form/post_status_form.vue'
 import UserCardContent from '../user_card_content/user_card_content.vue'
 
 const UserPanel = {
+  props: [ 'activatePanel' ],
   computed: {
     user () { return this.$store.state.users.currentUser }
   },
diff --git a/src/components/user_panel/user_panel.vue b/src/components/user_panel/user_panel.vue
index 2d5cb500d..83eb099fd 100644
--- a/src/components/user_panel/user_panel.vue
+++ b/src/components/user_panel/user_panel.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="user-panel">
     <div v-if='user' class="panel panel-default" style="overflow: visible;">
-      <user-card-content :user="user" :switcher="false" :hideBio="true"></user-card-content>
+      <user-card-content :activatePanel="activatePanel" :user="user" :switcher="false" :hideBio="true"></user-card-content>
       <div class="panel-footer">
         <post-status-form v-if='user'></post-status-form>
       </div>
-- 
GitLab