aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-21 10:19:42 +0200
committerChocobozzz <me@florianbigard.com>2021-10-21 10:19:42 +0200
commita2c3564a31268e4e60f05952aa3731e114ac1e30 (patch)
treef0bf29c8b304ec61ded60328f1a488338c2d4c8e /client/src/app/shared/shared-main
parent5196817c5d7cf86b35f3fa2cfe108ba283944482 (diff)
downloadPeerTube-a2c3564a31268e4e60f05952aa3731e114ac1e30.tar.gz
PeerTube-a2c3564a31268e4e60f05952aa3731e114ac1e30.tar.zst
PeerTube-a2c3564a31268e4e60f05952aa3731e114ac1e30.zip
Improve moderation dropdown UX
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/buttons/action-dropdown.component.html4
-rw-r--r--client/src/app/shared/shared-main/buttons/action-dropdown.component.ts2
2 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
index d0487f0b8..c465b6903 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
@@ -13,7 +13,7 @@
13 <ng-container *ngFor="let actions of getActions()"> 13 <ng-container *ngFor="let actions of getActions()">
14 14
15 <ng-container *ngFor="let action of actions"> 15 <ng-container *ngFor="let action of actions">
16 <ng-container *ngIf="action.isDisplayed === undefined || action.isDisplayed(entry) === true"> 16 <div [ngClass]="action.class" *ngIf="action.isDisplayed === undefined || action.isDisplayed(entry) === true">
17 17
18 <ng-template #templateActionLabel let-action> 18 <ng-template #templateActionLabel let-action>
19 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName" aria-hidden="true"></my-global-icon> 19 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName" aria-hidden="true"></my-global-icon>
@@ -45,7 +45,7 @@
45 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container> 45 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
46 </h6> 46 </h6>
47 47
48 </ng-container> 48 </div>
49 </ng-container> 49 </ng-container>
50 50
51 <div *ngIf="areActionsDisplayed(actions, entry)" class="dropdown-divider"></div> 51 <div *ngIf="areActionsDisplayed(actions, entry)" class="dropdown-divider"></div>
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
index 36d7d6229..67ac6e1aa 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
@@ -9,6 +9,8 @@ export type DropdownAction<T> = {
9 handler?: (a: T) => any 9 handler?: (a: T) => any
10 linkBuilder?: (a: T) => (string | number)[] 10 linkBuilder?: (a: T) => (string | number)[]
11 isDisplayed?: (a: T) => boolean 11 isDisplayed?: (a: T) => boolean
12
13 class?: string[]
12 isHeader?: boolean 14 isHeader?: boolean
13} 15}
14 16