aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.ts12
-rw-r--r--client/src/app/shared/angular/from-now.pipe.ts2
2 files changed, 11 insertions, 3 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts
index 18ca5805f..ae208e624 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.ts
+++ b/client/src/app/+admin/users/user-edit/user-edit.ts
@@ -94,10 +94,18 @@ export abstract class UserEdit extends FormReactive implements OnInit {
94 protected buildQuotaOptions () { 94 protected buildQuotaOptions () {
95 // These are used by a HTML select, so convert key into strings 95 // These are used by a HTML select, so convert key into strings
96 this.videoQuotaOptions = this.configService 96 this.videoQuotaOptions = this.configService
97 .videoQuotaOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled })) 97 .videoQuotaOptions.map(q => ({
98 value: q.value?.toString(),
99 label: q.label,
100 disabled: q.disabled
101 }))
98 102
99 this.videoQuotaDailyOptions = this.configService 103 this.videoQuotaDailyOptions = this.configService
100 .videoQuotaDailyOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled })) 104 .videoQuotaDailyOptions.map(q => ({
105 value: q.value?.toString(),
106 label: q.label,
107 disabled: q.disabled
108 }))
101 109
102 console.log( 110 console.log(
103 this.videoQuotaOptions, 111 this.videoQuotaOptions,
diff --git a/client/src/app/shared/angular/from-now.pipe.ts b/client/src/app/shared/angular/from-now.pipe.ts
index 07f114ab6..9851468ee 100644
--- a/client/src/app/shared/angular/from-now.pipe.ts
+++ b/client/src/app/shared/angular/from-now.pipe.ts
@@ -10,7 +10,7 @@ export class FromNowPipe implements PipeTransform {
10 transform (arg: number | Date | string) { 10 transform (arg: number | Date | string) {
11 const argDate = new Date(arg) 11 const argDate = new Date(arg)
12 const seconds = Math.floor((Date.now() - argDate.getTime()) / 1000) 12 const seconds = Math.floor((Date.now() - argDate.getTime()) / 1000)
13 13
14 let interval = Math.floor(seconds / 31536000) 14 let interval = Math.floor(seconds / 31536000)
15 if (interval > 1) return this.i18n('{{interval}} years ago', { interval }) 15 if (interval > 1) return this.i18n('{{interval}} years ago', { interval })
16 if (interval === 1) return this.i18n('{{interval}} year ago', { interval }) 16 if (interval === 1) return this.i18n('{{interval}} year ago', { interval })