Handle videos with Ratings Disabled.

Closes #555
This commit is contained in:
FireMaskterK 2021-10-23 22:20:26 +01:00
parent bec284ea95
commit d28945f5be
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
2 changed files with 17 additions and 9 deletions

View File

@ -29,14 +29,21 @@
<div class="uk-margin-small-right">{{ addCommas(video.views) }} views</div> <div class="uk-margin-small-right">{{ addCommas(video.views) }} views</div>
<div class="uk-margin-small-right">{{ uploadDate }}</div> <div class="uk-margin-small-right">{{ uploadDate }}</div>
<div class="uk-flex-1"></div> <div class="uk-flex-1"></div>
<div class="uk-margin-small-left"> <template v-if="video.likes >= 0 && video.dislikes >= 0">
<font-awesome-icon class="uk-margin-small-right" icon="thumbs-up"></font-awesome-icon> <div class="uk-margin-small-left">
<b>{{ addCommas(video.likes) }}</b> <font-awesome-icon class="uk-margin-small-right" icon="thumbs-up"></font-awesome-icon>
</div> <b>{{ addCommas(video.likes) }}</b>
<div class="uk-margin-small-left"> </div>
<font-awesome-icon class="uk-margin-small-right" icon="thumbs-down"></font-awesome-icon> <div class="uk-margin-small-left">
<b>{{ addCommas(video.dislikes) }}</b> <font-awesome-icon class="uk-margin-small-right" icon="thumbs-down"></font-awesome-icon>
</div> <b>{{ addCommas(video.dislikes) }}</b>
</div>
</template>
<template v-if="video.likes < 0 && video.dislikes < 0">
<div class="uk-margin-small-left">
<b v-t="'video.ratings_disabled'" />
</div>
</template>
<a <a
:href="'https://youtu.be/' + getVideoId()" :href="'https://youtu.be/' + getVideoId()"
class="uk-margin-small-left uk-button uk-button-small" class="uk-margin-small-left uk-button uk-button-small"

View File

@ -83,7 +83,8 @@
"videos": "Videos", "videos": "Videos",
"views": "views", "views": "views",
"watched": "Watched", "watched": "Watched",
"sponsor_segments": "Sponsors Segments" "sponsor_segments": "Sponsors Segments",
"ratings_disabled": "Ratings Disabled"
}, },
"search": { "search": {
"did_you_mean": "Did you mean: " "did_you_mean": "Did you mean: "