aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/app/videos/video-list/video-sort.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/app/videos/video-list/video-sort.component.ts')
-rw-r--r--client/app/videos/video-list/video-sort.component.ts35
1 files changed, 0 insertions, 35 deletions
diff --git a/client/app/videos/video-list/video-sort.component.ts b/client/app/videos/video-list/video-sort.component.ts
deleted file mode 100644
index 2cb810ff5..000000000
--- a/client/app/videos/video-list/video-sort.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core';
2
3import { SortField } from '../shared/index';
4
5@Component({
6 selector: 'my-video-sort',
7 templateUrl: 'client/app/videos/video-list/video-sort.component.html'
8})
9
10export class VideoSortComponent {
11 @Output() sort = new EventEmitter<any>();
12
13 @Input() currentSort: SortField;
14
15 sortChoices = {
16 'name': 'Name - Asc',
17 '-name': 'Name - Desc',
18 'duration': 'Duration - Asc',
19 '-duration': 'Duration - Desc',
20 'createdDate': 'Created Date - Asc',
21 '-createdDate': 'Created Date - Desc'
22 };
23
24 get choiceKeys() {
25 return Object.keys(this.sortChoices);
26 }
27
28 getStringChoice(choiceKey: SortField) {
29 return this.sortChoices[choiceKey];
30 }
31
32 onSortChange() {
33 this.sort.emit(this.currentSort);
34 }
35}