Fix lint
authorChocobozzz <florian.bigard@gmail.com>
Mon, 4 Dec 2017 10:17:08 +0000 (11:17 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Mon, 4 Dec 2017 10:17:08 +0000 (11:17 +0100)
client/src/app/account/account-videos/account-videos.component.html
client/src/app/account/account-videos/account-videos.component.ts
client/src/app/shared/misc/from-now.pipe.ts
client/src/app/shared/misc/number-formatter.pipe.ts
client/src/app/videos/video-list/shared/video-miniature.component.html
server/initializers/migrations/0115-account-avatar.ts
server/models/account/account.ts
server/models/avatar/avatar.ts

index 94b976869f98f862804ec67c9dc26bc54f571ced..eb0a32fd36bcc8d4dc787d190a93479ee9bae9ca 100644 (file)
@@ -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' ]">
index ff945825dd02bec4ac37a98ec41647117baf494b..cc28f511ae600752de1254e3db3dae16c9c1bb3b 100644 (file)
@@ -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({
index 80dab02ba65630f5706f83c4cba57a6b46ae4bc0..fac02af0bd6b59e3aa23c1e10d5ccc766f2b428b 100644 (file)
@@ -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) {
index 2491fb1d653c602b1e8866c989f65973af26f095..8a0756a36adfe342e4691400aec705681205c240 100644 (file)
@@ -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: '' },
index f2756ca3d106c328c1eadad16151b92d26147ef0..7ac017235c7852c2002548b446a4210dbd74f84c 100644 (file)
@@ -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>
index e3531f5ced2259cfb12505498afe0c2842d79eb1..2b947ceda08f0c0636ab70ef1a73ee0dbb3f590a 100644 (file)
@@ -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,
index 15be1126be11ba379d03a96a76cfa25e59137887..8b0819f395c701dba485cbeae83566daf791487f 100644 (file)
@@ -13,7 +13,6 @@ import { isActivityPubUrlValid } from '../../helpers/custom-validators/activityp
 import { 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'
 
index 3d329d8885c89fc27f7994ae49e4efe4420bd8cd..96308fd5ffc2c1a144548d2d1e81c85b7eed045e 100644 (file)
@@ -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>