mirror of https://github.com/FreeTubeApp/FreeTube
Fix window title displaying null while loading a video or channel (#4913)
This commit is contained in:
parent
97926d8c82
commit
ae027f1c90
|
@ -78,14 +78,13 @@ export default defineComponent({
|
||||||
return this.$store.getters.getShowCreatePlaylistPrompt
|
return this.$store.getters.getShowCreatePlaylistPrompt
|
||||||
},
|
},
|
||||||
windowTitle: function () {
|
windowTitle: function () {
|
||||||
const routeName = this.$route.name
|
const routePath = this.$route.path
|
||||||
if (routeName !== 'channel' && routeName !== 'watch' && routeName !== 'hashtag') {
|
if (!routePath.startsWith('/channel/') && !routePath.startsWith('/watch/') && !routePath.startsWith('/hashtag/')) {
|
||||||
let title =
|
let title = translateWindowTitle(this.$route.meta.title, this.$i18n)
|
||||||
this.$route.meta.path === '/home'
|
|
||||||
? packageDetails.productName
|
|
||||||
: `${translateWindowTitle(this.$route.meta.title, this.$i18n)} - ${packageDetails.productName}`
|
|
||||||
if (!title) {
|
if (!title) {
|
||||||
title = packageDetails.productName
|
title = packageDetails.productName
|
||||||
|
} else {
|
||||||
|
title = `${title} - ${packageDetails.productName}`
|
||||||
}
|
}
|
||||||
return title
|
return title
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue