diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-06 11:07:30 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-06 11:07:30 +0100 |
commit | 3d216ea0f74cfa47312b97bae0e24885b563dd6d (patch) | |
tree | 9082c1a14f66039d5516f48521de02cdd2365dd0 /client/src/app/shared/buttons/action-dropdown.component.ts | |
parent | 941c5eac1751ef93500d6afa58c4575f777dbff9 (diff) | |
download | PeerTube-3d216ea0f74cfa47312b97bae0e24885b563dd6d.tar.gz PeerTube-3d216ea0f74cfa47312b97bae0e24885b563dd6d.tar.zst PeerTube-3d216ea0f74cfa47312b97bae0e24885b563dd6d.zip |
Fix dropdown on video miniature for unlogged 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 | 8 |
1 files changed, 6 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 c9dbbfda2..a4200f70f 100644 --- a/client/src/app/shared/buttons/action-dropdown.component.ts +++ b/client/src/app/shared/buttons/action-dropdown.component.ts | |||
@@ -38,7 +38,11 @@ export class ActionDropdownComponent<T> { | |||
38 | return [ this.actions ] | 38 | return [ this.actions ] |
39 | } | 39 | } |
40 | 40 | ||
41 | areActionsDisplayed (actions: DropdownAction<T>[], entry: T) { | 41 | areActionsDisplayed (actions: Array<DropdownAction<T> | DropdownAction<T>[]>, entry: T): boolean { |
42 | return actions.some(a => a.isDisplayed === undefined || a.isDisplayed(entry)) | 42 | return actions.some(a => { |
43 | if (Array.isArray(a)) return this.areActionsDisplayed(a, entry) | ||
44 | |||
45 | return a.isDisplayed === undefined || a.isDisplayed(entry) | ||
46 | }) | ||
43 | } | 47 | } |
44 | } | 48 | } |