From: Chocobozzz Date: Fri, 6 May 2022 12:56:34 +0000 (+0200) Subject: Add help to understand what is a view X-Git-Tag: v4.2.0-rc.1~64 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=822f50fa814e945d136b8bb5a7e14e3c84889d42;p=github%2FChocobozzz%2FPeerTube.git Add help to understand what is a view --- diff --git a/client/src/app/+stats/video/video-stats.component.html b/client/src/app/+stats/video/video-stats.component.html index e5412f1b8..2cd47bb26 100644 --- a/client/src/app/+stats/video/video-stats.component.html +++ b/client/src/app/+stats/video/video-stats.component.html @@ -4,7 +4,13 @@
-
{{ card.label }}
+
+ {{ card.label }} + + + {{ card.help }} + +
{{ card.value }}
{{ card.moreInfo }}
diff --git a/client/src/app/+stats/video/video-stats.component.ts b/client/src/app/+stats/video/video-stats.component.ts index f433259ef..b6b71d463 100644 --- a/client/src/app/+stats/video/video-stats.component.ts +++ b/client/src/app/+stats/video/video-stats.component.ts @@ -30,7 +30,7 @@ type ChartBuilderResult = { displayLegend: boolean } -type Card = { label: string, value: string | number, moreInfo?: string } +type Card = { label: string, value: string | number, moreInfo?: string, help?: string } @Component({ templateUrl: './video-stats.component.html', @@ -252,7 +252,8 @@ export class VideoStatsComponent implements OnInit { this.globalStatsCards = [ { label: $localize`Views`, - value: this.numberFormatter.transform(this.video.views) + value: this.numberFormatter.transform(this.video.views), + help: $localize`A view means that someone watched the video for at least 30 seconds` }, { label: $localize`Likes`,