aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/buttons/action-dropdown.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-11-21 17:05:31 +0100
committerChocobozzz <me@florianbigard.com>2018-11-21 17:05:31 +0100
commitf97c91f7ec4afc26ab790fbefa63d11b3060f40f (patch)
treed7548e28e0bb645cc0bdbc4620f868303444a194 /client/src/app/shared/buttons/action-dropdown.component.ts
parent9fa0ea41aaa511bed3aa179dacc312fad6170c21 (diff)
downloadPeerTube-f97c91f7ec4afc26ab790fbefa63d11b3060f40f.tar.gz
PeerTube-f97c91f7ec4afc26ab790fbefa63d11b3060f40f.tar.zst
PeerTube-f97c91f7ec4afc26ab790fbefa63d11b3060f40f.zip
Add separators in user moderation dropdown
Diffstat (limited to 'client/src/app/shared/buttons/action-dropdown.component.ts')
-rw-r--r--client/src/app/shared/buttons/action-dropdown.component.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/shared/buttons/action-dropdown.component.ts b/client/src/app/shared/buttons/action-dropdown.component.ts
index d8026ef41..275e2b51e 100644
--- a/client/src/app/shared/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/buttons/action-dropdown.component.ts
@@ -14,10 +14,16 @@ export type DropdownAction<T> = {
14}) 14})
15 15
16export class ActionDropdownComponent<T> { 16export class ActionDropdownComponent<T> {
17 @Input() actions: DropdownAction<T>[] = [] 17 @Input() actions: DropdownAction<T>[] | DropdownAction<T>[][] = []
18 @Input() entry: T 18 @Input() entry: T
19 @Input() placement = 'bottom-left' 19 @Input() placement = 'bottom-left'
20 @Input() buttonSize: 'normal' | 'small' = 'normal' 20 @Input() buttonSize: 'normal' | 'small' = 'normal'
21 @Input() label: string 21 @Input() label: string
22 @Input() theme: 'orange' | 'grey' = 'grey' 22 @Input() theme: 'orange' | 'grey' = 'grey'
23
24 getActions () {
25 if (this.actions.length !== 0 && Array.isArray(this.actions[0])) return this.actions
26
27 return [ this.actions ]
28 }
23} 29}