From 7115ad45fce805ac1f12f0d60bc327bd911d01d2 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Fri, 1 Jun 2018 13:28:35 +0900
Subject: [PATCH] refs #355 Fix side menu highlight when tag page
---
.../components/TimelineSpace/Contents/Hashtag.vue | 2 +-
.../components/TimelineSpace/Contents/Hashtag/Tag.vue | 3 ++-
src/renderer/components/TimelineSpace/SideMenu.vue | 8 ++++++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/renderer/components/TimelineSpace/Contents/Hashtag.vue b/src/renderer/components/TimelineSpace/Contents/Hashtag.vue
index 0cc9155f..a280dc4c 100644
--- a/src/renderer/components/TimelineSpace/Contents/Hashtag.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Hashtag.vue
@@ -42,7 +42,7 @@ export default {
return this.$route.name === 'tag'
},
back () {
- this.$router.push({ name: 'hashtag-list' })
+ this.$router.push({ path: `/${this.id()}/hashtag` })
}
}
}
diff --git a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue
index 25023984..887b0a55 100644
--- a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue
@@ -51,7 +51,6 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
})
this.reset()
- this.$store.commit('TimelineSpace/SideMenu/updateOverrideActivePath', `${this.$route.params.id}/hashtag`)
this.load(this.$route.params.tag)
.then(() => {
loading.close()
@@ -67,6 +66,8 @@ export default {
},
methods: {
async load (tag) {
+ this.$store.commit('TimelineSpace/SideMenu/updateOverrideActivePath', `/${this.$route.params.id}/hashtag`)
+
await this.$store.dispatch('TimelineSpace/Contents/Hashtag/Tag/fetch', tag)
.catch(() => {
this.$message({
diff --git a/src/renderer/components/TimelineSpace/SideMenu.vue b/src/renderer/components/TimelineSpace/SideMenu.vue
index 61113029..5962ab30 100644
--- a/src/renderer/components/TimelineSpace/SideMenu.vue
+++ b/src/renderer/components/TimelineSpace/SideMenu.vue
@@ -16,7 +16,7 @@