ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix lint
Chocobozzzbe4476785470
diff --git a/client/src/app/account/account-videos/account-videos.component.html b/client/src/app/account/account-videos/account-videos.component.htmlindex 94b976869f..eb0a32fd36 100644--- a/client/src/app/account/account-videos/account-videos.component.html+++ b/client/src/app/account/account-videos/account-videos.component.html@@ -8,7 +8,7 @@<div class="video-info"><div class="video-info-name">{{ video.name }}</div>- <span class="video-info-date-views">{{ video.createdAt | fromNow }} - {{ video.views | numberFormatter }} views</span>+ <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span></div><a class="edit-button" [routerLink]="[ '/videos', video.id, '/edit' ]">diff --git a/client/src/app/account/account-videos/account-videos.component.ts b/client/src/app/account/account-videos/account-videos.component.tsindex ff945825dd..cc28f511ae 100644--- a/client/src/app/account/account-videos/account-videos.component.ts+++ b/client/src/app/account/account-videos/account-videos.component.ts@@ -1,8 +1,7 @@import { Component, OnDestroy, OnInit } from '@angular/core'-import { AbstractVideoList } from '../../shared/video/abstract-video-list'-import { ActivatedRoute } from '@angular/router'-import { Router } from '@angular/router'+import { ActivatedRoute, Router } from '@angular/router'import { NotificationsService } from 'angular2-notifications'+import { AbstractVideoList } from '../../shared/video/abstract-video-list'import { VideoService } from '../../shared/video/video.service'@Component({diff --git a/client/src/app/shared/misc/from-now.pipe.ts b/client/src/app/shared/misc/from-now.pipe.tsindex 80dab02ba6..fac02af0bd 100644--- a/client/src/app/shared/misc/from-now.pipe.ts+++ b/client/src/app/shared/misc/from-now.pipe.ts@@ -1,8 +1,7 @@import { Pipe, PipeTransform } from '@angular/core'// Thanks: https://stackoverflow.com/questions/3177836/how-to-format-time-since-xxx-e-g-4-minutes-ago-similar-to-stack-exchange-site--@Pipe({name: 'fromNow'})+@Pipe({ name: 'myFromNow' })export class FromNowPipe implements PipeTransform {transform (value: number) {diff --git a/client/src/app/shared/misc/number-formatter.pipe.ts b/client/src/app/shared/misc/number-formatter.pipe.tsindex 2491fb1d65..8a0756a36a 100644--- a/client/src/app/shared/misc/number-formatter.pipe.ts+++ b/client/src/app/shared/misc/number-formatter.pipe.ts@@ -2,7 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core'// Thanks: https://github.com/danrevah/ngx-pipes/blob/master/src/pipes/math/bytes.ts-@Pipe({name: 'numberFormatter'})+@Pipe({ name: 'myNumberFormatter' })export class NumberFormatterPipe implements PipeTransform {private dictionary: Array<{max: number, type: string}> = [{ max: 1000, type: '' },diff --git a/client/src/app/videos/video-list/shared/video-miniature.component.html b/client/src/app/videos/video-list/shared/video-miniature.component.htmlindex f2756ca3d1..7ac017235c 100644--- a/client/src/app/videos/video-list/shared/video-miniature.component.html+++ b/client/src/app/videos/video-list/shared/video-miniature.component.html@@ -11,7 +11,7 @@</a></span>- <span class="video-miniature-created-at-views">{{ video.createdAt | fromNow }} - {{ video.views | numberFormatter }} views</span>+ <span class="video-miniature-created-at-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span><span class="video-miniature-account">{{ video.by }}</span></div></div>diff --git a/server/initializers/migrations/0115-account-avatar.ts b/server/initializers/migrations/0115-account-avatar.tsindex e3531f5ced..2b947ceda0 100644--- a/server/initializers/migrations/0115-account-avatar.ts+++ b/server/initializers/migrations/0115-account-avatar.ts@@ -7,7 +7,7 @@ async function up (utils: {sequelize: Sequelize.Sequelize,db: PeerTubeDatabase}): Promise<void> {- await db.Avatar.sync()+ await utils.db.Avatar.sync()const data = {type: Sequelize.INTEGER,diff --git a/server/models/account/account.ts b/server/models/account/account.tsindex 15be1126be..8b0819f395 100644--- a/server/models/account/account.ts+++ b/server/models/account/account.ts@@ -13,7 +13,6 @@ import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypimport { AVATARS_DIR } from '../../initializers'import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers/constants'import { sendDeleteAccount } from '../../lib/activitypub/send/send-delete'-import { AvatarModel } from '../avatar'import { addMethodsToModel } from '../utils'import { AccountAttributes, AccountInstance, AccountMethods } from './account-interface'diff --git a/server/models/avatar/avatar.ts b/server/models/avatar/avatar.tsindex 3d329d8885..96308fd5ff 100644--- a/server/models/avatar/avatar.ts+++ b/server/models/avatar/avatar.ts@@ -1,6 +1,6 @@import * as Sequelize from 'sequelize'import { addMethodsToModel } from '../utils'-import { AvatarAttributes, AvatarInstance, AvatarMethods } from './avatar-interface'+import { AvatarAttributes, AvatarInstance } from './avatar-interface'let Avatar: Sequelize.Model<AvatarInstance, AvatarAttributes>