Skip to content

Commit 4174624

Browse files
Mutugiiidogi
andauthored
login: smoother profile form aligning (fixes #9944) (#9945)
Co-authored-by: dogi <dogi@users.noreply.github.com>
1 parent 04552f3 commit 4174624

3 files changed

Lines changed: 36 additions & 15 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "planet",
33
"license": "AGPL-3.0",
4-
"version": "0.22.88",
4+
"version": "0.22.89",
55
"myplanet": {
66
"latest": "v0.55.91",
77
"min": "v0.53.91"

src/app/users/users-update/users-update.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@
133133
</div>
134134
</form>
135135
</div>
136-
<div *ngIf="!submissionMode">
137-
<div style="text-align: center;">
136+
<div *ngIf="!submissionMode" class="profile-image-column">
137+
<div class="profile-image-content">
138138
<img *ngIf="showImagePreview" class="profile-image-update" [src]="previewSrc"><br>
139139
<div class="action-buttons">
140140
<button mat-raised-button color="secondary" (click)="fileInput.click()"><span i18n>Choose Image</span></button>

src/app/users/users-update/users-update.scss

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
@use '../../variables' as v;
22

3+
@mixin form-grid($columns) {
4+
display: grid;
5+
grid-template-columns: repeat($columns, minmax(0, 1fr));
6+
gap: 1rem;
7+
8+
mat-form-field {
9+
width: 100%;
10+
}
11+
}
12+
313
.view-container {
414
display: flex;
515
flex-wrap: wrap;
@@ -28,26 +38,17 @@
2838

2939
.profile-names {
3040
grid-area: form-names;
31-
32-
mat-form-field {
33-
margin-right: 1rem;
34-
}
41+
@include form-grid(3);
3542
}
3643

3744
.profile-contacts {
3845
grid-area: form-contacts;
39-
40-
mat-form-field {
41-
margin-right: 1rem;
42-
}
46+
@include form-grid(3);
4347
}
4448

4549
.profile-dropdowns {
4650
grid-area: form-dropdowns;
47-
48-
mat-form-field {
49-
margin-right: 1rem;
50-
}
51+
@include form-grid(2);
5152
}
5253

5354
.radio-group {
@@ -61,6 +62,16 @@
6162
justify-content: center;
6263
}
6364

65+
.profile-image-column {
66+
flex: 1;
67+
justify-content: center;
68+
padding: 1rem;
69+
}
70+
71+
.profile-image-content {
72+
text-align: center;
73+
}
74+
6475
.profile-image-section {
6576
display: grid;
6677
grid-template-columns: 1fr 2fr;
@@ -82,6 +93,10 @@
8293
}
8394

8495
@media (max-width: v.$screen-sm) {
96+
.profile-names, .profile-contacts, .profile-dropdowns, .radio-group {
97+
grid-template-columns: 1fr;
98+
}
99+
85100
.profile-image-section{
86101
display: flex;
87102
flex-direction: column;
@@ -91,3 +106,9 @@
91106
margin-top: 1rem;
92107
}
93108
}
109+
110+
@media (min-width: calc(#{v.$screen-sm} + 1px)) and (max-width: v.$screen-md) {
111+
.profile-names, .profile-contacts, .profile-dropdowns {
112+
grid-template-columns: repeat(2, minmax(0, 1fr));
113+
}
114+
}

0 commit comments

Comments
 (0)