diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-24 01:12:30 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-03-31 10:29:24 +0200 |
commit | 747c562837e37f2fa455e8ef62165e9bb4e365f1 (patch) | |
tree | ae7628afb2865de93b195b064df1dace2e524dbe /client/src/app/+my-account | |
parent | 8165d00ac6263cf3c0d61d450960ef36635084ff (diff) | |
download | PeerTube-747c562837e37f2fa455e8ef62165e9bb4e365f1.tar.gz PeerTube-747c562837e37f2fa455e8ef62165e9bb4e365f1.tar.zst PeerTube-747c562837e37f2fa455e8ef62165e9bb4e365f1.zip |
Put channel stats behind withStats flag
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r-- | client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts index eeab3a8dd..27a157621 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts | |||
@@ -57,7 +57,7 @@ export class MyAccountVideoChannelsComponent implements OnInit { | |||
57 | min: Math.max(0, this.videoChannelsMinimumDailyViews - (3 * this.videoChannelsMaximumDailyViews / 100)), | 57 | min: Math.max(0, this.videoChannelsMinimumDailyViews - (3 * this.videoChannelsMaximumDailyViews / 100)), |
58 | max: this.videoChannelsMaximumDailyViews | 58 | max: this.videoChannelsMaximumDailyViews |
59 | } | 59 | } |
60 | }], | 60 | }] |
61 | }, | 61 | }, |
62 | layout: { | 62 | layout: { |
63 | padding: { | 63 | padding: { |
@@ -68,7 +68,7 @@ export class MyAccountVideoChannelsComponent implements OnInit { | |||
68 | } | 68 | } |
69 | }, | 69 | }, |
70 | elements: { | 70 | elements: { |
71 | point:{ | 71 | point: { |
72 | radius: 0 | 72 | radius: 0 |
73 | } | 73 | } |
74 | }, | 74 | }, |
@@ -76,14 +76,12 @@ export class MyAccountVideoChannelsComponent implements OnInit { | |||
76 | mode: 'index', | 76 | mode: 'index', |
77 | intersect: false, | 77 | intersect: false, |
78 | custom: function (tooltip: any) { | 78 | custom: function (tooltip: any) { |
79 | if (!tooltip) return; | 79 | if (!tooltip) return |
80 | // disable displaying the color box; | 80 | // disable displaying the color box |
81 | tooltip.displayColors = false; | 81 | tooltip.displayColors = false |
82 | }, | 82 | }, |
83 | callbacks: { | 83 | callbacks: { |
84 | label: function (tooltip: any, data: any) { | 84 | label: (tooltip: any, data: any) => `${tooltip.value} views` |
85 | return `${tooltip.value} views`; | ||
86 | } | ||
87 | } | 85 | } |
88 | }, | 86 | }, |
89 | hover: { | 87 | hover: { |
@@ -124,7 +122,7 @@ export class MyAccountVideoChannelsComponent implements OnInit { | |||
124 | 122 | ||
125 | private loadVideoChannels () { | 123 | private loadVideoChannels () { |
126 | this.authService.userInformationLoaded | 124 | this.authService.userInformationLoaded |
127 | .pipe(flatMap(() => this.videoChannelService.listAccountVideoChannels(this.user.account))) | 125 | .pipe(flatMap(() => this.videoChannelService.listAccountVideoChannels(this.user.account, null, true))) |
128 | .subscribe(res => { | 126 | .subscribe(res => { |
129 | this.videoChannels = res.data | 127 | this.videoChannels = res.data |
130 | this.videoChannelsData = this.videoChannels.map(v => ({ | 128 | this.videoChannelsData = this.videoChannels.map(v => ({ |