Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 1.1.0 #405

Merged
merged 5 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.1.0
18 changes: 17 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# CHANGELOG

## 1.0.0 (2024-03-18)
## 1.1.0 - 2024-04-06

### Main new features

* New backoffice views to manage site module data (#402 by @hypsug0)
* Some new github actions (by @hypsug0)

### Fixes

* Fix send email on registration (#396 by @PNPyrenees)
* Standardizing date formatting (#401 by @hypsug0)
* Fix new obs pointer not customizable (#400 by @hypsug0)
* Improve english translations (by @hypsug0)
* Docs and changelog improvements (by @camillemonchicourt)
* Fix invalid password check on password with some special characters (by @hypsug0)

## 1.0.0 - 2024-03-18

### Main new features

Expand Down
29 changes: 18 additions & 11 deletions frontend/src/app/auth/register/register.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h4 i18n="Create account@@register">Créez votre compte</h4>
i18n-placeholder="Your email input placeholder label@@yourEmailInputPlaceholder"
placeholder="Entrez votre email" [(ngModel)]="user.email" #email="ngModel"
autocomplete="email" [ngModelOptions]="{ updateOn: 'blur' }" required
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])?)*$" />
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" />
</div>
</div>
</div>
Expand All @@ -76,12 +76,15 @@ <h4 i18n="Create account@@register">Créez votre compte</h4>
</div>
</div>
</div>
<ngb-alert [dismissible]="false" type="danger" *ngIf="
confirm_password.errors &&
confirm_password.dirty &&
password.dirty
" i18n="Different password error@@ErrorDifferentPasswords">
Les mots de passe diffèrent.
<ngb-alert [dismissible]="false" type="danger" *ngIf="password.value &&
(password.invalid || (password.valid && confirmPassword.errors?.pattern))">
<div *ngIf="password.invalid" i18n="Strong password required@@ErrorPasswordNotEnoughStrong">
Doit contenir au moins un chiffre et une lettre majuscule et minuscule, et au moins 8 caractères.
</div>
<div *ngIf="password.valid && confirmPassword.errors?.pattern"
i18n="Different password error@@ErrorDifferentPasswords">
Les mots de passe diffèrent.
</div>
</ngb-alert>
<div class="form-row">
<div class="col-md-6 col-sm-12">
Expand All @@ -90,17 +93,21 @@ <h4 i18n="Create account@@register">Créez votre compte</h4>
<input type="password" class="form-control rounded-0" id="password"
i18n-placeholder="Your password input@@yourPasswordInput" placeholder="Votre mot de passe"
[(ngModel)]="user.password" name="password" #password="ngModel" autocomplete="new-password"
required />
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" required />
</div>
</div>
<div class="col-md-6 col-sm-12">
<div class="form-group">
<label for="confirm-password" i18n>Confirmez votre mot de passe</label>
<input type="password" id="confirm-password" name="confirm-password" class="form-control rounded-0"
ngModel #confirm_password="ngModel"
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control rounded-0"
ngModel #confirmPassword="ngModel"
i18n-placeholder="Your confirm password input@@yourPasswordConfirmInput"
placeholder="Confirmez le mot de passe" autocomplete="new-password" required
[ngModelOptions]="{ updateOn: 'blur' }" pattern="^{{ password.value }}$" />
[ngModelOptions]="{ updateOn: 'blur' }" pattern="{{ password.value }}" />
<div class="invalid-feedback">
Please provide a valid city.
</div>

</div>
</div>
<span>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/app/auth/register/register.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, Inject, LOCALE_ID } from '@angular/core';
import { Router } from '@angular/router';
import { Subject, throwError } from 'rxjs';
import { debounceTime, catchError, map } from 'rxjs/operators';

import { Observable } from 'rxjs';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';

import { RegisterUser } from '../models';
Expand Down Expand Up @@ -80,7 +80,7 @@ export class RegisterComponent {
);
}

handleError(error) {
handleError(error): Observable<never> {
let errorMessage = '';
if (error.error instanceof ErrorEvent) {
console.error('client-side error');
Expand All @@ -101,15 +101,15 @@ export class RegisterComponent {
return throwError(errorMessage);
}

displayErrorMessage(message) {
displayErrorMessage(message: string): void {
this._error.next(message);
}

displaySuccessMessage(message) {
displaySuccessMessage(message: string): void {
this._success.next(message);
}

onUploadAvatar($event) {
onUploadAvatar($event): void {
if ($event) {
if ($event.target.files && $event.target.files[0]) {
const file = $event.target.files[0];
Expand Down Expand Up @@ -159,7 +159,7 @@ export class RegisterComponent {
}
}

loadCaptchaScript() {
loadCaptchaScript(): void {
if (!MainConfig.HCAPTCHA_SITE_KEY) {
return;
}
Expand All @@ -179,15 +179,15 @@ export class RegisterComponent {
}
}

resetCaptcha() {
resetCaptcha(): void {
if (window.hcaptcha === null) {
return;
}
this.user.captchaToken = null;
window.hcaptcha.reset();
}

renderCaptcha() {
renderCaptcha(): void {
if (window.hcaptcha === null) {
return;
}
Expand All @@ -197,7 +197,7 @@ export class RegisterComponent {
});
}

captchaCallback(token) {
captchaCallback(token): void {
this.user.captchaToken = token;
}
}
Loading