Skip to content

Commit 68469ff

Browse files
authored
Merge pull request #405 from PnX-SI/dev
Prepare 1.1.0
2 parents a1cec5b + 192ad3b commit 68469ff

8 files changed

Lines changed: 1456 additions & 1329 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
1.1.0

docs/CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# CHANGELOG
22

3-
## 1.0.0 (2024-03-18)
3+
## 1.1.0 - 2024-04-06
4+
5+
### Main new features
6+
7+
* New backoffice views to manage site module data (#402 by @hypsug0)
8+
* Some new github actions (by @hypsug0)
9+
10+
### Fixes
11+
12+
* Fix send email on registration (#396 by @PNPyrenees)
13+
* Standardizing date formatting (#401 by @hypsug0)
14+
* Fix new obs pointer not customizable (#400 by @hypsug0)
15+
* Improve english translations (by @hypsug0)
16+
* Docs and changelog improvements (by @camillemonchicourt)
17+
* Fix invalid password check on password with some special characters (by @hypsug0)
18+
19+
## 1.0.0 - 2024-03-18
420

521
### Main new features
622

frontend/src/app/auth/register/register.component.html

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h4 i18n="Create account@@register">Créez votre compte</h4>
5353
i18n-placeholder="Your email input placeholder label@@yourEmailInputPlaceholder"
5454
placeholder="Entrez votre email" [(ngModel)]="user.email" #email="ngModel"
5555
autocomplete="email" [ngModelOptions]="{ updateOn: 'blur' }" required
56-
pattern="^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" />
56+
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" />
5757
</div>
5858
</div>
5959
</div>
@@ -76,12 +76,15 @@ <h4 i18n="Create account@@register">Créez votre compte</h4>
7676
</div>
7777
</div>
7878
</div>
79-
<ngb-alert [dismissible]="false" type="danger" *ngIf="
80-
confirm_password.errors &&
81-
confirm_password.dirty &&
82-
password.dirty
83-
" i18n="Different password error@@ErrorDifferentPasswords">
84-
Les mots de passe diffèrent.
79+
<ngb-alert [dismissible]="false" type="danger" *ngIf="password.value &&
80+
(password.invalid || (password.valid && confirmPassword.errors?.pattern))">
81+
<div *ngIf="password.invalid" i18n="Strong password required@@ErrorPasswordNotEnoughStrong">
82+
Doit contenir au moins un chiffre et une lettre majuscule et minuscule, et au moins 8 caractères.
83+
</div>
84+
<div *ngIf="password.valid && confirmPassword.errors?.pattern"
85+
i18n="Different password error@@ErrorDifferentPasswords">
86+
Les mots de passe diffèrent.
87+
</div>
8588
</ngb-alert>
8689
<div class="form-row">
8790
<div class="col-md-6 col-sm-12">
@@ -90,17 +93,21 @@ <h4 i18n="Create account@@register">Créez votre compte</h4>
9093
<input type="password" class="form-control rounded-0" id="password"
9194
i18n-placeholder="Your password input@@yourPasswordInput" placeholder="Votre mot de passe"
9295
[(ngModel)]="user.password" name="password" #password="ngModel" autocomplete="new-password"
93-
required />
96+
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" required />
9497
</div>
9598
</div>
9699
<div class="col-md-6 col-sm-12">
97100
<div class="form-group">
98101
<label for="confirm-password" i18n>Confirmez votre mot de passe</label>
99-
<input type="password" id="confirm-password" name="confirm-password" class="form-control rounded-0"
100-
ngModel #confirm_password="ngModel"
102+
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control rounded-0"
103+
ngModel #confirmPassword="ngModel"
101104
i18n-placeholder="Your confirm password input@@yourPasswordConfirmInput"
102105
placeholder="Confirmez le mot de passe" autocomplete="new-password" required
103-
[ngModelOptions]="{ updateOn: 'blur' }" pattern="^{{ password.value }}$" />
106+
[ngModelOptions]="{ updateOn: 'blur' }" pattern="{{ password.value }}" />
107+
<div class="invalid-feedback">
108+
Please provide a valid city.
109+
</div>
110+
104111
</div>
105112
</div>
106113
<span>

frontend/src/app/auth/register/register.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, Inject, LOCALE_ID } from '@angular/core';
22
import { Router } from '@angular/router';
33
import { Subject, throwError } from 'rxjs';
44
import { debounceTime, catchError, map } from 'rxjs/operators';
5-
5+
import { Observable } from 'rxjs';
66
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
77

88
import { RegisterUser } from '../models';
@@ -80,7 +80,7 @@ export class RegisterComponent {
8080
);
8181
}
8282

83-
handleError(error) {
83+
handleError(error): Observable<never> {
8484
let errorMessage = '';
8585
if (error.error instanceof ErrorEvent) {
8686
console.error('client-side error');
@@ -101,15 +101,15 @@ export class RegisterComponent {
101101
return throwError(errorMessage);
102102
}
103103

104-
displayErrorMessage(message) {
104+
displayErrorMessage(message: string): void {
105105
this._error.next(message);
106106
}
107107

108-
displaySuccessMessage(message) {
108+
displaySuccessMessage(message: string): void {
109109
this._success.next(message);
110110
}
111111

112-
onUploadAvatar($event) {
112+
onUploadAvatar($event): void {
113113
if ($event) {
114114
if ($event.target.files && $event.target.files[0]) {
115115
const file = $event.target.files[0];
@@ -159,7 +159,7 @@ export class RegisterComponent {
159159
}
160160
}
161161

162-
loadCaptchaScript() {
162+
loadCaptchaScript(): void {
163163
if (!MainConfig.HCAPTCHA_SITE_KEY) {
164164
return;
165165
}
@@ -179,15 +179,15 @@ export class RegisterComponent {
179179
}
180180
}
181181

182-
resetCaptcha() {
182+
resetCaptcha(): void {
183183
if (window.hcaptcha === null) {
184184
return;
185185
}
186186
this.user.captchaToken = null;
187187
window.hcaptcha.reset();
188188
}
189189

190-
renderCaptcha() {
190+
renderCaptcha(): void {
191191
if (window.hcaptcha === null) {
192192
return;
193193
}
@@ -197,7 +197,7 @@ export class RegisterComponent {
197197
});
198198
}
199199

200-
captchaCallback(token) {
200+
captchaCallback(token): void {
201201
this.user.captchaToken = token;
202202
}
203203
}

0 commit comments

Comments
 (0)