Skip to content

Commit 2bb7d93

Browse files
committed
update layout
1 parent 08be358 commit 2bb7d93

257 files changed

Lines changed: 9009 additions & 8470 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"description": "Description for correctExam",
66
"license": "UNLICENSED",
77
"scripts": {
8+
"migrate": "ng g @angular/core:control-flow",
89
"build": "node --max-old-space-size=4096 ./node_modules/@angular/cli/bin/ng build --prod",
910
"build-watch": "concurrently 'npm run webapp:build:dev -- --watch'",
1011
"ci:frontend:build": "npm run webapp:build:$npm_package_config_default_environment",

src/main/webapp/app/account/activate/activate.component.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
<div class="col-md-8">
44
<h1 [translate]="'activate.title'">Activation</h1>
55

6-
<div class="alert alert-success" *ngIf="success">
7-
<span [translate]="'activate.messages.success'"><strong>Your user account has been activated.</strong> Please </span>
8-
<a class="alert-link" routerLink="/login" [translate]="'global.messages.info.authenticated.link'">sign in</a>.
9-
</div>
6+
@if (success) {
7+
<div class="alert alert-success">
8+
<span [translate]="'activate.messages.success'"><strong>Your user account has been activated.</strong> Please </span>
9+
<a class="alert-link" routerLink="/login" [translate]="'global.messages.info.authenticated.link'">sign in</a>.
10+
</div>
11+
}
1012

11-
<div class="alert alert-danger" *ngIf="error" [translate]="'activate.messages.error'">
12-
<strong>Your user could not be activated.</strong> Please use the registration form to sign up.
13-
</div>
13+
@if (error) {
14+
<div class="alert alert-danger" [translate]="'activate.messages.error'">
15+
<strong>Your user could not be activated.</strong> Please use the registration form to sign up.
16+
</div>
17+
}
1418
</div>
1519
</div>
1620
</div>

src/main/webapp/app/account/activate/activate.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import { ActivatedRoute, RouterLink } from '@angular/router';
33
import { mergeMap } from 'rxjs/operators';
44

55
import { ActivateService } from './activate.service';
6-
import { NgIf } from '@angular/common';
76

87
@Component({
98
selector: 'jhi-activate',
109
templateUrl: './activate.component.html',
1110
standalone: true,
12-
imports: [NgIf, RouterLink],
11+
imports: [RouterLink],
1312
})
1413
export class ActivateComponent implements OnInit {
1514
error = false;

src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html

Lines changed: 109 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -3,135 +3,126 @@
33
<div class="col-md-4">
44
<h1 [translate]="'reset.finish.title'">Reset password</h1>
55

6-
<div class="alert alert-danger" [translate]="'reset.finish.messages.keymissing'" *ngIf="initialized && !key">
7-
<strong>The password reset key is missing.</strong>
8-
</div>
6+
@if (initialized && !key) {
7+
<div class="alert alert-danger" [translate]="'reset.finish.messages.keymissing'">
8+
<strong>The password reset key is missing.</strong>
9+
</div>
10+
}
911

10-
<div class="alert alert-warning" *ngIf="key && !success">
11-
<span [translate]="'reset.finish.messages.info'">Choose a new password</span>
12-
</div>
12+
@if (key && !success) {
13+
<div class="alert alert-warning">
14+
<span [translate]="'reset.finish.messages.info'">Choose a new password</span>
15+
</div>
16+
}
1317

14-
<div class="alert alert-danger" *ngIf="error">
15-
<span [translate]="'reset.finish.messages.error'"
16-
>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span
17-
>
18-
</div>
19-
20-
<div class="alert alert-success" *ngIf="success">
21-
<span [translate]="'reset.finish.messages.success'"><strong>Your password has been reset.</strong> Please </span>
22-
<a class="alert-link" routerLink="/login" [translate]="'global.messages.info.authenticated.link'">sign in</a>.
23-
</div>
18+
@if (error) {
19+
<div class="alert alert-danger">
20+
<span [translate]="'reset.finish.messages.error'"
21+
>Your password couldn't be reset. Remember a password request is only valid for 24 hours.</span
22+
>
23+
</div>
24+
}
2425

25-
<div class="alert alert-danger" *ngIf="doNotMatch" [translate]="'global.messages.error.dontmatch'">
26-
The password and its confirmation do not match!
27-
</div>
26+
@if (success) {
27+
<div class="alert alert-success">
28+
<span [translate]="'reset.finish.messages.success'"><strong>Your password has been reset.</strong> Please </span>
29+
<a class="alert-link" routerLink="/login" [translate]="'global.messages.info.authenticated.link'">sign in</a>.
30+
</div>
31+
}
2832

29-
<div *ngIf="key && !success">
30-
<form name="form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm">
31-
<div class="mb-3">
32-
<label class="form-label" for="newPassword" [translate]="'global.form.newpassword.label'">New password</label>
33-
<input
34-
type="password"
35-
class="form-control"
36-
id="newPassword"
37-
name="newPassword"
38-
placeholder="{{ 'global.form.newpassword.placeholder' | translate }}"
39-
formControlName="newPassword"
40-
data-cy="resetPassword"
41-
#newPassword
42-
/>
33+
@if (doNotMatch) {
34+
<div class="alert alert-danger" [translate]="'global.messages.error.dontmatch'">
35+
The password and its confirmation do not match!
36+
</div>
37+
}
4338

44-
<div
45-
*ngIf="
39+
@if (key && !success) {
40+
<div>
41+
<form name="form" role="form" (ngSubmit)="finishReset()" [formGroup]="passwordForm">
42+
<div class="mb-3">
43+
<label class="form-label" for="newPassword" [translate]="'global.form.newpassword.label'">New password</label>
44+
<input
45+
type="password"
46+
class="form-control"
47+
id="newPassword"
48+
name="newPassword"
49+
placeholder="{{ 'global.form.newpassword.placeholder' | translate }}"
50+
formControlName="newPassword"
51+
data-cy="resetPassword"
52+
#newPassword
53+
/>
54+
@if (
4655
passwordForm.get('newPassword')!.invalid &&
4756
(passwordForm.get('newPassword')!.dirty || passwordForm.get('newPassword')!.touched)
48-
"
49-
>
50-
<small
51-
class="form-text text-danger"
52-
*ngIf="passwordForm.get('newPassword')?.errors?.required"
53-
[translate]="'global.messages.validate.newpassword.required'"
54-
>
55-
Your password is required.
56-
</small>
57-
58-
<small
59-
class="form-text text-danger"
60-
*ngIf="passwordForm.get('newPassword')?.errors?.minlength"
61-
[translate]="'global.messages.validate.newpassword.minlength'"
62-
>
63-
Your password is required to be at least 4 characters.
64-
</small>
65-
66-
<small
67-
class="form-text text-danger"
68-
*ngIf="passwordForm.get('newPassword')?.errors?.maxlength"
69-
[translate]="'global.messages.validate.newpassword.maxlength'"
70-
>
71-
Your password cannot be longer than 50 characters.
72-
</small>
57+
) {
58+
<div>
59+
@if (passwordForm.get('newPassword')?.errors?.required) {
60+
<small class="form-text text-danger" [translate]="'global.messages.validate.newpassword.required'">
61+
Your password is required.
62+
</small>
63+
}
64+
@if (passwordForm.get('newPassword')?.errors?.minlength) {
65+
<small class="form-text text-danger" [translate]="'global.messages.validate.newpassword.minlength'">
66+
Your password is required to be at least 4 characters.
67+
</small>
68+
}
69+
@if (passwordForm.get('newPassword')?.errors?.maxlength) {
70+
<small class="form-text text-danger" [translate]="'global.messages.validate.newpassword.maxlength'">
71+
Your password cannot be longer than 50 characters.
72+
</small>
73+
}
74+
</div>
75+
}
76+
<jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar>
7377
</div>
74-
75-
<jhi-password-strength-bar [passwordToCheck]="passwordForm.get('newPassword')!.value"></jhi-password-strength-bar>
76-
</div>
77-
78-
<div class="mb-3">
79-
<label class="form-label" for="confirmPassword" [translate]="'global.form.confirmpassword.label'"
80-
>New password confirmation</label
81-
>
82-
<input
83-
type="password"
84-
class="form-control"
85-
id="confirmPassword"
86-
name="confirmPassword"
87-
placeholder="{{ 'global.form.confirmpassword.placeholder' | translate }}"
88-
formControlName="confirmPassword"
89-
data-cy="confirmResetPassword"
90-
/>
91-
92-
<div
93-
*ngIf="
78+
<div class="mb-3">
79+
<label class="form-label" for="confirmPassword" [translate]="'global.form.confirmpassword.label'"
80+
>New password confirmation</label
81+
>
82+
<input
83+
type="password"
84+
class="form-control"
85+
id="confirmPassword"
86+
name="confirmPassword"
87+
placeholder="{{ 'global.form.confirmpassword.placeholder' | translate }}"
88+
formControlName="confirmPassword"
89+
data-cy="confirmResetPassword"
90+
/>
91+
@if (
9492
passwordForm.get('confirmPassword')!.invalid &&
9593
(passwordForm.get('confirmPassword')!.dirty || passwordForm.get('confirmPassword')!.touched)
96-
"
97-
>
98-
<small
99-
class="form-text text-danger"
100-
*ngIf="passwordForm.get('confirmPassword')?.errors?.required"
101-
[translate]="'global.messages.validate.confirmpassword.required'"
102-
>
103-
Your password confirmation is required.
104-
</small>
105-
106-
<small
107-
class="form-text text-danger"
108-
*ngIf="passwordForm.get('confirmPassword')?.errors?.minlength"
109-
[translate]="'global.messages.validate.confirmpassword.minlength'"
110-
>
111-
Your password confirmation is required to be at least 4 characters.
112-
</small>
113-
114-
<small
115-
class="form-text text-danger"
116-
*ngIf="passwordForm.get('confirmPassword')?.errors?.maxlength"
117-
[translate]="'global.messages.validate.confirmpassword.maxlength'"
118-
>
119-
Your password confirmation cannot be longer than 50 characters.
120-
</small>
94+
) {
95+
<div>
96+
@if (passwordForm.get('confirmPassword')?.errors?.required) {
97+
<small class="form-text text-danger" [translate]="'global.messages.validate.confirmpassword.required'">
98+
Your password confirmation is required.
99+
</small>
100+
}
101+
@if (passwordForm.get('confirmPassword')?.errors?.minlength) {
102+
<small class="form-text text-danger" [translate]="'global.messages.validate.confirmpassword.minlength'">
103+
Your password confirmation is required to be at least 4 characters.
104+
</small>
105+
}
106+
@if (passwordForm.get('confirmPassword')?.errors?.maxlength) {
107+
<small class="form-text text-danger" [translate]="'global.messages.validate.confirmpassword.maxlength'">
108+
Your password confirmation cannot be longer than 50 characters.
109+
</small>
110+
}
111+
</div>
112+
}
121113
</div>
122-
</div>
123-
124-
<button
125-
type="submit"
126-
[disabled]="passwordForm.invalid"
127-
class="btn btn-primary"
128-
[translate]="'reset.finish.form.button'"
129-
data-cy="submit"
130-
>
131-
Reset Password
132-
</button>
133-
</form>
134-
</div>
114+
<button
115+
type="submit"
116+
[disabled]="passwordForm.invalid"
117+
class="btn btn-primary"
118+
[translate]="'reset.finish.form.button'"
119+
data-cy="submit"
120+
>
121+
Reset Password
122+
</button>
123+
</form>
124+
</div>
125+
}
135126
</div>
136127
</div>
137128
</div>

src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ import { ActivatedRoute, RouterLink } from '@angular/router';
55
import { PasswordResetFinishService } from './password-reset-finish.service';
66
import { TranslateDirective, TranslatePipe } from '@ngx-translate/core';
77
import { PasswordStrengthBarComponent } from '../../password/password-strength-bar/password-strength-bar.component';
8-
import { NgIf } from '@angular/common';
98

109
@Component({
1110
selector: 'jhi-password-reset-finish',
1211
templateUrl: './password-reset-finish.component.html',
1312
standalone: true,
14-
imports: [NgIf, RouterLink, FormsModule, ReactiveFormsModule, PasswordStrengthBarComponent, TranslateDirective, TranslatePipe],
13+
imports: [RouterLink, FormsModule, ReactiveFormsModule, PasswordStrengthBarComponent, TranslateDirective, TranslatePipe],
1514
})
1615
export class PasswordResetFinishComponent implements OnInit, AfterViewInit {
1716
@ViewChild('newPassword', { static: false })

0 commit comments

Comments
 (0)