Automatically filter on local videos in admin

We expect admins will mostly want to act on local videos
pull/6128/head
Chocobozzz 2023-12-12 10:14:55 +01:00
parent b4f4432459
commit bca6d58676
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,9 @@ export class AdminComponent implements OnInit {
overviewItems.children.push({
label: $localize`Videos`,
routerLink: '/admin/videos',
queryParams: {
search: 'isLocal:true'
},
iconName: 'videos'
})
}

View File

@ -30,6 +30,7 @@
*ngIf="isDisplayed(menuChild)" ngbDropdownItem
[ngClass]="{ icon: hasIcons }" routerLinkActive="active" ariaCurrentWhenActive="page"
[routerLink]="menuChild.routerLink" #routerLink (click)="onActiveLinkScrollToTop(routerLink)"
[queryParams]="menuChild.queryParams"
>
<my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>

View File

@ -15,6 +15,7 @@ export type TopMenuDropdownParam = {
children?: {
label: string
routerLink: string
queryParams?: { [id: string]: string }
iconName?: GlobalIconName
isDisplayed?: () => boolean // Default: () => true