From: Rigel Kent Date: Mon, 13 Apr 2020 23:38:41 +0000 (+0200) Subject: Fix lint X-Git-Tag: v2.2.0-rc.1~237 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=471ee39496e2140cf7f44b70aa63d7b3afb3e9bb;p=oweals%2Fpeertube.git Fix lint --- 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 { 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, 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 { 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 })