From 234b535dacdeacfacd7ac5601e53b6b7d923ca00 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 9 Jan 2018 16:30:39 +0100 Subject: Update dependencies --- .../account/account-settings/account-settings.component.html | 2 +- .../account/account-settings/account-settings.component.ts | 12 ++++++++++++ .../app/account/account-videos/account-videos.component.ts | 5 +++++ client/src/app/videos/+video-watch/video-watch.component.ts | 4 +++- 4 files changed, 21 insertions(+), 2 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/account/account-settings/account-settings.component.html b/client/src/app/account/account-settings/account-settings.component.html index 2f41b5ecf..7ae27dc75 100644 --- a/client/src/app/account/account-settings/account-settings.component.html +++ b/client/src/app/account/account-settings/account-settings.component.html @@ -14,7 +14,7 @@
(extensions: {{ avatarExtensions }}, max size: {{ maxAvatarSize | bytes }})
- Video quota: {{ userVideoQuotaUsed | bytes: 0 }} / {{ user.videoQuota | bytes: 0 }} + Video quota: {{ userVideoQuotaUsed | bytes: 0 }} / {{ userVideoQuota }}
Account settings
diff --git a/client/src/app/account/account-settings/account-settings.component.ts b/client/src/app/account/account-settings/account-settings.component.ts index a375072a0..524607817 100644 --- a/client/src/app/account/account-settings/account-settings.component.ts +++ b/client/src/app/account/account-settings/account-settings.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core' import { NotificationsService } from 'angular2-notifications' +import { BytesPipe } from 'ngx-pipes' import { AuthService } from '../../core' import { ServerService } from '../../core/server' import { User } from '../../shared' @@ -14,6 +15,7 @@ export class AccountSettingsComponent implements OnInit { @ViewChild('avatarfileInput') avatarfileInput user: User = null + userVideoQuota = '0' userVideoQuotaUsed = 0 constructor ( @@ -26,6 +28,16 @@ export class AccountSettingsComponent implements OnInit { ngOnInit () { this.user = this.authService.getUser() + this.authService.userInformationLoaded.subscribe( + () => { + if (this.user.videoQuota !== -1) { + this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() + } else { + this.userVideoQuota = 'Unlimited' + } + } + ) + this.userService.getMyVideoQuotaUsed() .subscribe(data => this.userVideoQuotaUsed = data.videoQuotaUsed) } diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.ts index d51b70e06..bce135557 100644 --- a/client/src/app/account/account-videos/account-videos.component.ts +++ b/client/src/app/account/account-videos/account-videos.component.ts @@ -19,6 +19,11 @@ export class AccountVideosComponent extends AbstractVideoList implements OnInit titlePage = 'My videos' currentRoute = '/account/videos' checkedVideos: { [ id: number ]: boolean } = {} + pagination = { + currentPage: 1, + itemsPerPage: 10, + totalItems: null + } constructor (protected router: Router, protected route: ActivatedRoute, 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 7929c1fa1..f02bae630 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -329,7 +329,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy { playerElement: this.playerElement, peerTubeLink: false }, - hotkeys: {} + hotkeys: { + enableVolumeScroll: false + } } } -- cgit v1.2.3