]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts
Put channel stats behind withStats flag
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-video-channels / my-account-video-channels.component.ts
index eeab3a8dd60c9b84ebfac61674c1d0c784b83039..27a1576213cb853be9797a877ad6783f19a8355e 100644 (file)
@@ -57,7 +57,7 @@ export class MyAccountVideoChannelsComponent implements OnInit {
             min: Math.max(0, this.videoChannelsMinimumDailyViews - (3 * this.videoChannelsMaximumDailyViews / 100)),
             max: this.videoChannelsMaximumDailyViews
           }
-        }],
+        }]
       },
       layout: {
         padding: {
@@ -68,7 +68,7 @@ export class MyAccountVideoChannelsComponent implements OnInit {
         }
       },
       elements: {
-        point:{
+        point: {
           radius: 0
         }
       },
@@ -76,14 +76,12 @@ export class MyAccountVideoChannelsComponent implements OnInit {
         mode: 'index',
         intersect: false,
         custom: function (tooltip: any) {
-          if (!tooltip) return;
-          // disable displaying the color box;
-          tooltip.displayColors = false;
+          if (!tooltip) return
+          // disable displaying the color box
+          tooltip.displayColors = false
         },
         callbacks: {
-          label: function (tooltip: any, data: any) {
-            return `${tooltip.value} views`;
-          }
+          label: (tooltip: any, data: any) => `${tooltip.value} views`
         }
       },
       hover: {
@@ -124,7 +122,7 @@ export class MyAccountVideoChannelsComponent implements OnInit {
 
   private loadVideoChannels () {
     this.authService.userInformationLoaded
-        .pipe(flatMap(() => this.videoChannelService.listAccountVideoChannels(this.user.account)))
+        .pipe(flatMap(() => this.videoChannelService.listAccountVideoChannels(this.user.account, null, true)))
         .subscribe(res => {
           this.videoChannels = res.data
           this.videoChannelsData = this.videoChannels.map(v => ({