From e7ce45b52417fd3deef6cb449f31db648bbae068 Mon Sep 17 00:00:00 2001 From: TDDR <59970326+TDDR@users.noreply.github.com> Date: Sat, 31 Oct 2020 10:36:35 -0400 Subject: [PATCH] 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 --- src/renderer/views/Watch/Watch.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 17128e61..0194938d 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -413,6 +413,7 @@ export default Vue.extend({ } this.isLoading = false + this.updateTitle() }) .catch(err => { const errorMessage = this.$t('Local API Error (Click to copy)') @@ -578,6 +579,7 @@ export default Vue.extend({ } this.isLoading = false + this.updateTitle() }) .catch(err => { const errorMessage = this.$t('Invidious API Error (Click to copy)') @@ -988,6 +990,10 @@ export default Vue.extend({ return Math.floor(this.getWatchedProgress()) }, + updateTitle: function () { + document.title = `${this.videoTitle} - FreeTube` + }, + ...mapActions([ 'showToast', 'buildVTTFileLocally',