added logic to hide playlist views (#1916)
This commit is contained in:
parent
a6538727b6
commit
9196457495
|
@ -47,6 +47,10 @@ export default Vue.extend({
|
||||||
return this.$store.getters.getThumbnailPreference
|
return this.$store.getters.getThumbnailPreference
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideViews: function () {
|
||||||
|
return this.$store.getters.getHideVideoViews
|
||||||
|
},
|
||||||
|
|
||||||
shareHeaders: function () {
|
shareHeaders: function () {
|
||||||
return [
|
return [
|
||||||
this.$t('Playlist.Share Playlist.Copy YouTube Link'),
|
this.$t('Playlist.Share Playlist.Copy YouTube Link'),
|
||||||
|
@ -83,7 +87,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
// Causes errors if not put inside of a check
|
// Causes errors if not put inside of a check
|
||||||
if (typeof (this.data.viewCount) !== 'undefined') {
|
if (typeof (this.data.viewCount) !== 'undefined') {
|
||||||
this.viewCount = this.data.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
this.viewCount = this.hideViews ? null : this.data.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof (this.data.videoCount) !== 'undefined') {
|
if (typeof (this.data.videoCount) !== 'undefined') {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
{{ videoCount }} {{ $t("Playlist.Videos") }} - {{ viewCount }} {{ $t("Playlist.Views") }} -
|
{{ videoCount }} {{ $t("Playlist.Videos") }} - <span v-if="!hideViews">{{ viewCount }} {{ $t("Playlist.Views") }} -</span>
|
||||||
<span v-if="infoSource !== 'local'">
|
<span v-if="infoSource !== 'local'">
|
||||||
{{ $t("Playlist.Last Updated On") }}
|
{{ $t("Playlist.Last Updated On") }}
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue