aboutsummaryrefslogtreecommitdiff
path: root/src/components/timeline_menu/timeline_menu.js
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-08-19 13:06:46 +0300
committerShpuld Shpuldson <shp@cock.li>2020-08-19 13:06:46 +0300
commit54b619dfec7255cec44dd2d23add1bbc9062ffee (patch)
tree7b524f8828c3bc3b26cd717d13b6a93df0f2be35 /src/components/timeline_menu/timeline_menu.js
parent1a8840c7c3bb698f3984028db5c1b71025d9d6a1 (diff)
show tag name in title for tag timelines
Diffstat (limited to 'src/components/timeline_menu/timeline_menu.js')
-rw-r--r--src/components/timeline_menu/timeline_menu.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js
index c0d75c54..2be75b06 100644
--- a/src/components/timeline_menu/timeline_menu.js
+++ b/src/components/timeline_menu/timeline_menu.js
@@ -9,7 +9,8 @@ export const timelineNames = () => {
'bookmarks': 'nav.bookmarks',
'dms': 'nav.dms',
'public-timeline': 'nav.public_tl',
- 'public-external-timeline': 'nav.twkn'
+ 'public-external-timeline': 'nav.twkn',
+ 'tag-timeline': 'tag'
}
}
@@ -40,6 +41,14 @@ const TimelineMenu = {
setTimeout(() => {
this.isOpen = true
}, 25)
+ },
+ timelineName () {
+ const route = this.$route.name
+ if (route === 'tag-timeline') {
+ return '#' + this.$route.params.tag
+ }
+ const i18nkey = timelineNames()[this.$route.name]
+ return i18nkey ? this.$t(i18nkey) : route
}
},
computed: {
@@ -47,10 +56,7 @@ const TimelineMenu = {
currentUser: state => state.users.currentUser,
privateMode: state => state.instance.private,
federating: state => state.instance.federating
- }),
- timelineNames () {
- return timelineNames()
- }
+ })
}
}