diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-20 09:05:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-20 09:25:44 +0200 |
commit | 978c87e7f58b6673fe60f04f1767bc9e02ea4936 (patch) | |
tree | e7d48735d4099fec8c7732f33e7dadb09c0eac80 /client/src/app/shared/shared-forms | |
parent | 7e76cc380040e40a2292a9dc825f037c9b538030 (diff) | |
download | PeerTube-978c87e7f58b6673fe60f04f1767bc9e02ea4936.tar.gz PeerTube-978c87e7f58b6673fe60f04f1767bc9e02ea4936.tar.zst PeerTube-978c87e7f58b6673fe60f04f1767bc9e02ea4936.zip |
Add channel filters for my videos/followers
Diffstat (limited to 'client/src/app/shared/shared-forms')
-rw-r--r-- | client/src/app/shared/shared-forms/advanced-input-filter.component.html | 10 | ||||
-rw-r--r-- | client/src/app/shared/shared-forms/advanced-input-filter.component.ts | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-forms/advanced-input-filter.component.html b/client/src/app/shared/shared-forms/advanced-input-filter.component.html index 10d1296cf..c662b9bb6 100644 --- a/client/src/app/shared/shared-forms/advanced-input-filter.component.html +++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.html | |||
@@ -5,11 +5,13 @@ | |||
5 | </div> | 5 | </div> |
6 | 6 | ||
7 | <div role="menu" ngbDropdownMenu> | 7 | <div role="menu" ngbDropdownMenu> |
8 | <h6 class="dropdown-header" i18n>Advanced filters</h6> | 8 | <ng-container *ngFor="let group of filters"> |
9 | <h6 class="dropdown-header">{{ group.title }}</h6> | ||
9 | 10 | ||
10 | <a *ngFor="let filter of filters" [routerLink]="[ '.' ]" [queryParams]="filter.queryParams" class="dropdown-item"> | 11 | <a *ngFor="let filter of group.children" [routerLink]="[ '.' ]" [queryParams]="filter.queryParams" class="dropdown-item"> |
11 | {{ filter.label }} | 12 | {{ filter.label }} |
12 | </a> | 13 | </a> |
14 | </ng-container> | ||
13 | </div> | 15 | </div> |
14 | </div> | 16 | </div> |
15 | 17 | ||
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 index 8315662b4..a12dddf7a 100644 --- a/client/src/app/shared/shared-forms/advanced-input-filter.component.ts +++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.ts | |||
@@ -5,8 +5,12 @@ import { AfterViewInit, Component, EventEmitter, Input, OnInit, Output } from '@ | |||
5 | import { ActivatedRoute, Params, Router } from '@angular/router' | 5 | import { ActivatedRoute, Params, Router } from '@angular/router' |
6 | 6 | ||
7 | export type AdvancedInputFilter = { | 7 | export type AdvancedInputFilter = { |
8 | label: string | 8 | title: string |
9 | queryParams: Params | 9 | |
10 | children: { | ||
11 | label: string | ||
12 | queryParams: Params | ||
13 | }[] | ||
10 | } | 14 | } |
11 | 15 | ||
12 | const logger = debug('peertube:AdvancedInputFilterComponent') | 16 | const logger = debug('peertube:AdvancedInputFilterComponent') |