aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/advanced-input-filter.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-03 11:06:19 +0200
committerChocobozzz <me@florianbigard.com>2021-05-03 16:42:15 +0200
commit1fd61899eaea245a5844e33e21f04b2562f16e5e (patch)
tree2a1d51b37b12219cade35e189d62686cd0fec105 /client/src/app/shared/shared-forms/advanced-input-filter.component.ts
parentdfcb6f50a607b6b402b4f8fa3d43792d61c912a5 (diff)
downloadPeerTube-1fd61899eaea245a5844e33e21f04b2562f16e5e.tar.gz
PeerTube-1fd61899eaea245a5844e33e21f04b2562f16e5e.tar.zst
PeerTube-1fd61899eaea245a5844e33e21f04b2562f16e5e.zip
Add ability to filter my videos by live
Diffstat (limited to 'client/src/app/shared/shared-forms/advanced-input-filter.component.ts')
-rw-r--r--client/src/app/shared/shared-forms/advanced-input-filter.component.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-forms/advanced-input-filter.component.ts b/client/src/app/shared/shared-forms/advanced-input-filter.component.ts
new file mode 100644
index 000000000..394090751
--- /dev/null
+++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.ts
@@ -0,0 +1,27 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core'
2import { Params } from '@angular/router'
3
4export type AdvancedInputFilter = {
5 label: string
6 queryParams: Params
7}
8
9@Component({
10 selector: 'my-advanced-input-filter',
11 templateUrl: './advanced-input-filter.component.html',
12 styleUrls: [ './advanced-input-filter.component.scss' ]
13})
14export class AdvancedInputFilterComponent {
15 @Input() filters: AdvancedInputFilter[] = []
16
17 @Output() resetTableFilter = new EventEmitter<void>()
18 @Output() search = new EventEmitter<Event>()
19
20 onSearch (event: Event) {
21 this.search.emit(event)
22 }
23
24 onResetTableFilter () {
25 this.resetTableFilter.emit()
26 }
27}