privacy: VideoPrivacy
privacyLabel: string
account: Account
+ likesPercent: number
+ dislikesPercent: number
constructor (hash: VideoDetailsServerModel) {
super(hash)
this.files = hash.files
this.channel = hash.channel
this.account = hash.account
+
+ this.likesPercent = (this.likes / (this.likes + this.dislikes)) * 100
+ this.dislikesPercent = (this.dislikes / (this.likes + this.dislikes)) * 100
}
getAppropriateMagnetUri (actualDownloadSpeed = 0) {
</div>
</div>
- <div class="video-info-date-views">
- {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
+ <div class="video-info-date-views-bar">
+ <div class="video-info-date-views">
+ {{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
+ </div>
+
+ <div class="video-info-likes-dislikes-bar">
+ <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
+ </div>
</div>
<div class="video-info-channel">
}
}
- .video-info-date-views {
- font-size: 16px;
- margin-bottom: 10px;
+ .video-info-date-views-bar {
+ display: flex;
+
+ .video-info-date-views {
+ font-size: 16px;
+ margin-bottom: 10px;
+ flex-grow: 1;
+ }
+
+ .video-info-likes-dislikes-bar {
+ height: 5px;
+ width: 186px;
+ background-color: #E5E5E5;
+ margin-top: 25px;
+
+ .likes-bar {
+ height: 100%;
+ background-color: #39CC0B;
+ }
+ }
}
.video-info-channel {