pull/2639/head
Rigel Kent 2020-04-14 01:38:41 +02:00
parent d6af81469b
commit 471ee39496
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
2 changed files with 11 additions and 3 deletions

View File

@ -94,10 +94,18 @@ export abstract class UserEdit extends FormReactive implements OnInit {
protected buildQuotaOptions () {
// These are used by a HTML select, so convert key into strings
this.videoQuotaOptions = this.configService
.videoQuotaOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled }))
.videoQuotaOptions.map(q => ({
value: q.value?.toString(),
label: q.label,
disabled: q.disabled
}))
this.videoQuotaDailyOptions = this.configService
.videoQuotaDailyOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled }))
.videoQuotaDailyOptions.map(q => ({
value: q.value?.toString(),
label: q.label,
disabled: q.disabled
}))
console.log(
this.videoQuotaOptions,

View File

@ -10,7 +10,7 @@ export class FromNowPipe implements PipeTransform {
transform (arg: number | Date | string) {
const argDate = new Date(arg)
const seconds = Math.floor((Date.now() - argDate.getTime()) / 1000)
let interval = Math.floor(seconds / 31536000)
if (interval > 1) return this.i18n('{{interval}} years ago', { interval })
if (interval === 1) return this.i18n('{{interval}} year ago', { interval })