Display list title

This commit is contained in:
Sol Fisher Romanoff 2022-06-16 10:42:45 +03:00
parent 92fac1cd9f
commit a982af771b
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62

View file

@ -26,7 +26,8 @@ const TimelineMenu = {
}, },
data () { data () {
return { return {
isOpen: false isOpen: false,
listTitle: null
} }
}, },
created () { created () {
@ -58,6 +59,11 @@ const TimelineMenu = {
if (route === 'tag-timeline') { if (route === 'tag-timeline') {
return '#' + this.$route.params.tag return '#' + this.$route.params.tag
} }
if (route === 'list-timeline') {
this.$store.state.api.backendInteractor.getList({ id: this.$route.params.id })
.then((data) => { this.listTitle = data.title })
return this.listTitle
}
const i18nkey = timelineNames()[this.$route.name] const i18nkey = timelineNames()[this.$route.name]
return i18nkey ? this.$t(i18nkey) : route return i18nkey ? this.$t(i18nkey) : route
} }