Hides video description when it is empty (#1585)

Co-authored-by: Preston <freetubeapp@protonmail.com>
This commit is contained in:
Jason 2021-08-20 19:51:46 +00:00 committed by GitHub
parent 329a673cd8
commit 7add3e4b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import FtCard from '../ft-card/ft-card.vue' import FtCard from '../ft-card/ft-card.vue'
import FtTimestampCatcher from '../ft-timestamp-catcher/ft-timestamp-catcher.vue' import FtTimestampCatcher from '../ft-timestamp-catcher/ft-timestamp-catcher.vue'
import autolinker from 'autolinker' import autolinker from 'autolinker'
import $ from 'jquery'
export default Vue.extend({ export default Vue.extend({
name: 'WatchVideoDescription', name: 'WatchVideoDescription',
@ -34,6 +35,10 @@ export default Vue.extend({
} else { } else {
this.shownDescription = autolinker.link(this.description) this.shownDescription = autolinker.link(this.description)
} }
if (/^\s*$/.test(this.shownDescription)) {
$('.videoDescription')[0].style.display = 'none'
}
}, },
methods: { methods: {
onTimestamp: function(timestamp) { onTimestamp: function(timestamp) {