mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-11 20:19:28 +01:00
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
|
||||
},
|
||||
|
||||
hideViews: function () {
|
||||
return this.$store.getters.getHideVideoViews
|
||||
},
|
||||
|
||||
shareHeaders: function () {
|
||||
return [
|
||||
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
|
||||
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') {
|
||||
|
@ -12,7 +12,7 @@
|
||||
{{ title }}
|
||||
</h2>
|
||||
<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'">
|
||||
{{ $t("Playlist.Last Updated On") }}
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user