aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-06 14:56:34 +0200
committerChocobozzz <me@florianbigard.com>2022-05-06 14:56:34 +0200
commit822f50fa814e945d136b8bb5a7e14e3c84889d42 (patch)
tree50fd982232c1b38461c6c08d63885ea6364e9410 /client
parent67ad83d0faa5924a566bc8260918439614694c85 (diff)
downloadPeerTube-822f50fa814e945d136b8bb5a7e14e3c84889d42.tar.gz
PeerTube-822f50fa814e945d136b8bb5a7e14e3c84889d42.tar.zst
PeerTube-822f50fa814e945d136b8bb5a7e14e3c84889d42.zip
Add help to understand what is a view
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+stats/video/video-stats.component.html8
-rw-r--r--client/src/app/+stats/video/video-stats.component.ts5
2 files changed, 10 insertions, 3 deletions
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 @@
4 <div class="stats-embed"> 4 <div class="stats-embed">
5 <div class="global-stats"> 5 <div class="global-stats">
6 <div *ngFor="let card of globalStatsCards" class="card stats-card"> 6 <div *ngFor="let card of globalStatsCards" class="card stats-card">
7 <div class="label">{{ card.label }}</div> 7 <div class="label">
8 {{ card.label }}
9
10 <my-help *ngIf="card.help">
11 <ng-template ptTemplate="customHtml">{{ card.help }}</ng-template>
12 </my-help>
13 </div>
8 <div class="value">{{ card.value }}</div> 14 <div class="value">{{ card.value }}</div>
9 <div *ngIf="card.moreInfo" class="more-info">{{ card.moreInfo }}</div> 15 <div *ngIf="card.moreInfo" class="more-info">{{ card.moreInfo }}</div>
10 </div> 16 </div>
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 = {
30 displayLegend: boolean 30 displayLegend: boolean
31} 31}
32 32
33type Card = { label: string, value: string | number, moreInfo?: string } 33type Card = { label: string, value: string | number, moreInfo?: string, help?: string }
34 34
35@Component({ 35@Component({
36 templateUrl: './video-stats.component.html', 36 templateUrl: './video-stats.component.html',
@@ -252,7 +252,8 @@ export class VideoStatsComponent implements OnInit {
252 this.globalStatsCards = [ 252 this.globalStatsCards = [
253 { 253 {
254 label: $localize`Views`, 254 label: $localize`Views`,
255 value: this.numberFormatter.transform(this.video.views) 255 value: this.numberFormatter.transform(this.video.views),
256 help: $localize`A view means that someone watched the video for at least 30 seconds`
256 }, 257 },
257 { 258 {
258 label: $localize`Likes`, 259 label: $localize`Likes`,