Changed title of Watch view to title of the video (#739)

* Changed title of Watch view to title of the video

* Called updateTitle in a more appropriate location

* Removed redundandt router portion
This commit is contained in:
TDDR 2020-10-31 10:36:35 -04:00 committed by GitHub
parent d7fe2dcfbd
commit e7ce45b524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -413,6 +413,7 @@ export default Vue.extend({
} }
this.isLoading = false this.isLoading = false
this.updateTitle()
}) })
.catch(err => { .catch(err => {
const errorMessage = this.$t('Local API Error (Click to copy)') const errorMessage = this.$t('Local API Error (Click to copy)')
@ -578,6 +579,7 @@ export default Vue.extend({
} }
this.isLoading = false this.isLoading = false
this.updateTitle()
}) })
.catch(err => { .catch(err => {
const errorMessage = this.$t('Invidious API Error (Click to copy)') const errorMessage = this.$t('Invidious API Error (Click to copy)')
@ -988,6 +990,10 @@ export default Vue.extend({
return Math.floor(this.getWatchedProgress()) return Math.floor(this.getWatchedProgress())
}, },
updateTitle: function () {
document.title = `${this.videoTitle} - FreeTube`
},
...mapActions([ ...mapActions([
'showToast', 'showToast',
'buildVTTFileLocally', 'buildVTTFileLocally',