Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
822f50fa
Verified
Commit
822f50fa
authored
May 06, 2022
by
Chocobozzz
Browse files
Add help to understand what is a view
parent
67ad83d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/src/app/+stats/video/video-stats.component.html
View file @
822f50fa
...
...
@@ -4,7 +4,13 @@
<div
class=
"stats-embed"
>
<div
class=
"global-stats"
>
<div
*ngFor=
"let card of globalStatsCards"
class=
"card stats-card"
>
<div
class=
"label"
>
{{ card.label }}
</div>
<div
class=
"label"
>
{{ card.label }}
<my-help
*ngIf=
"card.help"
>
<ng-template
ptTemplate=
"customHtml"
>
{{ card.help }}
</ng-template>
</my-help>
</div>
<div
class=
"value"
>
{{ card.value }}
</div>
<div
*ngIf=
"card.moreInfo"
class=
"more-info"
>
{{ card.moreInfo }}
</div>
</div>
...
...
client/src/app/+stats/video/video-stats.component.ts
View file @
822f50fa
...
...
@@ -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`
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment