Flex layout replacements. Switch to tailwind.css.

This commit is contained in:
Igor Kulikov 2024-10-16 19:15:53 +03:00
parent e394cb5a43
commit 32d7978c9e
10 changed files with 63 additions and 59 deletions

View File

@ -92,7 +92,7 @@
</ng-container> </ng-container>
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.behavior.default-settings</div> <div class="fixed-title-width" translate>scada.behavior.default-settings</div>
<tb-get-value-action-settings fxFlex <tb-get-value-action-settings class="flex-1"
panelTitle="{{ behaviorFormGroup.get('name').value | customTranslate }}" panelTitle="{{ behaviorFormGroup.get('name').value | customTranslate }}"
[valueType]="behaviorFormGroup.get('valueType').value" [valueType]="behaviorFormGroup.get('valueType').value"
[trueLabel]="behaviorFormGroup.get('trueLabel').value | customTranslate" [trueLabel]="behaviorFormGroup.get('trueLabel').value | customTranslate"
@ -107,7 +107,7 @@
<ng-container *ngIf="behaviorFormGroup.get('type').value === ScadaSymbolBehaviorType.action"> <ng-container *ngIf="behaviorFormGroup.get('type').value === ScadaSymbolBehaviorType.action">
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.behavior.default-settings</div> <div class="fixed-title-width" translate>scada.behavior.default-settings</div>
<tb-set-value-action-settings fxFlex <tb-set-value-action-settings class="flex-1"
panelTitle="{{ behaviorFormGroup.get('name').value | customTranslate }}" panelTitle="{{ behaviorFormGroup.get('name').value | customTranslate }}"
[valueType]="behaviorFormGroup.get('valueType').value" [valueType]="behaviorFormGroup.get('valueType').value"
[aliasController]="aliasController" [aliasController]="aliasController"
@ -119,7 +119,7 @@
<ng-container *ngIf="behaviorFormGroup.get('type').value === ScadaSymbolBehaviorType.widgetAction"> <ng-container *ngIf="behaviorFormGroup.get('type').value === ScadaSymbolBehaviorType.widgetAction">
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.behavior.default-settings</div> <div class="fixed-title-width" translate>scada.behavior.default-settings</div>
<tb-widget-action-settings fxFlex <tb-widget-action-settings class="flex-1"
panelTitle="{{ behaviorFormGroup.get('name').value | customTranslate }}" panelTitle="{{ behaviorFormGroup.get('name').value | customTranslate }}"
[callbacks]="callbacks" [callbacks]="callbacks"
[widgetType]="widgetType.rpc" [widgetType]="widgetType.rpc"

View File

@ -30,7 +30,7 @@
<div cdkDrag [cdkDragDisabled]="!dragEnabled" <div cdkDrag [cdkDragDisabled]="!dragEnabled"
[class.tb-draggable-form-table-row]="!disabled" [class.tb-draggable-form-table-row]="!disabled"
*ngFor="let behaviorControl of behaviorsFormArray().controls; trackBy: trackByBehavior; let $index = index;"> *ngFor="let behaviorControl of behaviorsFormArray().controls; trackBy: trackByBehavior; let $index = index;">
<tb-scada-symbol-metadata-behavior-row fxFlex <tb-scada-symbol-metadata-behavior-row class="flex-1"
[index]="$index" [index]="$index"
[formControl]="behaviorControl" [formControl]="behaviorControl"
[aliasController]="aliasController" [aliasController]="aliasController"
@ -42,7 +42,7 @@
*ngIf="!disabled" *ngIf="!disabled"
type="button" type="button"
cdkDragHandle cdkDragHandle
[ngClass]="{'tb-hidden': !dragEnabled}" [class.tb-hidden]="!dragEnabled"
matTooltip="{{ 'action.drag' | translate }}" matTooltip="{{ 'action.drag' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">
<mat-icon>drag_indicator</mat-icon> <mat-icon>drag_indicator</mat-icon>
@ -60,6 +60,5 @@
</div> </div>
<ng-template #noBehaviors> <ng-template #noBehaviors>
<span fxLayoutAlign="center center" <span class="tb-prompt flex items-center justify-center">{{ 'scada.behavior.no-behaviors' | translate }}</span>
class="tb-prompt">{{ 'scada.behavior.no-behaviors' | translate }}</span>
</ng-template> </ng-template>

View File

@ -24,7 +24,7 @@
</div> </div>
<div *ngIf="tagsFormArray().controls.length; else noTags" class="tb-form-table-body"> <div *ngIf="tagsFormArray().controls.length; else noTags" class="tb-form-table-body">
<div *ngFor="let tagControl of tagsFormArray().controls; trackBy: trackByTag; let $index = index; let $last = last"> <div *ngFor="let tagControl of tagsFormArray().controls; trackBy: trackByTag; let $index = index; let $last = last">
<tb-scada-symbol-metadata-tag fxFlex <tb-scada-symbol-metadata-tag class="flex-1"
[elementStateRenderFunctionCompleter]="elementStateRenderFunctionCompleter" [elementStateRenderFunctionCompleter]="elementStateRenderFunctionCompleter"
[clickActionFunctionCompleter]="clickActionFunctionCompleter" [clickActionFunctionCompleter]="clickActionFunctionCompleter"
[formControl]="tagControl"> [formControl]="tagControl">
@ -35,6 +35,5 @@
</div> </div>
</div> </div>
<ng-template #noTags> <ng-template #noTags>
<span fxLayoutAlign="center center" <span class="tb-prompt flex items-center justify-center">{{ 'scada.tag.no-tags' | translate }}</span>
class="tb-prompt">{{ 'scada.tag.no-tags' | translate }}</span>
</ng-template> </ng-template>

View File

@ -25,17 +25,17 @@
</div> </div>
</div> </div>
<div [formGroup]="metadataFormGroup" class="tb-scada-symbol-metadata-content"> <div [formGroup]="metadataFormGroup" class="tb-scada-symbol-metadata-content">
<div [fxShow]="selectedOption === 'general'" class="mat-content"> <div [class.!hidden]="selectedOption !== 'general'" class="mat-content">
<div class="tb-form-panel"> <div class="tb-form-panel">
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.title</div> <div class="fixed-title-width" translate>scada.title</div>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic"> <mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<input matInput required formControlName="title" placeholder="{{ 'widget-config.set' | translate }}"> <input matInput required formControlName="title" placeholder="{{ 'widget-config.set' | translate }}">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.description</div> <div class="fixed-title-width" translate>scada.description</div>
<mat-form-field fxFlex appearance="outline" subscriptSizing="dynamic"> <mat-form-field class="flex-1" appearance="outline" subscriptSizing="dynamic">
<textarea matInput <textarea matInput
formControlName="description" formControlName="description"
rows="2"></textarea> rows="2"></textarea>
@ -43,8 +43,8 @@
</div> </div>
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.search-tags</div> <div class="fixed-title-width" translate>scada.search-tags</div>
<div fxFlex fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-1 flex-row items-center justify-start">
<tb-string-items-list fxFlex <tb-string-items-list class="flex-1"
style="display: flex;" style="display: flex;"
formControlName="searchTags" formControlName="searchTags"
appearance="outline" appearance="outline"
@ -54,7 +54,7 @@
</div> </div>
<div class="tb-form-row"> <div class="tb-form-row">
<div class="fixed-title-width" translate>scada.widget-size</div> <div class="fixed-title-width" translate>scada.widget-size</div>
<div fxLayout="row" fxFlex fxLayoutAlign="end center" fxLayoutGap="8px"> <div class="flex flex-1 flex-row items-center justify-end gap-2">
<div class="tb-small-label">{{ 'scada.cols' | translate }}</div> <div class="tb-small-label">{{ 'scada.cols' | translate }}</div>
<mat-form-field appearance="outline" class="number flex" subscriptSizing="dynamic"> <mat-form-field appearance="outline" class="number flex" subscriptSizing="dynamic">
<input matInput formControlName="widgetSizeX" required <input matInput formControlName="widgetSizeX" required
@ -71,7 +71,7 @@
</div> </div>
<div class="tb-form-panel stroked"> <div class="tb-form-panel stroked">
<mat-expansion-panel class="tb-settings" expanded> <mat-expansion-panel class="tb-settings" expanded>
<mat-expansion-panel-header fxLayout="row wrap"> <mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title> <mat-panel-title>
{{ 'scada.state-render-function' | translate }} {{ 'scada.state-render-function' | translate }}
</mat-panel-title> </mat-panel-title>
@ -89,7 +89,7 @@
</div> </div>
</div> </div>
</div> </div>
<div [fxShow]="selectedOption === 'tags'" class="mat-content overflow-hidden"> <div [class.!hidden]="selectedOption !== 'tags'" class="mat-content overflow-hidden">
<tb-scada-symbol-metadata-tags <tb-scada-symbol-metadata-tags
#symbolMetadataTags #symbolMetadataTags
[tags]="tags" [tags]="tags"
@ -98,14 +98,14 @@
formControlName="tags"> formControlName="tags">
</tb-scada-symbol-metadata-tags> </tb-scada-symbol-metadata-tags>
</div> </div>
<div [fxShow]="selectedOption === 'behavior'" class="mat-content overflow-hidden"> <div [class.!hidden]="selectedOption !== 'behavior'" class="mat-content overflow-hidden">
<tb-scada-symbol-metadata-behaviors <tb-scada-symbol-metadata-behaviors
formControlName="behavior" formControlName="behavior"
[aliasController]="aliasController" [aliasController]="aliasController"
[callbacks]="callbacks"> [callbacks]="callbacks">
</tb-scada-symbol-metadata-behaviors> </tb-scada-symbol-metadata-behaviors>
</div> </div>
<div [fxShow]="selectedOption === 'properties'" class="mat-content overflow-hidden"> <div [class.!hidden]="selectedOption !== 'properties'" class="mat-content overflow-hidden">
<tb-scada-symbol-metadata-properties <tb-scada-symbol-metadata-properties
formControlName="properties"> formControlName="properties">
</tb-scada-symbol-metadata-properties> </tb-scada-symbol-metadata-properties>

View File

@ -30,7 +30,7 @@
<div cdkDrag [cdkDragDisabled]="!dragEnabled" <div cdkDrag [cdkDragDisabled]="!dragEnabled"
[class.tb-draggable-form-table-row]="!disabled" [class.tb-draggable-form-table-row]="!disabled"
*ngFor="let propertyControl of propertiesFormArray().controls; trackBy: trackByProperty; let $index = index;"> *ngFor="let propertyControl of propertiesFormArray().controls; trackBy: trackByProperty; let $index = index;">
<tb-scada-symbol-metadata-property-row fxFlex <tb-scada-symbol-metadata-property-row class="flex-1"
[index]="$index" [index]="$index"
[booleanPropertyIds]="booleanPropertyIds" [booleanPropertyIds]="booleanPropertyIds"
[formControl]="propertyControl" [formControl]="propertyControl"
@ -41,7 +41,7 @@
*ngIf="!disabled" *ngIf="!disabled"
type="button" type="button"
cdkDragHandle cdkDragHandle
[ngClass]="{'tb-hidden': !dragEnabled}" [class.tb-hidden]="!dragEnabled"
matTooltip="{{ 'action.drag' | translate }}" matTooltip="{{ 'action.drag' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">
<mat-icon>drag_indicator</mat-icon> <mat-icon>drag_indicator</mat-icon>
@ -59,6 +59,5 @@
</div> </div>
<ng-template #noProperties> <ng-template #noProperties>
<span fxLayoutAlign="center center" <span class="tb-prompt flex items-center justify-center">{{ 'scada.property.no-properties' | translate }}</span>
class="tb-prompt">{{ 'scada.property.no-properties' | translate }}</span>
</ng-template> </ng-template>

View File

@ -83,7 +83,7 @@
</div> </div>
<div *ngIf="propertyFormGroup.get('type').value === ScadaSymbolPropertyType.number" class="tb-form-row space-between"> <div *ngIf="propertyFormGroup.get('type').value === ScadaSymbolPropertyType.number" class="tb-form-row space-between">
<div translate>scada.property.number-settings</div> <div translate>scada.property.number-settings</div>
<div fxLayout="row" fxFlex fxLayoutAlign="end center" fxLayoutGap="8px"> <div class="flex flex-1 flex-row items-center justify-end gap-2">
<div class="tb-small-label" translate>scada.property.min</div> <div class="tb-small-label" translate>scada.property.min</div>
<mat-form-field appearance="outline" class="number flex" subscriptSizing="dynamic"> <mat-form-field appearance="outline" class="number flex" subscriptSizing="dynamic">
<input matInput formControlName="min" <input matInput formControlName="min"
@ -110,7 +110,7 @@
</div> </div>
<div class="tb-form-panel stroked"> <div class="tb-form-panel stroked">
<mat-expansion-panel class="tb-settings"> <mat-expansion-panel class="tb-settings">
<mat-expansion-panel-header fxLayout="row wrap"> <mat-expansion-panel-header class="flex flex-row flex-wrap">
<mat-panel-title> <mat-panel-title>
{{ 'scada.property.advanced-ui-settings' | translate }} {{ 'scada.property.advanced-ui-settings' | translate }}
</mat-panel-title> </mat-panel-title>

View File

@ -15,11 +15,11 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-scada-symbol-editor-shape" [fxShow]="editorMode === 'svg'" #scadaSymbolShape></div> <div class="tb-scada-symbol-editor-shape" [class.!hidden]="editorMode !== 'svg'" #scadaSymbolShape></div>
<div class="tb-scada-symbol-editor-tooltips" [fxShow]="editorMode === 'svg'" #tooltipsContainer> <div class="tb-scada-symbol-editor-tooltips" [class.!hidden]="editorMode !== 'svg'" #tooltipsContainer>
<tb-anchor #tooltipsContainerComponent></tb-anchor> <tb-anchor #tooltipsContainerComponent></tb-anchor>
</div> </div>
<div class="tb-scada-symbol-editor-svg-xml" [fxShow]="editorMode === 'xml'"> <div class="tb-scada-symbol-editor-svg-xml" [class.!hidden]="editorMode !== 'xml'">
<tb-svg-xml [formControl]="svgContentFormControl" <tb-svg-xml [formControl]="svgContentFormControl"
fillHeight fillHeight
noLabel> noLabel>
@ -27,7 +27,7 @@
</div> </div>
<div class="tb-scada-symbol-editor-buttons"> <div class="tb-scada-symbol-editor-buttons">
<div class="tb-scada-symbol-editor-view-buttons"> <div class="tb-scada-symbol-editor-view-buttons">
<div class="tb-scada-symbol-editor-zoom-buttons tb-primary-fill" [fxShow]="editorMode === 'svg'"> <div class="tb-scada-symbol-editor-zoom-buttons tb-primary-fill" [class.!hidden]="editorMode !== 'svg'">
<button mat-icon-button <button mat-icon-button
[disabled]="zoomInDisabled" [disabled]="zoomInDisabled"
(click)="zoomIn()" (click)="zoomIn()"
@ -43,7 +43,7 @@
<mat-icon>remove</mat-icon> <mat-icon>remove</mat-icon>
</button> </button>
</div> </div>
<div *ngIf="displayShowHidden" [fxShow]="editorMode === 'svg'" class="tb-primary-fill"> <div *ngIf="displayShowHidden" [class.!hidden]="editorMode !== 'svg'" class="tb-primary-fill">
<button mat-icon-button <button mat-icon-button
(click)="toggleShowHidden()" (click)="toggleShowHidden()"
matTooltip="{{ (showHiddenElements ? 'scada.hide-hidden-elements' : 'scada.show-hidden-elements') | translate }}" matTooltip="{{ (showHiddenElements ? 'scada.hide-hidden-elements' : 'scada.show-hidden-elements') | translate }}"

View File

@ -15,21 +15,21 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-scada-symbol-editor mat-content" fxLayout="column"> <div class="tb-scada-symbol-editor mat-content flex flex-col">
<section class="tb-scada-symbol-editor-container" fxFlex fxLayout="column"> <section class="tb-scada-symbol-editor-container flex flex-1 flex-col">
<div class="tb-scada-symbol-editor-layout" fxFlex fxLayout="row"> <div class="tb-scada-symbol-editor-layout flex flex-1 flex-row">
<mat-drawer-container style="width: 100%; height: 100%;"> <mat-drawer-container class="size-full">
<mat-drawer class="tb-scada-symbol-editor-details-drawer mat-elevation-z4" <mat-drawer class="tb-scada-symbol-editor-details-drawer mat-elevation-z4"
disableClose="true" disableClose="true"
mode="side" mode="side"
opened opened
position="end"> position="end">
<tb-details-panel fxFlex <tb-details-panel class="flex-1"
[isReadOnly]="true" [isReadOnly]="true"
[showCloseDetails]="false" [showCloseDetails]="false"
headerHeightPx="64" headerHeightPx="64"
headerTitle="{{symbolData?.imageResource?.title}}"> headerTitle="{{symbolData?.imageResource?.title}}">
<div class="details-buttons" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="16px"> <div class="details-buttons flex flex-row items-center justify-start gap-4">
<div tb-help="scadaSymbolDev"></div> <div tb-help="scadaSymbolDev"></div>
<button mat-stroked-button <button mat-stroked-button
[disabled]="scadaSymbolFormGroup.invalid" [disabled]="scadaSymbolFormGroup.invalid"
@ -77,7 +77,7 @@
</div> </div>
</div> </div>
</div> </div>
<div [fxShow]="!previewMode" [formGroup]="scadaSymbolFormGroup"> <div [class.!hidden]="previewMode" [formGroup]="scadaSymbolFormGroup">
<tb-scada-symbol-metadata <tb-scada-symbol-metadata
#symbolMetadata #symbolMetadata
[tags]="tags" [tags]="tags"
@ -85,7 +85,7 @@
[callbacks]="widgetActionCallbacks" [callbacks]="widgetActionCallbacks"
formControlName="metadata"> formControlName="metadata">
<div class="tb-scada-symbol-metadata-header-prefix"> <div class="tb-scada-symbol-metadata-header-prefix">
<button fxHide.gt-sm <button class="gt-sm:!hidden"
[disabled]="scadaSymbolFormGroup.invalid || !symbolEditorValid" [disabled]="scadaSymbolFormGroup.invalid || !symbolEditorValid"
mat-button color="primary" mat-button color="primary"
(click)="enterPreviewMode()"> (click)="enterPreviewMode()">
@ -93,15 +93,15 @@
{{ 'scada.preview' | translate }} {{ 'scada.preview' | translate }}
</button> </button>
</div> </div>
<div fxFlex.lt-md class="tb-scada-symbol-metadata-header-suffix" fxLayout="row" fxLayoutAlign="end center" fxLayoutGap="12px"> <div class="tb-scada-symbol-metadata-header-suffix flex flex-row items-center justify-end gap-3 lt-md:flex-1">
<button fxHide.lt-md <button class="lt-md:!hidden"
[disabled]="scadaSymbolFormGroup.invalid || !symbolEditorValid" [disabled]="scadaSymbolFormGroup.invalid || !symbolEditorValid"
mat-button color="primary" mat-button color="primary"
(click)="enterPreviewMode()"> (click)="enterPreviewMode()">
<mat-icon>visibility</mat-icon> <mat-icon>visibility</mat-icon>
{{ 'scada.preview' | translate }} {{ 'scada.preview' | translate }}
</button> </button>
<div *ngIf="!readonly" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="12px"> <div *ngIf="!readonly" class="flex flex-row items-center justify-start gap-3">
<button [disabled]="!(scadaSymbolFormGroup.dirty || symbolEditorDirty)" <button [disabled]="!(scadaSymbolFormGroup.dirty || symbolEditorDirty)"
mat-stroked-button color="primary" mat-stroked-button color="primary"
(click)="onRevertScadaSymbolConfig()"> (click)="onRevertScadaSymbolConfig()">

View File

@ -15,12 +15,12 @@
limitations under the License. limitations under the License.
--> -->
<div class="profile-container" fxLayout="column" fxLayoutGap="8px"> <div class="profile-container flex flex-col gap-2">
<mat-card appearance="outlined" class="profile-card" fxLayout="column"> <mat-card appearance="outlined" class="profile-card flex flex-col">
<mat-card-title style="margin-bottom: 8px;"> <mat-card-title style="margin-bottom: 8px;">
<span class="mat-headline-5 card-title" translate>profile.jwt-token</span> <span class="mat-headline-5 card-title" translate>profile.jwt-token</span>
</mat-card-title> </mat-card-title>
<div fxLayout="row" fxLayoutAlign="space-between center"> <div class="flex flex-row items-center justify-between">
<div class="token-text">{{ 'profile.token-valid-till' | translate }} <span class="date">{{ jwtTokenExpiration | date: 'yyyy-MM-dd HH:mm:ss' }}</span></div> <div class="token-text">{{ 'profile.token-valid-till' | translate }} <span class="date">{{ jwtTokenExpiration | date: 'yyyy-MM-dd HH:mm:ss' }}</span></div>
<button mat-raised-button <button mat-raised-button
color="primary" color="primary"
@ -30,16 +30,16 @@
</button> </button>
</div> </div>
</mat-card> </mat-card>
<mat-card appearance="outlined" class="profile-card" fxLayout="column"> <mat-card appearance="outlined" class="profile-card flex flex-col">
<div class="change-password" tb-toast toastTarget="changePassword"> <div class="change-password" tb-toast toastTarget="changePassword">
<form #changePasswordForm="ngForm" [formGroup]="changePassword" (ngSubmit)="onChangePassword(changePasswordForm)"> <form #changePasswordForm="ngForm" [formGroup]="changePassword" (ngSubmit)="onChangePassword(changePasswordForm)">
<div fxLayout="row" fxLayout.xs="column" fxLayoutGap="25px" fxLayoutGap.xs="0"> <div class="flex flex-row gap-6.25 xs:flex-col xs:gap-0">
<div fxFlex="290px" fxFlex.sm="250px" fxFlex.xs="100"> <div class="min-w-72.5 max-w-72.5 flex-1 basis-72.5 xs:min-w-0 xs:max-w-full xs:basis-full sm:min-w-62.5 sm:max-w-62.5 sm:basis-62.5">
<h3 class="card-title" translate>profile.change-password</h3> <h3 class="card-title" translate>profile.change-password</h3>
<mat-form-field class="mat-block same-color" appearance="fill" color="primary"> <mat-form-field class="mat-block same-color" appearance="fill" color="primary">
<mat-label translate>profile.current-password</mat-label> <mat-label translate>profile.current-password</mat-label>
<input matInput type="password" name="current-password" formControlName="currentPassword" autocomplete="current-password"/> <input matInput type="password" name="current-password" formControlName="currentPassword" autocomplete="current-password"/>
<tb-toggle-password [fxShow]="changePassword.get('currentPassword').dirty || changePassword.get('currentPassword').touched" matSuffix></tb-toggle-password> <tb-toggle-password [class.!hidden]="!changePassword.get('currentPassword').dirty && !changePassword.get('currentPassword').touched" matSuffix></tb-toggle-password>
<mat-error *ngIf="changePassword.get('currentPassword').hasError('differencePassword')"> <mat-error *ngIf="changePassword.get('currentPassword').hasError('differencePassword')">
{{ 'security.password-requirement.incorrect-password-try-again' | translate }} {{ 'security.password-requirement.incorrect-password-try-again' | translate }}
</mat-error> </mat-error>
@ -47,7 +47,7 @@
<mat-form-field class="mat-block same-color" hideRequiredMarker appearance="fill" color="primary" subscriptSizing="dynamic"> <mat-form-field class="mat-block same-color" hideRequiredMarker appearance="fill" color="primary" subscriptSizing="dynamic">
<mat-label translate>login.new-password</mat-label> <mat-label translate>login.new-password</mat-label>
<input matInput type="password" name="new-password" formControlName="newPassword" autocomplete="new-password" required/> <input matInput type="password" name="new-password" formControlName="newPassword" autocomplete="new-password" required/>
<tb-toggle-password [fxShow]="changePassword.get('newPassword').dirty || changePassword.get('newPassword').touched" matSuffix></tb-toggle-password> <tb-toggle-password [class.!hidden]="!changePassword.get('newPassword').dirty && !changePassword.get('newPassword').touched" matSuffix></tb-toggle-password>
<mat-hint></mat-hint> <mat-hint></mat-hint>
<mat-error *ngIf="changePassword.get('newPassword').errors <mat-error *ngIf="changePassword.get('newPassword').errors
&& !changePassword.get('newPassword').hasError('alreadyUsed') && !changePassword.get('newPassword').hasError('alreadyUsed')
@ -65,20 +65,20 @@
{{ 'security.password-requirement.password-should-not-contain-spaces' | translate }} {{ 'security.password-requirement.password-should-not-contain-spaces' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div fxFlex fxHide fxShow.xs fxLayoutAlign="start center"> <div class="flex flex-1 items-center justify-start gt-xs:!hidden">
<ng-container *ngTemplateOutlet="passwordRequirements"></ng-container> <ng-container *ngTemplateOutlet="passwordRequirements"></ng-container>
</div> </div>
<mat-form-field class="mat-block same-color" hideRequiredMarker appearance="fill" color="primary"> <mat-form-field class="mat-block same-color" hideRequiredMarker appearance="fill" color="primary">
<mat-label translate>login.new-password-again</mat-label> <mat-label translate>login.new-password-again</mat-label>
<input matInput type="password" name="new-password" formControlName="newPassword2" autocomplete="new-password" required/> <input matInput type="password" name="new-password" formControlName="newPassword2" autocomplete="new-password" required/>
<tb-toggle-password [fxShow]="changePassword.get('newPassword2').dirty || changePassword.get('newPassword2').touched" matSuffix></tb-toggle-password> <tb-toggle-password [class.!hidden]="!changePassword.get('newPassword2').dirty && !changePassword.get('newPassword2').touched" matSuffix></tb-toggle-password>
<mat-error *ngIf="changePassword.get('newPassword2').hasError('differencePassword')"> <mat-error *ngIf="changePassword.get('newPassword2').hasError('differencePassword')">
{{ 'security.password-requirement.new-passwords-not-match' | translate }} {{ 'security.password-requirement.new-passwords-not-match' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<mat-divider [vertical]="true"></mat-divider> <mat-divider [vertical]="true"></mat-divider>
<div fxFlex fxHide.xs fxLayoutAlign="start start"> <div class="flex flex-1 items-start justify-start xs:!hidden">
<ng-container *ngTemplateOutlet="passwordRequirements"></ng-container> <ng-container *ngTemplateOutlet="passwordRequirements"></ng-container>
</div> </div>
</div> </div>
@ -125,7 +125,7 @@
</div> </div>
</div> </div>
</ng-template> </ng-template>
<div fxLayout="row" fxLayoutGap="8px" style="margin-top: 18px;" [fxShow]="changePassword.dirty || changePassword.touched"> <div class="flex flex-row gap-2" style="margin-top: 18px;" [class.!hidden]="!changePassword.dirty && !changePassword.touched">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
(click)="discardChanges(changePasswordForm, $event)" (click)="discardChanges(changePasswordForm, $event)"
@ -153,7 +153,7 @@
<ng-container *ngFor="let provider of allowTwoFactorProviders; let $last = last; trackBy: trackByProvider"> <ng-container *ngFor="let provider of allowTwoFactorProviders; let $last = last; trackBy: trackByProvider">
<div class="provider"> <div class="provider">
<h4 class="provider-title">{{ providersData.get(provider).name | translate }}</h4> <h4 class="provider-title">{{ providersData.get(provider).name | translate }}</h4>
<div fxLayout="row" fxLayoutAlign="space-between start"> <div class="flex flex-row items-start justify-between">
<div class="mat-body-2 description" *ngIf="!twoFactorAuth.get(provider).value; else providerInfo"> <div class="mat-body-2 description" *ngIf="!twoFactorAuth.get(provider).value; else providerInfo">
{{ providersData.get(provider).description | translate }} {{ providersData.get(provider).description | translate }}
</div> </div>

View File

@ -82,14 +82,17 @@ module.exports = {
flexBasis: { flexBasis: {
'7.5': '1.875rem', '7.5': '1.875rem',
'25': '6.25rem', '25': '6.25rem',
'37.5': '9.375rem' '37.5': '9.375rem',
'62.5': '15.625rem',
'72.5': '18.125rem'
}, },
flex: { flex: {
full: '1 1 100%' full: '1 1 100%'
}, },
gap: { gap: {
'0.75': '0.1875rem', '0.75': '0.1875rem',
'1.25': '0.3125rem' '1.25': '0.3125rem',
'6.25': '1.5625rem'
}, },
minHeight: { minHeight: {
'19': '4.75rem' '19': '4.75rem'
@ -97,7 +100,9 @@ module.exports = {
minWidth: { minWidth: {
'7.5': '1.875rem', '7.5': '1.875rem',
'25': '6.25rem', '25': '6.25rem',
'37.5': '9.375rem' '37.5': '9.375rem',
'62.5': '15.625rem',
'72.5': '18.125rem'
}, },
maxWidth: { maxWidth: {
'5%': '5%', '5%': '5%',
@ -143,7 +148,9 @@ module.exports = {
'11/12': '91.666667%', '11/12': '91.666667%',
'7.5': '1.875rem', '7.5': '1.875rem',
'25': '6.25rem', '25': '6.25rem',
'37.5': '9.375rem' '37.5': '9.375rem',
'62.5': '15.625rem',
'72.5': '18.125rem'
} }
}, },
}, },