Merge branch 'fix/tag-timeline-title' into 'develop'
Fix #928 show tag name in title for tag timelines Closes #928 See merge request pleroma/pleroma-fe!1212
This commit is contained in:
commit
54b7e986a7
@ -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()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
slot="trigger"
|
||||
class="title timeline-menu-title"
|
||||
>
|
||||
<span>{{ $t(timelineNames[$route.name]) }}</span>
|
||||
<span>{{ timelineName() }}</span>
|
||||
<i class="icon-down-open" />
|
||||
</div>
|
||||
</Popover>
|
||||
|
Loading…
Reference in New Issue
Block a user