mirror of https://github.com/Chocobozzz/PeerTube
				
				
				
			Fix import link
							parent
							
								
									3d5d2deef5
								
							
						
					
					
						commit
						8bd4a1edcc
					
				|  | @ -1,10 +1,10 @@ | ||||||
|  | import { SortMeta } from 'primeng/api' | ||||||
|  | import { mergeMap } from 'rxjs' | ||||||
| import { Component, OnInit } from '@angular/core' | import { Component, OnInit } from '@angular/core' | ||||||
| import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' | ||||||
| import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' | import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' | ||||||
| import { HTMLServerConfig } from '@shared/models/server' | import { HTMLServerConfig } from '@shared/models/server' | ||||||
| import { VideoChannelSync, VideoChannelSyncState } from '@shared/models/videos' | import { VideoChannelSync, VideoChannelSyncState } from '@shared/models/videos' | ||||||
| import { SortMeta } from 'primeng/api' |  | ||||||
| import { mergeMap } from 'rxjs' |  | ||||||
| 
 | 
 | ||||||
| @Component({ | @Component({ | ||||||
|   templateUrl: './my-video-channel-syncs.component.html', |   templateUrl: './my-video-channel-syncs.component.html', | ||||||
|  | @ -47,7 +47,8 @@ export class MyVideoChannelSyncsComponent extends RestTable implements OnInit { | ||||||
|       [ |       [ | ||||||
|         { |         { | ||||||
|           label: $localize`List imports`, |           label: $localize`List imports`, | ||||||
|           linkBuilder: (videoChannelSync) => [ `/my-library/video-imports?search=videoChannelSyncId:${videoChannelSync.id}` ], |           linkBuilder: () => [ '/my-library/video-imports' ], | ||||||
|  |           queryParamsBuilder: sync => ({ search: `videoChannelSyncId:${sync.id}` }), | ||||||
|           iconName: 'cloud-download' |           iconName: 'cloud-download' | ||||||
|         } |         } | ||||||
|       ], |       ], | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ | ||||||
| 
 | 
 | ||||||
|           <a |           <a | ||||||
|             *ngIf="action.linkBuilder && !action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }" |             *ngIf="action.linkBuilder && !action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }" | ||||||
|             class="dropdown-item"  [routerLink]="action.linkBuilder(entry)" [title]="action.title || ''" |             class="dropdown-item"  [routerLink]="action.linkBuilder(entry)" [queryParams]="action.queryParamsBuilder(entry)" [title]="action.title || ''" | ||||||
|           > |           > | ||||||
|             <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container> |             <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container> | ||||||
|           </a> |           </a> | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| import { Component, Input } from '@angular/core' | import { Component, Input } from '@angular/core' | ||||||
|  | import { Params } from '@angular/router' | ||||||
| import { GlobalIconName } from '@app/shared/shared-icons' | import { GlobalIconName } from '@app/shared/shared-icons' | ||||||
| 
 | 
 | ||||||
| export type DropdownAction<T> = { | export type DropdownAction<T> = { | ||||||
|  | @ -7,7 +8,10 @@ export type DropdownAction<T> = { | ||||||
|   description?: string |   description?: string | ||||||
|   title?: string |   title?: string | ||||||
|   handler?: (a: T) => any |   handler?: (a: T) => any | ||||||
|  | 
 | ||||||
|   linkBuilder?: (a: T) => (string | number)[] |   linkBuilder?: (a: T) => (string | number)[] | ||||||
|  |   queryParamsBuilder?: (a: T) => Params | ||||||
|  | 
 | ||||||
|   isDisplayed?: (a: T) => boolean |   isDisplayed?: (a: T) => boolean | ||||||
| 
 | 
 | ||||||
|   class?: string[] |   class?: string[] | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Chocobozzz
						Chocobozzz