Skip to content

Commit 6027e67

Browse files
michalberkyxkostka2
authored andcommitted
feat(admin): add feedback on hover to member status
* Created new class status-change in styles.scss definging circular background that highlights on hover * Added this new class to appropriate places
1 parent faf7936 commit 6027e67

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

apps/admin-gui/src/_styles.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,30 @@ td.mat-mdc-cell {
14441444
justify-content: center;
14451445
}
14461446

1447+
.status-change {
1448+
position: relative;
1449+
display: inline-block;
1450+
margin-left: 5px;
1451+
1452+
// Using ::before to create a pseudo-element serving as circular background
1453+
&:before {
1454+
content: '';
1455+
position: absolute;
1456+
top: 50%;
1457+
left: 50%;
1458+
transform: translate(-50%, -50%);
1459+
width: 150%;
1460+
padding-bottom: 150%;
1461+
border-radius: 50%;
1462+
background-color: rgba(0, 0, 0, 0.05);
1463+
opacity: 0;
1464+
}
1465+
1466+
&:hover::before {
1467+
opacity: 1;
1468+
}
1469+
}
1470+
14471471
#preloader {
14481472
position: fixed;
14491473
top: 0;

libs/perun/components/src/lib/group-resource-status/group-resource-status.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<div class="flex-container">
22
<span
3+
class="status-change"
34
(click)="changeStatus()"
45
*ngIf="status === 'ACTIVE'"
56
matTooltip="{{'SHARED_LIB.PERUN.COMPONENTS.GROUP_RESOURCE_STATUS.ACTIVE' | translate}}"
@@ -8,6 +9,7 @@
89
<mat-icon class="green">check_circle_outline</mat-icon>
910
</span>
1011
<span
12+
class="status-change"
1113
(click)="changeStatus()"
1214
*ngIf="status === 'INACTIVE'"
1315
matTooltip="{{'SHARED_LIB.PERUN.COMPONENTS.GROUP_RESOURCE_STATUS.INACTIVE' | translate}}"
@@ -16,13 +18,15 @@
1618
<mat-icon class="grey">block</mat-icon>
1719
</span>
1820
<span
21+
class="status-change"
1922
(click)="changeStatus()"
2023
*ngIf="status === 'FAILED'"
2124
matTooltip="{{'SHARED_LIB.PERUN.COMPONENTS.GROUP_RESOURCE_STATUS.FAILED' | translate}}: {{this.failureCause}}"
2225
matTooltipPosition="above">
2326
<mat-icon class="red">report</mat-icon>
2427
</span>
2528
<span
29+
class="status-change"
2630
*ngIf="status === 'PROCESSING'"
2731
matTooltip="{{'SHARED_LIB.PERUN.COMPONENTS.GROUP_RESOURCE_STATUS.PROCESSING' | translate}}"
2832
matTooltipPosition="above">

libs/perun/components/src/lib/groups-list/groups-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
<i
140140
*ngIf="{status: group.attributes | findAttribute: 'groupStatus'} as groupStatus"
141141
(click)="$event.stopPropagation()"
142-
class="material-icons {{groupStatus.status | groupStatusIconColor}} cursor-default"
142+
class="material-icons status-change {{groupStatus.status | groupStatusIconColor}} cursor-default"
143143
matTooltip="{{groupStatus.status}}"
144144
matTooltipClass="status-tooltip"
145145
matTooltipPosition="left">

libs/perun/components/src/lib/members-dynamic-list/members-dynamic-list.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<i
7474
(click)="openMembershipDialog($event, member)"
7575
[class.cursor-default]="!expireVoAuth"
76-
class="material-icons {{(member | memberStatusIconColor)}}"
76+
class="material-icons status-change {{(member | memberStatusIconColor)}}"
7777
matTooltip="{{member | memberStatusTooltip: false}}"
7878
matTooltipClass="status-tooltip"
7979
matTooltipPosition="left">
@@ -91,7 +91,7 @@
9191
<i
9292
(click)="openMembershipDialog($event, member, groupId)"
9393
[class.cursor-default]="!expireGroupAuth"
94-
class="material-icons {{member.groupStatus | groupStatusIconColor: member.membershipType === 'INDIRECT' : isMembersGroup}}"
94+
class="material-icons status-change {{member.groupStatus | groupStatusIconColor: member.membershipType === 'INDIRECT' : isMembersGroup}}"
9595
matTooltip="{{member | memberStatusTooltip: true: isMembersGroup}}"
9696
matTooltipClass="status-tooltip"
9797
matTooltipPosition="left">

libs/perun/components/src/lib/members-list/members-list.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<td *matCellDef="let member" mat-cell>
8484
<i
8585
(click)="changeStatus($event, member)"
86-
class="material-icons {{(member | memberStatusIconColor)}}"
86+
class="material-icons status-change {{(member | memberStatusIconColor)}}"
8787
matTooltip="{{member | memberStatusTooltip: false}}"
8888
matTooltipClass="status-tooltip"
8989
matTooltipPosition="left">
@@ -100,7 +100,7 @@
100100
<td *matCellDef="let member" mat-cell>
101101
<i
102102
(click)="changeStatus($event, member)"
103-
class="material-icons {{member.groupStatus | groupStatusIconColor}}"
103+
class="material-icons status-change {{member.groupStatus | groupStatusIconColor}}"
104104
matTooltip="{{member | memberStatusTooltip: true}}"
105105
matTooltipClass="status-tooltip"
106106
matTooltipPosition="left">

0 commit comments

Comments
 (0)