From 822f50fa814e945d136b8bb5a7e14e3c84889d42 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 6 May 2022 14:56:34 +0200 Subject: Add help to understand what is a view --- client/src/app/+stats/video/video-stats.component.html | 8 +++++++- client/src/app/+stats/video/video-stats.component.ts | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'client') 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`, -- cgit v1.2.3