mirror of https://github.com/Chocobozzz/PeerTube
Fix lint
parent
d2cc03aaad
commit
be44767854
|
@ -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' ]">
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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: '' },
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue