You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2026/06/03 06:16:29 UTC
(streampipes) branch dev updated: fix: Form fields and translations in profile dialogs (#4521)
This is an automated email from the ASF dual-hosted git repository.
dominikriemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new a5b9067d70 fix: Form fields and translations in profile dialogs (#4521)
a5b9067d70 is described below
commit a5b9067d705af0d64f2e2778a2b00176fd3c8522
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Wed Jun 3 08:16:22 2026 +0200
fix: Form fields and translations in profile dialogs (#4521)
---
ui/deployment/i18n/de.json | 11 ++
ui/deployment/i18n/en.json | 11 ++
ui/deployment/i18n/pl.json | 11 ++
.../change-email-dialog.component.html | 121 ++++++++++++---------
.../change-email/change-email-dialog.component.ts | 15 ++-
.../change-password-dialog.component.html | 116 ++++++++++++--------
.../change-password-dialog.component.ts | 16 ++-
7 files changed, 198 insertions(+), 103 deletions(-)
diff --git a/ui/deployment/i18n/de.json b/ui/deployment/i18n/de.json
index 34c7c30c5b..2170fea755 100644
--- a/ui/deployment/i18n/de.json
+++ b/ui/deployment/i18n/de.json
@@ -220,6 +220,7 @@
"Configure labels which can be assigned to assets and other resources": "Labels konfigurieren, die Assets und anderen Ressourcen zugewiesen werden können",
"Configure schema": "Schema konfigurieren",
"Configure trusted and rejected OPC-UA certificates": "Konfiguration der vertrauenswürdigen und abgelehnten OPC-UA Zertifikate",
+ "Confirm password": "Passwort bestätigen",
"Connect Adapter": "Adapter anschließen",
"Connection could not be established.": "Die Verbindung konnte nicht hergestellt werden.",
"Connection was established and test file was successfully saved:": "Die Verbindung wurde hergestellt und die Testdatei wurde erfolgreich gespeichert:",
@@ -228,6 +229,8 @@
"Converts the field value from the given measurement unit to the provided target unit": "Konvertiert den Feldwert von einer Messeinheit in die angegebene",
"Copy": "Kopieren",
"Copyright notice": "Copyright-Hinweis",
+ "Could not change email address.": "Die E-Mail-Adresse konnte nicht geändert werden.",
+ "Could not change the password.": "Das Passwort konnte nicht geändert werden.",
"Could not send email": "E-Mail konnte nicht versendet werden",
"Could not upload file": "Datei konnte nicht hochgeladen werden",
"Count": "Anzahl",
@@ -255,6 +258,7 @@
"Current day": "Aktueller Tag",
"Current hour": "Aktuelle Stunde",
"Current month": "Aktueller Monat",
+ "Current password": "Aktuelles Passwort",
"Current week": "Aktuelle Woche",
"Current year": "Aktuelles Jahr",
"Currently configured query": "Aktuell konfigurierte Anfrage",
@@ -377,6 +381,7 @@
"Email ": "E-Mail",
"Email Template Configuration": "Konfiguration der E-Mail-Vorlage",
"Email custom inner content (mandatory)": "Benutzerdefinierter E-Mail-Inhalt (erforderlich)",
+ "Email does not match.": "Die E-Mail-Adressen stimmen nicht überein.",
"Email preheader": "E-Mail Pre-Header",
"Email title": "E-Mail-Titel",
"Enable": "Aktivieren",
@@ -397,6 +402,7 @@
"Enter Region Name": "Name der Region eingeben",
"Enter Secret Key": "Secret Key eingeben",
"Enter new alternate ID": "Neue alternative ID eingeben",
+ "Enter password": "Passwort eingeben",
"Enter your mail address and we'll send you a link to restore your password.": "Geben Sie Ihre E-Mail-Adresse ein und wir senden Ihnen einen Link, mit dem Sie Ihr Passwort wiederherstellen können.",
"Error": "Fehler",
"Error Details": "Fehler-Details",
@@ -675,6 +681,7 @@
"New chart": "Neues Diagramm",
"New dashboard": "Neues Dashboard",
"New dashboard title": "Neuer Dashboard-Titel",
+ "New mail address": "Neue E-Mail-Adresse",
"New password": "Neues Passwort",
"New site": "Neuer Standort",
"Newest (descending)": "Neueste zuerst (absteigend)",
@@ -736,6 +743,7 @@
"Password ": "Passwort",
"Password changed": "Passwort geändert",
"Passwords do not match.": "Die Passwörter stimmen nicht überein.",
+ "Passwords does not match.": "Die Passwörter stimmen nicht überein.",
"Path": "Pfad",
"Percent": "Prozent",
"Persist events": "Daten speichern",
@@ -793,6 +801,7 @@
"Query": "Abfrage",
"Quick Selection": "Schnellauswahl",
"Raw": "Rohdaten",
+ "Re-enter mail address": "E-Mail-Adresse erneut eingeben",
"Recipient for test mail": "Empfänger für Test-Mail",
"Reduce event rate": "Datenrate reduzieren",
"Refresh": "Neu laden",
@@ -1102,6 +1111,7 @@
"Truncate data": "Daten leeren",
"Truncating data...": "Daten leeren...",
"Trust": "Vertrauen",
+ "Try again": "Erneut versuchen",
"Trying to send test mail...": "Test-Mail wird versendet...",
"Type": "Typ",
"Typography": "Typografie",
@@ -1122,6 +1132,7 @@
"Update all changes to dashboard charts or discard current changes.": "Aktualisieren Sie alle Änderungen der Diagramme oder verwerfen Sie aktuelle Änderungen.",
"Update asset links": "Asset-Links aktualisieren",
"Update asset links or close.": "Asset-Links aktualisieren oder schließen.",
+ "Update email": "E-Mail aktualisieren",
"Update link": "Link aktualisieren",
"Update links": "Links aktualisieren",
"Update pipeline": "Pipeline aktualisieren",
diff --git a/ui/deployment/i18n/en.json b/ui/deployment/i18n/en.json
index 0d2e5adde0..e8f50f39fa 100644
--- a/ui/deployment/i18n/en.json
+++ b/ui/deployment/i18n/en.json
@@ -220,6 +220,7 @@
"Configure labels which can be assigned to assets and other resources": null,
"Configure schema": null,
"Configure trusted and rejected OPC-UA certificates": null,
+ "Confirm password": null,
"Connect Adapter": null,
"Connection could not be established.": null,
"Connection was established and test file was successfully saved:": null,
@@ -228,6 +229,8 @@
"Converts the field value from the given measurement unit to the provided target unit": null,
"Copy": null,
"Copyright notice": null,
+ "Could not change email address.": null,
+ "Could not change the password.": null,
"Could not send email": null,
"Could not upload file": null,
"Count": null,
@@ -255,6 +258,7 @@
"Current day": null,
"Current hour": null,
"Current month": null,
+ "Current password": null,
"Current week": null,
"Current year": null,
"Currently configured query": null,
@@ -377,6 +381,7 @@
"Email ": null,
"Email Template Configuration": null,
"Email custom inner content (mandatory)": null,
+ "Email does not match.": null,
"Email preheader": null,
"Email title": null,
"Enable": null,
@@ -397,6 +402,7 @@
"Enter Region Name": null,
"Enter Secret Key": null,
"Enter new alternate ID": null,
+ "Enter password": null,
"Enter your mail address and we'll send you a link to restore your password.": null,
"Error": null,
"Error Details": null,
@@ -675,6 +681,7 @@
"New chart": null,
"New dashboard": null,
"New dashboard title": null,
+ "New mail address": null,
"New password": null,
"New site": null,
"Newest (descending)": null,
@@ -736,6 +743,7 @@
"Password ": null,
"Password changed": null,
"Passwords do not match.": null,
+ "Passwords does not match.": null,
"Path": null,
"Percent": null,
"Persist events": null,
@@ -793,6 +801,7 @@
"Query": null,
"Quick Selection": null,
"Raw": null,
+ "Re-enter mail address": null,
"Recipient for test mail": null,
"Reduce event rate": null,
"Refresh": null,
@@ -1102,6 +1111,7 @@
"Truncate data": null,
"Truncating data...": null,
"Trust": null,
+ "Try again": null,
"Trying to send test mail...": null,
"Type": null,
"Typography": null,
@@ -1122,6 +1132,7 @@
"Update all changes to dashboard charts or discard current changes.": null,
"Update asset links": null,
"Update asset links or close.": null,
+ "Update email": null,
"Update link": null,
"Update links": null,
"Update pipeline": null,
diff --git a/ui/deployment/i18n/pl.json b/ui/deployment/i18n/pl.json
index 3f364912ac..ce99178a64 100644
--- a/ui/deployment/i18n/pl.json
+++ b/ui/deployment/i18n/pl.json
@@ -220,6 +220,7 @@
"Configure labels which can be assigned to assets and other resources": "Skonfiguruj etykiety, które mogą być przypisywane do zasobów i innych zasobów",
"Configure schema": "Skonfiguruj schemat",
"Configure trusted and rejected OPC-UA certificates": "Skonfiguruj zaufane i odrzucone certyfikaty OPC-UA",
+ "Confirm password": "Potwierdź hasło",
"Connect Adapter": "Podłącz adapter",
"Connection could not be established.": "Nie udało się nawiązać połączenia.",
"Connection was established and test file was successfully saved:": "Połączenie zostało nawiązane, a plik testowy został pomyślnie zapisany:",
@@ -228,6 +229,8 @@
"Converts the field value from the given measurement unit to the provided target unit": "Konwertuje wartość pola z podanej jednostki miary na wskazaną jednostkę docelową",
"Copy": "Kopiuj",
"Copyright notice": "Informacja o prawach autorskich",
+ "Could not change email address.": "Nie udało się zmienić adresu e-mail.",
+ "Could not change the password.": "Nie udało się zmienić hasła.",
"Could not send email": "Nie można wysłać e-maila",
"Could not upload file": "Nie udało się przesłać pliku",
"Count": "Liczba",
@@ -255,6 +258,7 @@
"Current day": "Bieżący dzień",
"Current hour": "Bieżąca godzina",
"Current month": "Bieżący miesiąc",
+ "Current password": "Obecne hasło",
"Current week": "Bieżący tydzień",
"Current year": "Bieżący rok",
"Currently configured query": "Aktualnie skonfigurowane zapytanie",
@@ -377,6 +381,7 @@
"Email ": "E-mail",
"Email Template Configuration": "Konfiguracja szablonu wiadomości e-mail",
"Email custom inner content (mandatory)": "Niestandardowa treść e-maila (wymagana)",
+ "Email does not match.": "Adresy e-mail nie są zgodne.",
"Email preheader": "Preheader e-maila",
"Email title": "Tytuł e-maila",
"Enable": "Włącz",
@@ -397,6 +402,7 @@
"Enter Region Name": "Wprowadź nazwę regionu",
"Enter Secret Key": "Wprowadź klucz prywatny",
"Enter new alternate ID": "Wprowadź nowe alternatywne ID",
+ "Enter password": "Wprowadź hasło",
"Enter your mail address and we'll send you a link to restore your password.": "Wpisz swój adres e-mail, a wyślemy Ci link do przywrócenia hasła.",
"Error": "Błąd",
"Error Details": "Szczegóły błędu",
@@ -675,6 +681,7 @@
"New chart": "Nowy wykres",
"New dashboard": "Nowy pulpit",
"New dashboard title": "Nowy tytuł pulpitu",
+ "New mail address": "Nowy adres e-mail",
"New password": "Nowe hasło",
"New site": "Nowa lokalizacja",
"Newest (descending)": "Najnowsze (malejąco)",
@@ -736,6 +743,7 @@
"Password ": "Hasło",
"Password changed": "Hasło zmienione",
"Passwords do not match.": "Hasła nie są zgodne.",
+ "Passwords does not match.": "Hasła nie są zgodne.",
"Path": "Ścieżka",
"Percent": "Procent",
"Persist events": "Trwałe przechowywanie zdarzeń",
@@ -793,6 +801,7 @@
"Query": "Zapytanie",
"Quick Selection": "Szybki wybór",
"Raw": "Surowe",
+ "Re-enter mail address": "Wprowadź ponownie adres e-mail",
"Recipient for test mail": "Odbiorca wiadomości testowej",
"Reduce event rate": "Zredukuj częstość zdarzeń",
"Refresh": "Odśwież",
@@ -1102,6 +1111,7 @@
"Truncate data": "Wyczyść dane",
"Truncating data...": "Czyszczenie danych...",
"Trust": "Zaufaj",
+ "Try again": "Spróbuj ponownie",
"Trying to send test mail...": "Próba wysłania wiadomości testowej...",
"Type": "Typ",
"Typography": "Typografia",
@@ -1122,6 +1132,7 @@
"Update all changes to dashboard charts or discard current changes.": "Zapisz wszystkie zmiany wykresów pulpitu lub odrzuć bieżące zmiany.",
"Update asset links": "Zaktualizuj linki zasobu",
"Update asset links or close.": "Zaktualizuj powiązania zasobów lub zamknij.",
+ "Update email": "Zaktualizuj adres e-mail",
"Update link": "Zaktualizuj link",
"Update links": "Zaktualizuj linki",
"Update pipeline": "Zaktualizuj strumień",
diff --git a/ui/src/app/profile/dialog/change-email/change-email-dialog.component.html b/ui/src/app/profile/dialog/change-email/change-email-dialog.component.html
index 0efe7a5134..4d8923abde 100644
--- a/ui/src/app/profile/dialog/change-email/change-email-dialog.component.html
+++ b/ui/src/app/profile/dialog/change-email/change-email-dialog.component.html
@@ -21,60 +21,84 @@
<div fxFlex="100" fxLayout="column" class="p-15">
@if (!operationApplied) {
<form [formGroup]="parentForm" fxFlex="100" fxLayout="column">
- <div class="general-options-panel" fxLayout="column">
- <mat-form-field color="accent">
- <mat-label>New mail address</mat-label>
- <input
- formControlName="email"
- fxFlex
- matInput
- required
- />
- <mat-error
- >Must be a valid email address.</mat-error
- >
- </mat-form-field>
- <mat-form-field color="accent">
- <mat-label>Re-enter mail address</mat-label>
- <input
- formControlName="emailConfirm"
- fxFlex
- matInput
- required
- />
- <mat-error
- >Must be a valid email address.</mat-error
- >
- </mat-form-field>
+ <div fxLayout="column">
+ <sp-form-field
+ [level]="3"
+ [label]="'New mail address' | translate"
+ >
+ <mat-form-field>
+ <input
+ formControlName="email"
+ fxFlex
+ matInput
+ required
+ />
+ <mat-error>{{
+ 'Must be a valid email address.' | translate
+ }}</mat-error>
+ </mat-form-field>
+ </sp-form-field>
+ <sp-form-field
+ [level]="3"
+ [label]="'Re-enter mail address' | translate"
+ >
+ <mat-form-field>
+ <input
+ formControlName="emailConfirm"
+ fxFlex
+ matInput
+ required
+ />
+ <mat-error>{{
+ 'Must be a valid email address.' | translate
+ }}</mat-error>
+ </mat-form-field>
+ </sp-form-field>
@if (parentForm.hasError('notMatching')) {
- <mat-error>Email does not match.</mat-error>
+ <sp-alert-banner
+ type="error"
+ [title]="'Email does not match.' | translate"
+ [description]="
+ 'Check that you have re-entered the same email address.'
+ "
+ >
+ </sp-alert-banner>
}
- <mat-form-field color="accent">
- <mat-label>Enter password</mat-label>
- <input
- formControlName="passwordConfirm"
- fxFlex
- matInput
- type="password"
- required
- />
- </mat-form-field>
+ <sp-form-field
+ [level]="3"
+ [label]="'Enter password' | translate"
+ >
+ <mat-form-field>
+ <input
+ formControlName="passwordConfirm"
+ fxFlex
+ matInput
+ type="password"
+ required
+ />
+ </mat-form-field>
+ </sp-form-field>
</div>
</form>
}
@if (operationApplied && error) {
<div>
- <div>Could not change email address.</div>
- <div>Reason: {{ errorMessage }}</div>
- <button
- class="mt-20"
- mat-button
- mat-flat-button
- color="accent"
- (click)="operationApplied = false"
+ <sp-alert-banner
+ type="error"
+ [title]="'Could not change email address.' | translate"
+ [description]="errorMessage"
>
- Try again
- </button>
+ <div>
+ <button
+ class="mt-20"
+ mat-button
+ mat-flat-button
+ (click)="operationApplied = false"
+ >
+ {{ 'Try again' | translate }}
+ </button>
+ </div>
+ </sp-alert-banner>
</div>
}
</div>
@@ -85,14 +109,13 @@
<button
mat-button
mat-flat-button
- color="accent"
(click)="update()"
style="margin-right: 10px"
[disabled]="!parentForm.valid || operationApplied"
data-cy="sp-element-edit-user-save"
>
<i class="material-icons">save</i
- ><span> Update email</span>
+ ><span> {{ 'Update email' | translate }}</span>
</button>
<button
mat-button
@@ -100,7 +123,7 @@
class="mat-basic"
(click)="close()"
>
- Cancel
+ {{ 'Cancel' | translate }}
</button>
</div>
</div>
diff --git a/ui/src/app/profile/dialog/change-email/change-email-dialog.component.ts b/ui/src/app/profile/dialog/change-email/change-email-dialog.component.ts
index 04e93e756e..0ed0fb0f83 100644
--- a/ui/src/app/profile/dialog/change-email/change-email-dialog.component.ts
+++ b/ui/src/app/profile/dialog/change-email/change-email-dialog.component.ts
@@ -18,12 +18,16 @@
import {
Component,
+ inject,
Input,
OnInit,
ViewEncapsulation,
- inject,
} from '@angular/core';
-import { DialogRef } from '@streampipes/shared-ui';
+import {
+ DialogRef,
+ FormFieldComponent,
+ SpAlertBannerComponent,
+} from '@streampipes/shared-ui';
import {
AbstractControl,
FormsModule,
@@ -37,10 +41,11 @@ import {
} from '@angular/forms';
import { UserAccount, UserService } from '@streampipes/platform-services';
import { FlexDirective, LayoutDirective } from '@ngbracket/ngx-layout/flex';
-import { MatError, MatFormField, MatLabel } from '@angular/material/form-field';
+import { MatError, MatFormField } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { MatButton } from '@angular/material/button';
import { MatDivider } from '@angular/material/divider';
+import { TranslatePipe } from '@ngx-translate/core';
@Component({
selector: 'sp-change-email-dialog',
@@ -53,11 +58,13 @@ import { MatDivider } from '@angular/material/divider';
FormsModule,
ReactiveFormsModule,
MatFormField,
- MatLabel,
MatInput,
MatError,
MatButton,
MatDivider,
+ FormFieldComponent,
+ TranslatePipe,
+ SpAlertBannerComponent,
],
})
export class ChangeEmailDialogComponent implements OnInit {
diff --git a/ui/src/app/profile/dialog/change-password/change-password-dialog.component.html b/ui/src/app/profile/dialog/change-password/change-password-dialog.component.html
index a8fee51b40..c3c651ebe4 100644
--- a/ui/src/app/profile/dialog/change-password/change-password-dialog.component.html
+++ b/ui/src/app/profile/dialog/change-password/change-password-dialog.component.html
@@ -21,56 +21,82 @@
<div fxFlex="100" fxLayout="column" class="p-15">
@if (!operationApplied) {
<form [formGroup]="parentForm" fxFlex="100" fxLayout="column">
- <div class="general-options-panel" fxLayout="column">
- <mat-form-field color="accent">
- <mat-label>Current password</mat-label>
- <input
- formControlName="currentPassword"
- fxFlex
- matInput
- type="password"
- required
- />
- </mat-form-field>
- <mat-form-field color="accent">
- <mat-label>New password</mat-label>
- <input
- formControlName="newPassword"
- fxFlex
- matInput
- type="password"
- required
- />
- </mat-form-field>
- <mat-form-field color="accent">
- <mat-label>New password</mat-label>
- <input
- formControlName="newPasswordConfirm"
- fxFlex
- matInput
- type="password"
- required
- />
- </mat-form-field>
+ <div fxLayout="column">
+ <sp-form-field
+ [level]="3"
+ [label]="'Current password' | translate"
+ >
+ <mat-form-field>
+ <input
+ formControlName="currentPassword"
+ fxFlex
+ matInput
+ type="password"
+ required
+ />
+ </mat-form-field>
+ </sp-form-field>
+ <sp-form-field
+ [level]="3"
+ [label]="'New password' | translate"
+ >
+ <mat-form-field>
+ <input
+ formControlName="newPassword"
+ fxFlex
+ matInput
+ type="password"
+ required
+ />
+ </mat-form-field>
+ </sp-form-field>
+ <sp-form-field
+ [level]="3"
+ [label]="'Confirm password' | translate"
+ >
+ <mat-form-field>
+ <input
+ formControlName="newPasswordConfirm"
+ fxFlex
+ matInput
+ type="password"
+ required
+ />
+ </mat-form-field>
+ </sp-form-field>
@if (parentForm.hasError('notMatching')) {
- <mat-error>Passwords do not match.</mat-error>
+ <sp-alert-banner
+ type="error"
+ [title]="
+ 'Passwords does not match.' | translate
+ "
+ [description]="
+ 'Check that you have re-entered the same password.'
+ "
+ >
+ </sp-alert-banner>
}
</div>
</form>
}
@if (operationApplied && error) {
<div>
- <div>Could not change the password.</div>
- <div>Reason: {{ errorMessage }}</div>
- <button
- class="mt-20"
- mat-button
- mat-flat-button
- color="accent"
- (click)="operationApplied = false"
+ <sp-alert-banner
+ type="error"
+ [title]="'Could not change the password.' | translate"
+ [description]="errorMessage"
>
- Try again
- </button>
+ <div>
+ <button
+ class="mt-20"
+ mat-button
+ mat-flat-button
+ (click)="operationApplied = false"
+ >
+ {{ 'Try again' | translate }}
+ </button>
+ </div>
+ </sp-alert-banner>
</div>
}
</div>
@@ -81,13 +107,13 @@
<button
mat-button
mat-flat-button
- color="accent"
(click)="update()"
style="margin-right: 10px"
[disabled]="!parentForm.valid"
data-cy="sp-element-edit-user-save"
>
- <i class="material-icons">save</i><span> Save</span>
+ <i class="material-icons">save</i
+ ><span> {{ 'Save' | translate }}</span>
</button>
<button
mat-button
@@ -95,7 +121,7 @@
class="mat-basic"
(click)="close()"
>
- Cancel
+ {{ 'Cancel' | translate }}
</button>
</div>
</div>
diff --git a/ui/src/app/profile/dialog/change-password/change-password-dialog.component.ts b/ui/src/app/profile/dialog/change-password/change-password-dialog.component.ts
index 67a82d9b81..a6ba119277 100644
--- a/ui/src/app/profile/dialog/change-password/change-password-dialog.component.ts
+++ b/ui/src/app/profile/dialog/change-password/change-password-dialog.component.ts
@@ -18,12 +18,16 @@
import {
Component,
+ inject,
Input,
OnInit,
ViewEncapsulation,
- inject,
} from '@angular/core';
-import { DialogRef } from '@streampipes/shared-ui';
+import {
+ DialogRef,
+ FormFieldComponent,
+ SpAlertBannerComponent,
+} from '@streampipes/shared-ui';
import {
AbstractControl,
FormsModule,
@@ -41,10 +45,11 @@ import {
UserService,
} from '@streampipes/platform-services';
import { FlexDirective, LayoutDirective } from '@ngbracket/ngx-layout/flex';
-import { MatError, MatFormField, MatLabel } from '@angular/material/form-field';
+import { MatFormField } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { MatButton } from '@angular/material/button';
import { MatDivider } from '@angular/material/divider';
+import { TranslatePipe } from '@ngx-translate/core';
@Component({
selector: 'sp-change-password-dialog',
@@ -57,11 +62,12 @@ import { MatDivider } from '@angular/material/divider';
FormsModule,
ReactiveFormsModule,
MatFormField,
- MatLabel,
MatInput,
- MatError,
MatButton,
MatDivider,
+ FormFieldComponent,
+ TranslatePipe,
+ SpAlertBannerComponent,
],
})
export class ChangePasswordDialogComponent implements OnInit {