diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-09 17:51:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-09 17:55:05 +0200 |
commit | 141b177db088891e84040f68aa95008fb52f1d44 (patch) | |
tree | 20168077514c920f5b4da4696707db55f51b158d /client/src/app/shared/buttons/action-dropdown.component.ts | |
parent | 63347a0ff966c7863e5b7431effa1cb0668df893 (diff) | |
download | PeerTube-141b177db088891e84040f68aa95008fb52f1d44.tar.gz PeerTube-141b177db088891e84040f68aa95008fb52f1d44.tar.zst PeerTube-141b177db088891e84040f68aa95008fb52f1d44.zip |
Add ability to ban/unban users
Diffstat (limited to 'client/src/app/shared/buttons/action-dropdown.component.ts')
-rw-r--r-- | client/src/app/shared/buttons/action-dropdown.component.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
1 | import { Component, Input } from '@angular/core' | 1 | import { Component, Input } from '@angular/core' |
2 | 2 | ||
3 | export type DropdownAction<T> = { | 3 | export type DropdownAction<T> = { |
4 | type: 'custom' | 'delete' | 'edit' | ||
5 | label?: string | 4 | label?: string |
6 | handler?: (T) => any | 5 | handler?: (T) => any |
7 | linkBuilder?: (T) => (string | number)[] | 6 | linkBuilder?: (T) => (string | number)[] |
8 | iconClass?: string | 7 | isDisplayed?: (T) => boolean |
9 | } | 8 | } |
10 | 9 | ||
11 | @Component({ | 10 | @Component({ |
@@ -17,4 +16,5 @@ export type DropdownAction<T> = { | |||
17 | export class ActionDropdownComponent<T> { | 16 | export class ActionDropdownComponent<T> { |
18 | @Input() actions: DropdownAction<T>[] = [] | 17 | @Input() actions: DropdownAction<T>[] = [] |
19 | @Input() entry: T | 18 | @Input() entry: T |
19 | @Input() placement = 'left' | ||
20 | } | 20 | } |