aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/buttons/action-dropdown.component.html16
-rw-r--r--client/src/app/shared/buttons/action-dropdown.component.scss4
-rw-r--r--client/src/app/shared/buttons/action-dropdown.component.ts1
-rw-r--r--client/src/app/shared/shared.module.ts2
4 files changed, 20 insertions, 3 deletions
diff --git a/client/src/app/shared/buttons/action-dropdown.component.html b/client/src/app/shared/buttons/action-dropdown.component.html
index cd993db9f..14cfe9a22 100644
--- a/client/src/app/shared/buttons/action-dropdown.component.html
+++ b/client/src/app/shared/buttons/action-dropdown.component.html
@@ -24,17 +24,27 @@
24 </div> 24 </div>
25 </ng-template> 25 </ng-template>
26 26
27 <a *ngIf="action.linkBuilder" [ngClass]="{ 'with-icon': !!action.iconName }" class="dropdown-item" [routerLink]="action.linkBuilder(entry)" [title]="action.title || ''"> 27 <a
28 *ngIf="action.linkBuilder && !action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }"
29 class="dropdown-item" [routerLink]="action.linkBuilder(entry)" [title]="action.title || ''"
30 >
28 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container> 31 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
29 </a> 32 </a>
30 33
31 <span 34 <span
32 *ngIf="!action.linkBuilder" [ngClass]="{ 'with-icon': !!action.iconName }" (click)="action.handler(entry)" 35 *ngIf="!action.linkBuilder && !action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }"
33 class="custom-action dropdown-item" role="button" [title]="action.title || ''" 36 class="custom-action dropdown-item" role="button" [title]="action.title || ''" (click)="action.handler(entry)"
34 > 37 >
35 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container> 38 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
36 </span> 39 </span>
37 40
41 <h6
42 *ngIf="!action.linkBuilder && action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }"
43 class="dropdown-header" role="button" [title]="action.title || ''" (click)="action.handler(entry)"
44 >
45 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
46 </h6>
47
38 </ng-container> 48 </ng-container>
39 </ng-container> 49 </ng-container>
40 50
diff --git a/client/src/app/shared/buttons/action-dropdown.component.scss b/client/src/app/shared/buttons/action-dropdown.component.scss
index 442c90984..7a030f32c 100644
--- a/client/src/app/shared/buttons/action-dropdown.component.scss
+++ b/client/src/app/shared/buttons/action-dropdown.component.scss
@@ -51,6 +51,10 @@
51} 51}
52 52
53.dropdown-menu { 53.dropdown-menu {
54 .dropdown-header {
55 padding: 0.2rem 1rem;
56 }
57
54 .dropdown-item { 58 .dropdown-item {
55 display: flex; 59 display: flex;
56 cursor: pointer; 60 cursor: pointer;
diff --git a/client/src/app/shared/buttons/action-dropdown.component.ts b/client/src/app/shared/buttons/action-dropdown.component.ts
index 6649b092a..8fcaa38b9 100644
--- a/client/src/app/shared/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/buttons/action-dropdown.component.ts
@@ -9,6 +9,7 @@ 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 isHeader?: boolean
12} 13}
13 14
14export type DropdownButtonSize = 'normal' | 'small' 15export type DropdownButtonSize = 'normal' | 'small'
diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts
index a952880a6..01735c187 100644
--- a/client/src/app/shared/shared.module.ts
+++ b/client/src/app/shared/shared.module.ts
@@ -107,6 +107,7 @@ import { InputSwitchModule } from 'primeng/inputswitch'
107import { MyAccountVideoSettingsComponent } from '@app/+my-account/my-account-settings/my-account-video-settings' 107import { MyAccountVideoSettingsComponent } from '@app/+my-account/my-account-settings/my-account-video-settings'
108import { MyAccountInterfaceSettingsComponent } from '@app/+my-account/my-account-settings/my-account-interface' 108import { MyAccountInterfaceSettingsComponent } from '@app/+my-account/my-account-settings/my-account-interface'
109import { ActorAvatarInfoComponent } from '@app/+my-account/shared/actor-avatar-info.component' 109import { ActorAvatarInfoComponent } from '@app/+my-account/shared/actor-avatar-info.component'
110import { BatchDomainsValidatorsService } from '@app/+admin/config/shared/batch-domains-validators.service'
110 111
111@NgModule({ 112@NgModule({
112 imports: [ 113 imports: [
@@ -297,6 +298,7 @@ import { ActorAvatarInfoComponent } from '@app/+my-account/shared/actor-avatar-i
297 LoginValidatorsService, 298 LoginValidatorsService,
298 ResetPasswordValidatorsService, 299 ResetPasswordValidatorsService,
299 UserValidatorsService, 300 UserValidatorsService,
301 BatchDomainsValidatorsService,
300 VideoPlaylistValidatorsService, 302 VideoPlaylistValidatorsService,
301 VideoAbuseValidatorsService, 303 VideoAbuseValidatorsService,
302 VideoChannelValidatorsService, 304 VideoChannelValidatorsService,