diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-03 11:06:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-03 16:42:15 +0200 |
commit | 1fd61899eaea245a5844e33e21f04b2562f16e5e (patch) | |
tree | 2a1d51b37b12219cade35e189d62686cd0fec105 /client/src/app/+admin/moderation/video-comment-list | |
parent | dfcb6f50a607b6b402b4f8fa3d43792d61c912a5 (diff) | |
download | PeerTube-1fd61899eaea245a5844e33e21f04b2562f16e5e.tar.gz PeerTube-1fd61899eaea245a5844e33e21f04b2562f16e5e.tar.zst PeerTube-1fd61899eaea245a5844e33e21f04b2562f16e5e.zip |
Add ability to filter my videos by live
Diffstat (limited to 'client/src/app/+admin/moderation/video-comment-list')
-rw-r--r-- | client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html | 20 | ||||
-rw-r--r-- | client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts | 12 |
2 files changed, 13 insertions, 19 deletions
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html index b6cec9c51..5cc0ff137 100644 --- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html +++ b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html | |||
@@ -26,25 +26,7 @@ | |||
26 | </div> | 26 | </div> |
27 | 27 | ||
28 | <div class="ml-auto"> | 28 | <div class="ml-auto"> |
29 | <div class="input-group has-feedback has-clear"> | 29 | <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)" (resetTableFilter)="resetTableFilter()"></my-advanced-input-filter> |
30 | <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body"> | ||
31 | <div class="input-group-text" ngbDropdownToggle> | ||
32 | <span class="caret" aria-haspopup="menu" role="button"></span> | ||
33 | </div> | ||
34 | |||
35 | <div role="menu" ngbDropdownMenu> | ||
36 | <h6 class="dropdown-header" i18n>Advanced comments filters</h6> | ||
37 | <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:true' }" class="dropdown-item" i18n>Local comments</a> | ||
38 | <a [routerLink]="[ '/admin/moderation/video-comments/list' ]" [queryParams]="{ 'search': 'local:false' }" class="dropdown-item" i18n>Remote comments</a> | ||
39 | </div> | ||
40 | </div> | ||
41 | <input | ||
42 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | ||
43 | (keyup)="onSearch($event)" | ||
44 | > | ||
45 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="resetTableFilter()"></a> | ||
46 | <span class="sr-only" i18n>Clear filters</span> | ||
47 | </div> | ||
48 | </div> | 30 | </div> |
49 | </div> | 31 | </div> |
50 | </ng-template> | 32 | </ng-template> |
diff --git a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts index 63493d00d..ebbbddb43 100644 --- a/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts +++ b/client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.ts | |||
@@ -2,6 +2,7 @@ import { SortMeta } from 'primeng/api' | |||
2 | import { AfterViewInit, Component, OnInit } from '@angular/core' | 2 | import { AfterViewInit, Component, OnInit } from '@angular/core' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { AuthService, ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' | 4 | import { AuthService, ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' |
5 | import { AdvancedInputFilter } from '@app/shared/shared-forms' | ||
5 | import { DropdownAction } from '@app/shared/shared-main' | 6 | import { DropdownAction } from '@app/shared/shared-main' |
6 | import { BulkService } from '@app/shared/shared-moderation' | 7 | import { BulkService } from '@app/shared/shared-moderation' |
7 | import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' | 8 | import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' |
@@ -43,6 +44,17 @@ export class VideoCommentListComponent extends RestTable implements OnInit, Afte | |||
43 | selectedComments: VideoCommentAdmin[] = [] | 44 | selectedComments: VideoCommentAdmin[] = [] |
44 | bulkCommentActions: DropdownAction<VideoCommentAdmin[]>[] = [] | 45 | bulkCommentActions: DropdownAction<VideoCommentAdmin[]>[] = [] |
45 | 46 | ||
47 | inputFilters: AdvancedInputFilter[] = [ | ||
48 | { | ||
49 | queryParams: { 'search': 'local:true' }, | ||
50 | label: $localize`Local comments` | ||
51 | }, | ||
52 | { | ||
53 | queryParams: { 'search': 'local:false' }, | ||
54 | label: $localize`Remote comments` | ||
55 | } | ||
56 | ] | ||
57 | |||
46 | get authUser () { | 58 | get authUser () { |
47 | return this.auth.getUser() | 59 | return this.auth.getUser() |
48 | } | 60 | } |