X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fbuttons%2Faction-dropdown.component.ts;h=17f9cc6188d54ac839a19084c179a0ee8ee11f76;hb=65b247ddc75aa9f131af86dde21c8d958f7f4b39;hp=407d24b80f31f7c321a153bb76bda6bd5fc8495e;hpb=eacb25c4366bcc8fba20f98f93f004fabc6d5578;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/buttons/action-dropdown.component.ts b/client/src/app/shared/buttons/action-dropdown.component.ts index 407d24b80..17f9cc618 100644 --- a/client/src/app/shared/buttons/action-dropdown.component.ts +++ b/client/src/app/shared/buttons/action-dropdown.component.ts @@ -1,11 +1,10 @@ import { Component, Input } from '@angular/core' export type DropdownAction = { - type: 'custom' | 'delete' | 'edit' label?: string handler?: (T) => any linkBuilder?: (T) => (string | number)[] - iconClass?: string + isDisplayed?: (T) => boolean } @Component({ @@ -17,4 +16,5 @@ export type DropdownAction = { export class ActionDropdownComponent { @Input() actions: DropdownAction[] = [] @Input() entry: T + @Input() placement = 'left' }