diff options
Diffstat (limited to 'client/src')
5 files changed, 24 insertions, 3 deletions
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 @@ | |||
14 | <div class="file-max-size">(extensions: {{ avatarExtensions }}, max size: {{ maxAvatarSize | bytes }})</div> | 14 | <div class="file-max-size">(extensions: {{ avatarExtensions }}, max size: {{ maxAvatarSize | bytes }})</div> |
15 | 15 | ||
16 | <div class="user-quota"> | 16 | <div class="user-quota"> |
17 | <span class="user-quota-label">Video quota:</span> {{ userVideoQuotaUsed | bytes: 0 }} / {{ user.videoQuota | bytes: 0 }} | 17 | <span class="user-quota-label">Video quota:</span> {{ userVideoQuotaUsed | bytes: 0 }} / {{ userVideoQuota }} |
18 | </div> | 18 | </div> |
19 | 19 | ||
20 | <div class="account-title">Account settings</div> | 20 | <div class="account-title">Account settings</div> |
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 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, OnInit, ViewChild } from '@angular/core' |
2 | import { NotificationsService } from 'angular2-notifications' | 2 | import { NotificationsService } from 'angular2-notifications' |
3 | import { BytesPipe } from 'ngx-pipes' | ||
3 | import { AuthService } from '../../core' | 4 | import { AuthService } from '../../core' |
4 | import { ServerService } from '../../core/server' | 5 | import { ServerService } from '../../core/server' |
5 | import { User } from '../../shared' | 6 | import { User } from '../../shared' |
@@ -14,6 +15,7 @@ export class AccountSettingsComponent implements OnInit { | |||
14 | @ViewChild('avatarfileInput') avatarfileInput | 15 | @ViewChild('avatarfileInput') avatarfileInput |
15 | 16 | ||
16 | user: User = null | 17 | user: User = null |
18 | userVideoQuota = '0' | ||
17 | userVideoQuotaUsed = 0 | 19 | userVideoQuotaUsed = 0 |
18 | 20 | ||
19 | constructor ( | 21 | constructor ( |
@@ -26,6 +28,16 @@ export class AccountSettingsComponent implements OnInit { | |||
26 | ngOnInit () { | 28 | ngOnInit () { |
27 | this.user = this.authService.getUser() | 29 | this.user = this.authService.getUser() |
28 | 30 | ||
31 | this.authService.userInformationLoaded.subscribe( | ||
32 | () => { | ||
33 | if (this.user.videoQuota !== -1) { | ||
34 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() | ||
35 | } else { | ||
36 | this.userVideoQuota = 'Unlimited' | ||
37 | } | ||
38 | } | ||
39 | ) | ||
40 | |||
29 | this.userService.getMyVideoQuotaUsed() | 41 | this.userService.getMyVideoQuotaUsed() |
30 | .subscribe(data => this.userVideoQuotaUsed = data.videoQuotaUsed) | 42 | .subscribe(data => this.userVideoQuotaUsed = data.videoQuotaUsed) |
31 | } | 43 | } |
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 | |||
19 | titlePage = 'My videos' | 19 | titlePage = 'My videos' |
20 | currentRoute = '/account/videos' | 20 | currentRoute = '/account/videos' |
21 | checkedVideos: { [ id: number ]: boolean } = {} | 21 | checkedVideos: { [ id: number ]: boolean } = {} |
22 | pagination = { | ||
23 | currentPage: 1, | ||
24 | itemsPerPage: 10, | ||
25 | totalItems: null | ||
26 | } | ||
22 | 27 | ||
23 | constructor (protected router: Router, | 28 | constructor (protected router: Router, |
24 | protected route: ActivatedRoute, | 29 | 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 { | |||
329 | playerElement: this.playerElement, | 329 | playerElement: this.playerElement, |
330 | peerTubeLink: false | 330 | peerTubeLink: false |
331 | }, | 331 | }, |
332 | hotkeys: {} | 332 | hotkeys: { |
333 | enableVolumeScroll: false | ||
334 | } | ||
333 | } | 335 | } |
334 | } | 336 | } |
335 | 337 | ||
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index e27eadc8b..e68ee193a 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -43,7 +43,9 @@ loadVideoInfo(videoId, (err, videoInfo) => { | |||
43 | playerElement: videoElement, | 43 | playerElement: videoElement, |
44 | peerTubeLink: true | 44 | peerTubeLink: true |
45 | }, | 45 | }, |
46 | hotkeys: {} | 46 | hotkeys: { |
47 | enableVolumeScroll: false | ||
48 | } | ||
47 | } | 49 | } |
48 | } | 50 | } |
49 | videojs('video-container', videojsOptions, function () { | 51 | videojs('video-container', videojsOptions, function () { |