Skip to content

Commit e845a45

Browse files
Enhance profile layout: Single-row box layout for user details (#2664)
1 parent f55883b commit e845a45

File tree

2 files changed

+94
-46
lines changed

2 files changed

+94
-46
lines changed

src/app/profile/profile.component.html

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,63 @@
11
<div class="container m-b-10 layout-row layout-lt-md-column align-end gap-1percent">
2-
<button mat-raised-button color="primary" [routerLink]="['/system', 'roles-and-permissions']">
2+
<button mat-raised-button color="primary" class="m-r-10" [routerLink]="['/system', 'roles-and-permissions']">
33
<fa-icon icon="check" class="m-r-10"></fa-icon>
44
{{ 'labels.buttons.Permissions' | translate }}
55
</button>
6-
<button mat-raised-button color="primary" (click)="changeUserPassword()">
6+
<button mat-raised-button color="primary" class="m-r-10" (click)="changeUserPassword()">
77
<fa-icon icon="cog" class="m-r-10"></fa-icon>
88
{{ 'labels.buttons.Change Password' | translate }}
99
</button>
1010
</div>
1111
<div class="container layout-column gap-1percent">
1212
<mat-card>
1313
<div class="layout-row-wrap">
14-
<div class="flex-50 header">
15-
{{ 'labels.inputs.Tenant Id' | translate }}
14+
<div class="info-box">
15+
<div class="header">
16+
{{ 'labels.inputs.Tenant Id' | translate }}
17+
</div>
18+
<div>
19+
{{ tenantIdentifier }}
20+
</div>
1621
</div>
17-
<div class="flex-50">
18-
{{ tenantIdentifier }}
22+
<div class="info-box">
23+
<div class="header">
24+
{{ 'labels.inputs.User Id' | translate }}
25+
</div>
26+
<div>
27+
{{ profileData.userId }}
28+
</div>
1929
</div>
20-
<div class="flex-50 header">
21-
{{ 'labels.inputs.User Id' | translate }}
30+
<div class="info-box">
31+
<div class="header">
32+
{{ 'labels.inputs.User Name' | translate }}
33+
</div>
34+
<div>
35+
{{ profileData.username }}
36+
</div>
2237
</div>
23-
<div class="flex-50">
24-
{{ profileData.userId }}
38+
<div class="info-box">
39+
<div class="header">
40+
{{ 'labels.inputs.Office' | translate }}
41+
</div>
42+
<div>
43+
{{ profileData.officeName }}
44+
</div>
2545
</div>
26-
<div class="flex-50 header">
27-
{{ 'labels.inputs.User Name' | translate }}
46+
<div class="info-box">
47+
<div class="header">
48+
{{ 'labels.inputs.Status' | translate }}
49+
</div>
50+
<div>
51+
{{ profileData.authenticated ? 'Authenticated' : 'Not Authenticated' }}
52+
</div>
2853
</div>
29-
<div class="flex-50">
30-
{{ profileData.username }}
31-
</div>
32-
<div class="flex-50 header">
33-
{{ 'labels.inputs.Office' | translate }}
34-
</div>
35-
<div class="flex-50">
36-
{{ profileData.officeName }}
37-
</div>
38-
<div class="flex-50 header">
39-
{{ 'labels.inputs.Status' | translate }}
40-
</div>
41-
<div class="flex-50">
42-
{{ profileData.authenticated ? 'Authenticated' : 'Not Authenticated' }}
43-
</div>
44-
<div class="flex-50 header">
45-
{{ 'labels.inputs.Language' | translate }}
46-
</div>
47-
<div class="flex-50">
48-
{{ language }}
54+
<div class="info-box">
55+
<div class="header">
56+
{{ 'labels.inputs.Language' | translate }}
57+
</div>
58+
<div>
59+
{{ language }}
60+
</div>
4961
</div>
5062
</div>
5163
</mat-card>
Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
.container {
22
max-width: 37rem;
3-
padding: 0.5rem;
3+
padding: 1rem;
44

55
mat-card {
66
margin-bottom: 1rem;
7-
padding: 1rem;
7+
padding: 1.5rem;
88
box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
9+
border: 1px solid #ddd;
10+
border-radius: 6px;
911

1012
.layout-row-wrap {
11-
padding: 0.5rem 0;
13+
display: grid;
14+
grid-template-columns: 50% 50%;
15+
gap: 1rem;
16+
17+
.info-box {
18+
display: flex;
19+
flex-direction: column;
20+
padding: 0.75rem;
21+
border: 1px solid #ddd;
22+
border-radius: 6px;
23+
background-color: #fff;
24+
25+
.header {
26+
font-weight: 600;
27+
margin-bottom: 0.5rem;
28+
font-size: 1.1rem;
29+
}
30+
}
1231
}
1332
}
1433

@@ -18,29 +37,46 @@
1837
word-wrap: break-word;
1938

2039
&.header {
21-
font-weight: 500;
40+
font-weight: 600;
2241
margin-bottom: 0.5rem;
42+
font-size: 1.1rem;
2343
}
2444
}
2545
}
2646

2747
table {
2848
width: 100%;
2949
margin-top: 1rem;
50+
border-collapse: collapse;
51+
52+
th {
53+
font-weight: 600;
54+
text-align: left;
55+
}
56+
57+
td {
58+
padding: 0.75rem;
59+
border: 1px solid #ddd;
60+
}
61+
62+
tr:hover {
63+
background-color: #f9f9f9;
64+
}
3065
}
3166
}
3267

68+
.container table th,
69+
.container table td {
70+
border-top: 1px solid rgb(0 0 0 / 12%);
71+
}
72+
73+
th.mat-header-cell:not(:first-of-type),
74+
td.mat-cell:not(:first-of-type) {
75+
border-left: 1px solid rgb(0 0 0 / 12%);
76+
}
77+
3378
.mat-elevation-z1 {
3479
margin: 0.5rem 0;
3580
box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
36-
37-
th,
38-
td {
39-
border-top: 1px solid rgb(0 0 0 / 12%);
40-
}
41-
42-
th.mat-header-cell:not(:first-of-type),
43-
td.mat-cell:not(:first-of-type) {
44-
border-left: 1px solid rgb(0 0 0 / 12%);
45-
}
81+
border-radius: 6px;
4682
}

0 commit comments

Comments
 (0)