Skip to content

Commit 729d9ed

Browse files
bodnaraxflord
authored andcommitted
feat(admin): hide empty expandable sections
* empty sections are not shown * authentication section under service account was reworked to be expandable
1 parent bfbe9a2 commit 729d9ed

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
<perun-web-apps-menu-buttons-field [items]="navItems"></perun-web-apps-menu-buttons-field>
2+
<perun-web-apps-expandable-tiles
3+
[items]="authenticationItems"
4+
[title]="'MENU_ITEMS.USER.AUTHENTICATION'"
5+
[sectionId]="'authentication'">
6+
</perun-web-apps-expandable-tiles>

apps/admin-gui/src/app/users/pages/user-detail-page/user-settings/user-settings-service-identities/service-identity-detail-page/service-identity-overview/service-identity-overview.component.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { User } from '@perun-web-apps/perun/openapi';
1010
})
1111
export class ServiceIdentityOverviewComponent implements OnInit {
1212
navItems: MenuItem[] = [];
13+
authenticationItems: MenuItem[] = [];
1314
serviceAccount: User;
1415

1516
constructor(private entityStorageService: EntityStorageService) {}
@@ -39,10 +40,25 @@ export class ServiceIdentityOverviewComponent implements OnInit {
3940
label: 'MENU_ITEMS.USER.DATA_QUOTAS',
4041
style: 'user-btn',
4142
},
43+
];
44+
45+
this.authenticationItems = [
46+
{
47+
cssIcon: 'perun-logins',
48+
url: `/myProfile/service-identities/${this.serviceAccount.id}/authentication/logins`,
49+
label: 'MENU_ITEMS.USER.LOGINS',
50+
style: 'user-btn',
51+
},
52+
{
53+
cssIcon: 'perun-certificates',
54+
url: `/myProfile/service-identities/${this.serviceAccount.id}/authentication/certificates`,
55+
label: 'MENU_ITEMS.USER.CERTIFICATES',
56+
style: 'user-btn',
57+
},
4258
{
43-
cssIcon: 'perun-authentication',
44-
url: `/myProfile/service-identities/${this.serviceAccount.id}/authentication`,
45-
label: 'MENU_ITEMS.USER.AUTHENTICATION',
59+
cssIcon: 'perun-key',
60+
url: `/myProfile/service-identities/${this.serviceAccount.id}/authentication/ssh-keys`,
61+
label: 'MENU_ITEMS.USER.SSH_KEYS',
4662
style: 'user-btn',
4763
},
4864
];

libs/perun/components/src/lib/expandable-tiles/expandable-tiles.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div *ngIf="{expanded: expanded | async} as ex" class="mt-4">
1+
<div *ngIf="items.length !== 0 && {expanded: expanded | async} as ex" class="mt-4">
22
<button mat-button (click)="toggle()">
33
<div class="d-flex align-items-center justify-content-start">
44
<span class="fs-5">{{title | translate}}</span>

0 commit comments

Comments
 (0)