X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fvideo-list%2Fvideo-sort.component.ts;h=64916bf1668e5c00217de70e5344612064da22a3;hb=df98563e2104b82b119c00a3cd83cd0dc1242d25;hp=cde307f2ffde94de997d24ab8f85d81ececcd5c9;hpb=86e83939869976e9b4dfa6dc9d3785a284bd598c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/video-list/video-sort.component.ts b/client/src/app/videos/video-list/video-sort.component.ts index cde307f2f..64916bf16 100644 --- a/client/src/app/videos/video-list/video-sort.component.ts +++ b/client/src/app/videos/video-list/video-sort.component.ts @@ -1,6 +1,6 @@ -import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core' -import { SortField } from '../shared'; +import { SortField } from '../shared' @Component({ selector: 'my-video-sort', @@ -8,11 +8,11 @@ import { SortField } from '../shared'; }) export class VideoSortComponent { - @Output() sort = new EventEmitter(); + @Output() sort = new EventEmitter() - @Input() currentSort: SortField; + @Input() currentSort: SortField - sortChoices: { [ id: SortField ]: string } = { + sortChoices: { [ P in SortField ]: string } = { 'name': 'Name - Asc', '-name': 'Name - Desc', 'duration': 'Duration - Asc', @@ -23,17 +23,17 @@ export class VideoSortComponent { '-views': 'Views - Desc', 'likes': 'Likes - Asc', '-likes': 'Likes - Desc' - }; + } - get choiceKeys() { - return Object.keys(this.sortChoices); + get choiceKeys () { + return Object.keys(this.sortChoices) } - getStringChoice(choiceKey: SortField) { - return this.sortChoices[choiceKey]; + getStringChoice (choiceKey: SortField) { + return this.sortChoices[choiceKey] } - onSortChange() { - this.sort.emit(this.currentSort); + onSortChange () { + this.sort.emit(this.currentSort) } }