aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-05 14:03:52 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-04-15 09:49:35 +0200
commit384ba8b77a8e4805c099f5ea12b41c2ca5776e26 (patch)
tree6b517033d9265d283677b85e0f57486e0e7fd8cf /client/src/app/+videos
parentb211106695bb82f6c32e53306081b5262c3d109d (diff)
downloadPeerTube-384ba8b77a8e4805c099f5ea12b41c2ca5776e26.tar.gz
PeerTube-384ba8b77a8e4805c099f5ea12b41c2ca5776e26.tar.zst
PeerTube-384ba8b77a8e4805c099f5ea12b41c2ca5776e26.zip
Support videos stats in client
Diffstat (limited to 'client/src/app/+videos')
-rw-r--r--client/src/app/+videos/+video-edit/video-add.component.scss31
-rw-r--r--client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts3
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts13
3 files changed, 8 insertions, 39 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add.component.scss b/client/src/app/+videos/+video-edit/video-add.component.scss
index 0f0cc406c..dda868789 100644
--- a/client/src/app/+videos/+video-edit/video-add.component.scss
+++ b/client/src/app/+videos/+video-edit/video-add.component.scss
@@ -1,5 +1,6 @@
1@use '_variables' as *; 1@use '_variables' as *;
2@use '_mixins' as *; 2@use '_mixins' as *;
3@use '_nav' as *;
3 4
4$border-width: 3px; 5$border-width: 3px;
5$border-type: solid; 6$border-type: solid;
@@ -51,39 +52,11 @@ $nav-link-height: 40px;
51} 52}
52 53
53::ng-deep .video-add-nav { 54::ng-deep .video-add-nav {
54 border-bottom: $border-width $border-type $border-color; 55 @include peertube-nav-tabs($border-width, $border-type, $border-color, $nav-link-height);
55 margin: 20px 0 0 !important;
56
57 &.hide-nav {
58 display: none !important;
59 }
60 56
61 a.nav-link { 57 a.nav-link {
62 @include disable-default-a-behaviour;
63
64 margin-bottom: -$border-width;
65 height: $nav-link-height !important;
66 padding: 0 30px !important;
67 font-size: 15px;
68
69 border: $border-width $border-type transparent;
70
71 span {
72 border-bottom: 2px solid transparent;
73 }
74
75 &.active { 58 &.active {
76 border-color: $border-color;
77 border-bottom-color: transparent;
78 background-color: pvar(--submenuBackgroundColor) !important; 59 background-color: pvar(--submenuBackgroundColor) !important;
79
80 span {
81 border-bottom-color: pvar(--mainColor);
82 }
83 }
84
85 &:hover:not(.active) {
86 border-color: transparent;
87 } 60 }
88 } 61 }
89} 62}
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
index af26ea04d..51718827d 100644
--- a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
@@ -41,7 +41,8 @@ export class ActionButtonsComponent implements OnInit, OnChanges {
41 report: true, 41 report: true,
42 duplicate: true, 42 duplicate: true,
43 mute: true, 43 mute: true,
44 liveInfo: true 44 liveInfo: true,
45 stats: true
45 } 46 }
46 47
47 userRating: UserVideoRateType 48 userRating: UserVideoRateType
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index f13c885f2..61b440859 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -553,9 +553,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
553 videoCaptions: VideoCaption[] 553 videoCaptions: VideoCaption[]
554 urlOptions: CustomizationOptions & { playerMode: PlayerMode } 554 urlOptions: CustomizationOptions & { playerMode: PlayerMode }
555 loggedInOrAnonymousUser: User 555 loggedInOrAnonymousUser: User
556 user?: AuthUser 556 user?: AuthUser // Keep for plugins
557 }) { 557 }) {
558 const { video, liveVideo, videoCaptions, urlOptions, loggedInOrAnonymousUser, user } = params 558 const { video, liveVideo, videoCaptions, urlOptions, loggedInOrAnonymousUser } = params
559 559
560 const getStartTime = () => { 560 const getStartTime = () => {
561 const byUrl = urlOptions.startTime !== undefined 561 const byUrl = urlOptions.startTime !== undefined
@@ -615,6 +615,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
615 videoViewUrl: video.privacy.id !== VideoPrivacy.PRIVATE 615 videoViewUrl: video.privacy.id !== VideoPrivacy.PRIVATE
616 ? this.videoService.getVideoViewUrl(video.uuid) 616 ? this.videoService.getVideoViewUrl(video.uuid)
617 : null, 617 : null,
618 authorizationHeader: this.authService.getRequestHeaderValue(),
619
618 embedUrl: video.embedUrl, 620 embedUrl: video.embedUrl,
619 embedTitle: video.name, 621 embedTitle: video.name,
620 622
@@ -623,13 +625,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
623 625
624 language: this.localeId, 626 language: this.localeId,
625 627
626 userWatching: user && user.videosHistoryEnabled === true
627 ? {
628 url: this.videoService.getUserWatchingVideoUrl(video.uuid),
629 authorizationHeader: this.authService.getRequestHeaderValue()
630 }
631 : undefined,
632
633 serverUrl: environment.apiUrl, 628 serverUrl: environment.apiUrl,
634 629
635 videoCaptions: playerCaptions, 630 videoCaptions: playerCaptions,