Browse Source

Flex layout replacements. Switch to tailwind.css.

pull/11838/head
Igor Kulikov 2 years ago
parent
commit
2626b56d45
  1. 10
      ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-select.component.html
  2. 2
      ui-ngx/src/app/modules/home/components/alarm/alarm-table.component.html
  3. 2
      ui-ngx/src/app/modules/home/components/audit-log/audit-log-table.component.html
  4. 3
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.html
  5. 2
      ui-ngx/src/app/modules/home/components/filter/filter-text.component.html
  6. 2
      ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.html
  7. 2
      ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits-text.component.html
  8. 13
      ui-ngx/src/app/modules/home/components/widget/lib/legend.component.html
  9. 10
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts
  10. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings.component.html
  11. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-range-settings.component.html
  12. 2
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings.component.html
  13. 20
      ui-ngx/src/app/modules/home/components/widget/widget-container.component.html
  14. 8
      ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts
  15. 12
      ui-ngx/src/app/modules/home/pages/security/authentication-dialog/backup-code-auth-dialog.component.html
  16. 16
      ui-ngx/src/app/modules/home/pages/security/authentication-dialog/email-auth-dialog.component.html
  17. 16
      ui-ngx/src/app/modules/home/pages/security/authentication-dialog/sms-auth-dialog.component.html
  18. 16
      ui-ngx/src/app/modules/home/pages/security/authentication-dialog/totp-auth-dialog.component.html
  19. 24
      ui-ngx/src/app/modules/home/pages/tenant/tenant.component.html
  20. 10
      ui-ngx/src/app/modules/home/pages/user/activation-link-dialog.component.html
  21. 4
      ui-ngx/src/app/modules/home/pages/user/add-user-dialog.component.html
  22. 38
      ui-ngx/src/app/modules/home/pages/user/user.component.html
  23. 4
      ui-ngx/src/app/modules/home/pages/widget/save-widget-type-as-dialog.component.html
  24. 6
      ui-ngx/src/app/modules/home/pages/widget/select-widget-type-dialog.component.html
  25. 35
      ui-ngx/src/app/modules/home/pages/widget/widget-editor.component.html
  26. 16
      ui-ngx/src/app/modules/home/pages/widget/widget-type.component.html
  27. 4
      ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-dialog.component.html
  28. 4
      ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.html
  29. 14
      ui-ngx/src/app/modules/home/pages/widget/widgets-bundle.component.html
  30. 1
      ui-ngx/tailwind.config.js

10
ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-select.component.html

@ -16,16 +16,16 @@
--> -->
<ng-container [formGroup]="assigneeFormGroup"> <ng-container [formGroup]="assigneeFormGroup">
<mat-form-field [ngStyle]="inline ? {width: '100%'} : {marginBottom: '25px'}" <mat-form-field [style]="inline ? {width: '100%'} : {marginBottom: '25px'}"
(click)="openAlarmAssigneeSelectPanel($event)" (click)="openAlarmAssigneeSelectPanel($event)"
subscriptSizing="dynamic" [appearance]="inline ? 'outline' : 'fill'"> subscriptSizing="dynamic" [appearance]="inline ? 'outline' : 'fill'">
<mat-label *ngIf="!inline" translate>alarm.assignee</mat-label> <mat-label *ngIf="!inline" translate>alarm.assignee</mat-label>
<input matInput readonly formControlName="assignee"> <input matInput readonly formControlName="assignee">
<span *ngIf="assignee" matPrefix class="user-avatar" [ngClass]="{'inline': inline}" <span *ngIf="assignee" matPrefix class="user-avatar" [class.inline]="inline"
[style.backgroundColor]="getAvatarBgColor()"> [style.background-color]="getAvatarBgColor()">
{{ getUserInitials() }} {{ getUserInitials() }}
</span> </span>
<mat-icon *ngIf="!assignee" matPrefix class="unassigned-icon" [ngClass]="{'inline': inline}">account_circle</mat-icon> <mat-icon *ngIf="!assignee" matPrefix class="unassigned-icon" [class.inline]="inline">account_circle</mat-icon>
<mat-icon *ngIf="!disabled" matSuffix class="drop-down-icon" [ngClass]="{'inline': inline}">arrow_drop_down</mat-icon> <mat-icon *ngIf="!disabled" matSuffix class="drop-down-icon" [class.inline]="inline">arrow_drop_down</mat-icon>
</mat-form-field> </mat-form-field>
</ng-container> </ng-container>

2
ui-ngx/src/app/modules/home/components/alarm/alarm-table.component.html

@ -15,4 +15,4 @@
limitations under the License. limitations under the License.
--> -->
<tb-entities-table [entitiesTableConfig]="alarmTableConfig" [ngClass]="{'tb-details-mode': detailsMode}"></tb-entities-table> <tb-entities-table [entitiesTableConfig]="alarmTableConfig" [class.tb-details-mode]="detailsMode"></tb-entities-table>

2
ui-ngx/src/app/modules/home/components/audit-log/audit-log-table.component.html

@ -15,4 +15,4 @@
limitations under the License. limitations under the License.
--> -->
<tb-entities-table [entitiesTableConfig]="auditLogTableConfig" [ngClass]="{'tb-details-mode': detailsMode}"></tb-entities-table> <tb-entities-table [entitiesTableConfig]="auditLogTableConfig" [class.tb-details-mode]="detailsMode"></tb-entities-table>

3
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-toolbar.component.html

@ -16,7 +16,8 @@
--> -->
<mat-fab-toolbar [isOpen]="toolbarOpened" color="primary" direction="left" <mat-fab-toolbar [isOpen]="toolbarOpened" color="primary" direction="left"
[ngClass]="{'is-fullscreen': forceFullscreen, 'mat-elevation-z1': forceFullscreen && toolbarOpened }"> [class.is-fullscreen]="forceFullscreen"
[class.mat-elevation-z1]="forceFullscreen && toolbarOpened">
<mat-fab-trigger> <mat-fab-trigger>
<button mat-fab color="primary" <button mat-fab color="primary"
[matTooltip]="!toolbarOpened ? ('dashboard.open-toolbar' | translate) : ''" [matTooltip]="!toolbarOpened ? ('dashboard.open-toolbar' | translate) : ''"

2
ui-ngx/src/app/modules/home/components/filter/filter-text.component.html

@ -15,5 +15,5 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-filter-text" [ngClass]="{disabled: disabled, required: requiredClass, nowrap: nowrap}" <div class="tb-filter-text" [class.disabled]="disabled" [class.required]="requiredClass" [class.nowrap]="nowrap"
[innerHTML]="filterText"></div> [innerHTML]="filterText"></div>

2
ui-ngx/src/app/modules/home/components/profile/alarm/device-profile-alarms.component.html

@ -19,7 +19,7 @@
<div class="tb-device-profile-alarms"> <div class="tb-device-profile-alarms">
<div *ngFor="let alarmControl of alarmsFormArray.controls; trackBy: trackByAlarm; <div *ngFor="let alarmControl of alarmsFormArray.controls; trackBy: trackByAlarm;
let $index = index; last as isLast;" let $index = index; last as isLast;"
class="flex flex-col" [ngStyle]="!isLast ? {paddingBottom: '8px'} : {}"> class="flex flex-col" [class.pb-2]="!isLast">
<tb-device-profile-alarm [formControl]="alarmControl" <tb-device-profile-alarm [formControl]="alarmControl"
[expanded]="$index === 0" [expanded]="$index === 0"
[deviceProfileId]="deviceProfileId" [deviceProfileId]="deviceProfileId"

2
ui-ngx/src/app/modules/home/components/profile/tenant/rate-limits/rate-limits-text.component.html

@ -15,4 +15,4 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-rate-limits-text" [ngClass]="{disabled: disabled}" [innerHTML]="rateLimitsText"></div> <div class="tb-rate-limits-text" [class.disabled]="disabled" [innerHTML]="rateLimitsText"></div>

13
ui-ngx/src/app/modules/home/components/widget/lib/legend.component.html

@ -15,7 +15,7 @@
limitations under the License. limitations under the License.
--> -->
<table class="tb-legend" [ngClass]="isRowDirection ? 'tb-legend-row' : 'tb-legend-column'"> <table class="tb-legend" [class.tb-legend-row]="isRowDirection" [class.tb-legend-column]="!isRowDirection">
<thead> <thead>
<tr class="tb-legend-header" *ngIf="!isRowDirection"> <tr class="tb-legend-header" *ngIf="!isRowDirection">
<th colspan="2"></th> <th colspan="2"></th>
@ -29,11 +29,12 @@
<tbody> <tbody>
<ng-container *ngIf="!isRowDirection"> <ng-container *ngIf="!isRowDirection">
<tr class="tb-legend-keys" *ngFor="let legendKey of legendKeys()"> <tr class="tb-legend-keys" *ngFor="let legendKey of legendKeys()">
<td><span class="tb-legend-line" [ngStyle]="{backgroundColor: legendKey.dataKey.color}"></span></td> <td><span class="tb-legend-line" [style.background-color]="legendKey.dataKey.color"></span></td>
<td class="tb-legend-label" <td class="tb-legend-label"
(click)="toggleHideData(legendKey.dataIndex)" (click)="toggleHideData(legendKey.dataIndex)"
[innerHTML]="legendKey.dataKey.label | safe: 'html'" [innerHTML]="legendKey.dataKey.label | safe: 'html'"
[ngClass]="{ 'tb-hidden-label': legendKey.dataKey.hidden, 'tb-horizontal': isHorizontal }"> [class.tb-hidden-label]="legendKey.dataKey.hidden"
[class.tb-horizontal]="isHorizontal">
</td> </td>
<td class="tb-legend-value" *ngIf="legendConfig.showMin === true" <td class="tb-legend-value" *ngIf="legendConfig.showMin === true"
[innerHTML]="legendData.data[legendKey.dataIndex].min | safe: 'html'"></td> [innerHTML]="legendData.data[legendKey.dataIndex].min | safe: 'html'"></td>
@ -47,14 +48,14 @@
[innerHTML]="legendData.data[legendKey.dataIndex].latest | safe: 'html'"></td> [innerHTML]="legendData.data[legendKey.dataIndex].latest | safe: 'html'"></td>
</tr> </tr>
</ng-container> </ng-container>
<tr *ngIf="isRowDirection" class="tb-legend-keys" [ngClass]="{ 'tb-row-direction': !displayHeader }"> <tr *ngIf="isRowDirection" class="tb-legend-keys" [class.tb-row-direction]="!displayHeader">
<td></td> <td></td>
<td *ngFor="let legendKey of legendKeys()"> <td *ngFor="let legendKey of legendKeys()">
<span class="tb-legend-line" [ngStyle]="{backgroundColor: legendKey.dataKey.color}"></span> <span class="tb-legend-line" [style.background-color]="legendKey.dataKey.color"></span>
<span class="tb-legend-label" <span class="tb-legend-label"
[innerHTML]="legendKey.dataKey.label | safe: 'html'" [innerHTML]="legendKey.dataKey.label | safe: 'html'"
(click)="toggleHideData(legendKey.dataIndex)" (click)="toggleHideData(legendKey.dataIndex)"
[ngClass]="{ 'tb-hidden-label': legendKey.dataKey.hidden}"> [class.tb-hidden-label]="legendKey.dataKey.hidden">
</span> </span>
</td> </td>
</tr> </tr>

10
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts

@ -49,24 +49,24 @@ const processImageFunctionTemplate =
' imageDialogTemplate =\n' + ' imageDialogTemplate =\n' +
' \'<div aria-label="Image">\' +\n' + ' \'<div aria-label="Image">\' +\n' +
' \'<form #theForm="ngForm">\' +\n' + ' \'<form #theForm="ngForm">\' +\n' +
' \'<mat-toolbar fxLayout="row" color="primary">\' +\n' + ' \'<mat-toolbar class="flex flex-row" color="primary">\' +\n' +
' \'<h2>{{title}}</h2>\' +\n' + ' \'<h2>{{title}}</h2>\' +\n' +
' \'<span fxFlex></span>\' +\n' + ' \'<span class="flex-1"></span>\' +\n' +
' \'<button mat-icon-button (click)="close()">\' +\n' + ' \'<button mat-icon-button (click)="close()">\' +\n' +
' \'<mat-icon>close</mat-icon>\' +\n' + ' \'<mat-icon>close</mat-icon>\' +\n' +
' \'</button>\' +\n' + ' \'</button>\' +\n' +
' \'</mat-toolbar>\' +\n' + ' \'</mat-toolbar>\' +\n' +
' \'<div mat-dialog-content>\' +\n' + ' \'<div mat-dialog-content>\' +\n' +
' \'<div class="mat-content mat-padding">\' +\n' + ' \'<div class="mat-content mat-padding">\' +\n' +
' \'<div fxLayout="column" fxFlex>\' +\n' + ' \'<div class="flex flex-1 flex-col">\' +\n' +
' \'<div style="padding-top: 20px;">\' +\n' + ' \'<div style="padding-top: 20px;">\' +\n' +
' \'<img [src]="imageUrl" style="height: 300px;"/>\' +\n' + ' \'<img [src]="imageUrl" style="height: 300px;"/>\' +\n' +
' \'</div>\' +\n' + ' \'</div>\' +\n' +
' \'</div>\' +\n' + ' \'</div>\' +\n' +
' \'</div>\' +\n' + ' \'</div>\' +\n' +
' \'</div>\' +\n' + ' \'</div>\' +\n' +
' \'<div mat-dialog-actions fxLayout="row">\' +\n' + ' \'<div mat-dialog-actions class="flex flex-row">\' +\n' +
' \'<span fxFlex></span>\' +\n' + ' \'<span class="flex-1"></span>\' +\n' +
' \'<button mat-button (click)="close()" style="margin-right:20px;">Close</button>\' +\n' + ' \'<button mat-button (click)="close()" style="margin-right:20px;">Close</button>\' +\n' +
' \'</div>\' +\n' + ' \'</div>\' +\n' +
' \'</form>\' +\n' + ' \'</form>\' +\n' +

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/background-settings.component.html

@ -21,7 +21,7 @@
[disabled]="disabled" [disabled]="disabled"
#matButton #matButton
(click)="openBackgroundSettingsPopup($event, matButton)"> (click)="openBackgroundSettingsPopup($event, matButton)">
<div class="tb-color-preview box" [ngClass]="{'disabled': disabled}"> <div class="tb-color-preview box" [class.disabled]="disabled">
<div class="tb-color-result" [style]="backgroundStyle$ | async"> <div class="tb-color-result" [style]="backgroundStyle$ | async">
<div class="tb-color-overlay" [style]="overlayStyle"> <div class="tb-color-overlay" [style]="overlayStyle">
</div> </div>

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-range-settings.component.html

@ -21,7 +21,7 @@
[disabled]="disabled" [disabled]="disabled"
#matButton #matButton
(click)="openColorRangeSettingsPopup($event, matButton)"> (click)="openColorRangeSettingsPopup($event, matButton)">
<div class="tb-color-preview box" [ngClass]="{'disabled': disabled}"> <div class="tb-color-preview box" [class.disabled]="disabled">
<div class="tb-color-result" [style]="colorStyle"></div> <div class="tb-color-result" [style]="colorStyle"></div>
</div> </div>
</button> </button>

2
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/color-settings.component.html

@ -24,7 +24,7 @@
<tb-icon matButtonIcon *ngIf="modelValue?.type === colorType.function; else colorPreview">mdi:function-variant</tb-icon> <tb-icon matButtonIcon *ngIf="modelValue?.type === colorType.function; else colorPreview">mdi:function-variant</tb-icon>
</button> </button>
<ng-template #colorPreview> <ng-template #colorPreview>
<div class="tb-color-preview box" [ngClass]="{'disabled': disabled}"> <div class="tb-color-preview box" [class.disabled]="disabled">
<div class="tb-color-result" [style]="colorStyle"></div> <div class="tb-color-result" [style]="colorStyle"></div>
</div> </div>
</ng-template> </ng-template>

20
ui-ngx/src/app/modules/home/components/widget/widget-container.component.html

@ -20,16 +20,14 @@
[fullscreenBackgroundImage]="backgroundImage" [fullscreenBackgroundImage]="backgroundImage"
(fullscreenChanged)="onFullscreenChanged($event)" (fullscreenChanged)="onFullscreenChanged($event)"
class="tb-widget" class="tb-widget"
[ngClass]="{ [class.tb-highlighted]="isHighlighted(widget)"
'tb-highlighted': isHighlighted(widget), [class.tb-not-highlighted]="isNotHighlighted(widget)"
'tb-not-highlighted': isNotHighlighted(widget), [class.mat-elevation-z4]="widget.dropShadow"
'mat-elevation-z4': widget.dropShadow, [class.tb-overflow-visible]="widgetComponent.widgetContext?.overflowVisible"
'tb-overflow-visible': widgetComponent.widgetContext?.overflowVisible, [class.tb-has-timewindow]="widget.hasTimewindow"
'tb-has-timewindow': widget.hasTimewindow, [class.tb-edit]="isEdit || isEditingWidget"
'tb-edit': isEdit || isEditingWidget, [class.tb-hover]="hovered"
'tb-hover': hovered [style]="widget.style">
}"
[ngStyle]="widget.style">
<div *ngIf="!!widgetComponent.widgetContext?.inited" <div *ngIf="!!widgetComponent.widgetContext?.inited"
class="tb-widget-header"> class="tb-widget-header">
<ng-container *ngIf="!widgetComponent.widgetContext?.embedTitlePanel"> <ng-container *ngIf="!widgetComponent.widgetContext?.embedTitlePanel">
@ -62,7 +60,7 @@
</button> </button>
</div> </div>
</div> </div>
<div class="tb-widget-content" [ngClass]="{'tb-no-interaction': disableWidgetInteraction}"> <div class="tb-widget-content" [class.tb-no-interaction]="disableWidgetInteraction">
<tb-widget #widgetComponent <tb-widget #widgetComponent
[dashboardWidget]="widget" [dashboardWidget]="widget"
[isEdit]="isEdit" [isEdit]="isEdit"

8
ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts

@ -385,7 +385,7 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
{{ 'widget.reference' | translate }} {{ 'widget.reference' | translate }}
<button mat-icon-button class="tb-mat-16" <button mat-icon-button class="tb-mat-16"
color="primary" color="primary"
[fxShow]="container.isEditActionEnabled" [class.!hidden]="!container.isEditActionEnabled"
(click)="container.onReplaceReferenceWithWidgetCopy($event)" (click)="container.onReplaceReferenceWithWidgetCopy($event)"
matTooltip="{{ 'widget.replace-reference-with-widget-copy' | translate }}" matTooltip="{{ 'widget.replace-reference-with-widget-copy' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">
@ -394,21 +394,21 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
</div> </div>
<div class="tb-widget-actions-panel"> <div class="tb-widget-actions-panel">
<button mat-icon-button class="tb-mat-20" <button mat-icon-button class="tb-mat-20"
[fxShow]="container.isEditActionEnabled" [class.!hidden]="!container.isEditActionEnabled"
(click)="container.onEdit($event)" (click)="container.onEdit($event)"
matTooltip="{{ 'widget.edit' | translate }}" matTooltip="{{ 'widget.edit' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">
<tb-icon>edit</tb-icon> <tb-icon>edit</tb-icon>
</button> </button>
<button mat-icon-button class="tb-mat-20" <button mat-icon-button class="tb-mat-20"
[fxShow]="container.isExportActionEnabled" [class.!hidden]="!container.isExportActionEnabled"
(click)="container.onExport($event)" (click)="container.onExport($event)"
matTooltip="{{ 'widget.export' | translate }}" matTooltip="{{ 'widget.export' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">
<tb-icon>file_download</tb-icon> <tb-icon>file_download</tb-icon>
</button> </button>
<button mat-icon-button class="tb-mat-20" <button mat-icon-button class="tb-mat-20"
[fxShow]="container.isRemoveActionEnabled" [class.!hidden]="!container.isRemoveActionEnabled"
(click)="container.onRemove($event);" (click)="container.onRemove($event);"
matTooltip="{{ 'widget.remove' | translate }}" matTooltip="{{ 'widget.remove' | translate }}"
matTooltipPosition="above"> matTooltipPosition="above">

12
ui-ngx/src/app/modules/home/pages/security/authentication-dialog/backup-code-auth-dialog.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar class="flex flex-row" color="primary">
<h2 translate>security.2fa.dialog.get-backup-code-title</h2> <h2 translate>security.2fa.dialog.get-backup-code-title</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="closeDialog()" (click)="closeDialog()"
type="button"> type="button">
@ -29,12 +29,12 @@
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<div mat-dialog-content tb-toast class="backup-code"> <div mat-dialog-content tb-toast class="backup-code">
<p class="mat-body-2 description" translate>security.2fa.dialog.backup-code-description</p> <p class="mat-body-2 description" translate>security.2fa.dialog.backup-code-description</p>
<div class="container" fxLayout="row wrap"> <div class="container flex flex-row flex-wrap">
<div *ngFor="let code of backupCode?.codes; even as $even" fxFlex="50" class="code" [ngClass]="{'even': $even}"> <div *ngFor="let code of backupCode?.codes; even as $even" class="code max-w-50% flex-full" [class.even]="$even">
{{ code }} {{ code }}
</div> </div>
</div> </div>
<div fxLayout="row" fxLayoutAlign="center start" fxLayoutGap="16px" class="action-buttons"> <div class="action-buttons flex flex-row items-center justify-start gap-4">
<button type="button" mat-stroked-button color="primary" (click)="downloadFile()"> <button type="button" mat-stroked-button color="primary" (click)="downloadFile()">
{{ 'security.2fa.dialog.download-txt' | translate }} {{ 'security.2fa.dialog.download-txt' | translate }}
</button> </button>
@ -43,7 +43,7 @@
</button> </button>
</div> </div>
<p class="mat-body-2 description" translate>security.2fa.dialog.backup-code-warn</p> <p class="mat-body-2 description" translate>security.2fa.dialog.backup-code-warn</p>
<div fxLayout="row" fxLayoutAlign="end start"> <div class="flex flex-row items-start justify-end">
<button type="button" mat-raised-button color="primary" (click)="closeDialog()"> <button type="button" mat-raised-button color="primary" (click)="closeDialog()">
{{ 'action.done' | translate }} {{ 'action.done' | translate }}
</button> </button>

16
ui-ngx/src/app/modules/home/pages/security/authentication-dialog/email-auth-dialog.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar class="flex flex-row" color="primary">
<h2 translate>security.2fa.dialog.enable-email-title</h2> <h2 translate>security.2fa.dialog.enable-email-title</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="closeDialog()" (click)="closeDialog()"
type="button"> type="button">
@ -36,8 +36,8 @@
<ng-template matStepLabel>{{ 'security.2fa.dialog.email-step-label' | translate }}</ng-template> <ng-template matStepLabel>{{ 'security.2fa.dialog.email-step-label' | translate }}</ng-template>
<form [formGroup]="emailConfigForm" (ngSubmit)="nextStep()"> <form [formGroup]="emailConfigForm" (ngSubmit)="nextStep()">
<p class="mat-body step-description input" translate>security.2fa.dialog.email-step-description</p> <p class="mat-body step-description input" translate>security.2fa.dialog.email-step-description</p>
<div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="8px"> <div class="flex flex-row items-center justify-between gap-2">
<mat-form-field fxFlex class="mat-block input-container"> <mat-form-field class="mat-block input-container flex-1">
<input matInput formControlName="email" <input matInput formControlName="email"
type="email" required type="email" required
placeholder="{{ 'security.2fa.dialog.email-step-label' | translate }}" /> placeholder="{{ 'security.2fa.dialog.email-step-label' | translate }}" />
@ -63,8 +63,8 @@
<p class="mat-body step-description input"> <p class="mat-body step-description input">
{{ 'security.2fa.dialog.verification-step-description' | translate : {address: emailConfigForm.get('email').value} }} {{ 'security.2fa.dialog.verification-step-description' | translate : {address: emailConfigForm.get('email').value} }}
</p> </p>
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="space-between center" fxLayoutAlign.xs="start end"> <div class="flex flex-row items-center justify-between xs:flex-col xs:items-end xs:justify-start">
<mat-form-field fxFlex class="mat-block code-container full-width-xs"> <mat-form-field class="mat-block code-container full-width-xs flex-1">
<input matInput formControlName="verificationCode" <input matInput formControlName="verificationCode"
maxlength="6" type="text" required maxlength="6" type="text" required
inputmode="numeric" pattern="[0-9]*" inputmode="numeric" pattern="[0-9]*"
@ -74,7 +74,7 @@
{{ 'security.2fa.dialog.verification-code-invalid' | translate }} {{ 'security.2fa.dialog.verification-code-invalid' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div fxLayoutGap="8px"> <div class="flex gap-2">
<button mat-button <button mat-button
matStepperPrevious matStepperPrevious
[disabled]="(isLoading$ | async)"> [disabled]="(isLoading$ | async)">
@ -95,7 +95,7 @@
<div> <div>
<h3 class="result-title" translate>security.2fa.dialog.success</h3> <h3 class="result-title" translate>security.2fa.dialog.success</h3>
<p class="mat-body result-description" translate>security.2fa.dialog.activation-step-description-email</p> <p class="mat-body result-description" translate>security.2fa.dialog.activation-step-description-email</p>
<div fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-row items-center justify-end">
<button mat-raised-button <button mat-raised-button
type="button" type="button"
color="primary" color="primary"

16
ui-ngx/src/app/modules/home/pages/security/authentication-dialog/sms-auth-dialog.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar class="flex flex-row" color="primary">
<h2 translate>security.2fa.dialog.enable-sms-title</h2> <h2 translate>security.2fa.dialog.enable-sms-title</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="closeDialog()" (click)="closeDialog()"
type="button"> type="button">
@ -36,8 +36,8 @@
<ng-template matStepLabel>{{ 'security.2fa.dialog.sms-step-label' | translate }}</ng-template> <ng-template matStepLabel>{{ 'security.2fa.dialog.sms-step-label' | translate }}</ng-template>
<form [formGroup]="smsConfigForm" (ngSubmit)="nextStep()"> <form [formGroup]="smsConfigForm" (ngSubmit)="nextStep()">
<p class="mat-body step-description input" translate>security.2fa.dialog.sms-step-description</p> <p class="mat-body step-description input" translate>security.2fa.dialog.sms-step-description</p>
<div fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="15px"> <div class="flex flex-row items-center justify-between gap-3.75">
<tb-phone-input fxFlex <tb-phone-input class="flex-1"
formControlName="phone" formControlName="phone"
[floatLabel]="'never'" [floatLabel]="'never'"
placeholder="{{ 'security.2fa.dialog.sms-step-label' | translate }}"> placeholder="{{ 'security.2fa.dialog.sms-step-label' | translate }}">
@ -57,8 +57,8 @@
<p class="mat-body step-description input"> <p class="mat-body step-description input">
{{ 'security.2fa.dialog.verification-step-description' | translate : {address: smsConfigForm.get('phone').value} }} {{ 'security.2fa.dialog.verification-step-description' | translate : {address: smsConfigForm.get('phone').value} }}
</p> </p>
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="space-between center" fxLayoutAlign.xs="start end"> <div class="flex flex-row items-center justify-between xs:flex-col xs:items-end xs:justify-start">
<mat-form-field fxFlex class="mat-block code-container full-width-xs"> <mat-form-field class="mat-block code-container full-width-xs flex-1">
<input matInput formControlName="verificationCode" <input matInput formControlName="verificationCode"
maxlength="6" type="text" required maxlength="6" type="text" required
inputmode="numeric" pattern="[0-9]*" inputmode="numeric" pattern="[0-9]*"
@ -68,7 +68,7 @@
{{ 'security.2fa.dialog.verification-code-invalid' | translate }} {{ 'security.2fa.dialog.verification-code-invalid' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<div fxLayoutGap="8px"> <div class="flex gap-2">
<button mat-button <button mat-button
matStepperPrevious matStepperPrevious
[disabled]="(isLoading$ | async)"> [disabled]="(isLoading$ | async)">
@ -89,7 +89,7 @@
<div> <div>
<h3 class="result-title" translate>security.2fa.dialog.success</h3> <h3 class="result-title" translate>security.2fa.dialog.success</h3>
<p class="mat-body result-description" translate>security.2fa.dialog.activation-step-description-sms</p> <p class="mat-body result-description" translate>security.2fa.dialog.activation-step-description-sms</p>
<div fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-row items-center justify-end">
<button mat-raised-button <button mat-raised-button
type="button" type="button"
color="primary" color="primary"

16
ui-ngx/src/app/modules/home/pages/security/authentication-dialog/totp-auth-dialog.component.html

@ -15,9 +15,9 @@
limitations under the License. limitations under the License.
--> -->
<mat-toolbar fxLayout="row" color="primary"> <mat-toolbar class="flex flex-row" color="primary">
<h2 translate>security.2fa.dialog.enable-totp-title</h2> <h2 translate>security.2fa.dialog.enable-totp-title</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="closeDialog()" (click)="closeDialog()"
type="button"> type="button">
@ -37,7 +37,7 @@
<div> <div>
<p class="mat-body-2" translate>security.2fa.dialog.totp-step-description-open</p> <p class="mat-body-2" translate>security.2fa.dialog.totp-step-description-open</p>
<p class="mat-body-2" translate>security.2fa.dialog.totp-step-description-install</p> <p class="mat-body-2" translate>security.2fa.dialog.totp-step-description-install</p>
<div fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-row items-center justify-end">
<button mat-raised-button <button mat-raised-button
type="button" type="button"
color="primary" color="primary"
@ -49,11 +49,11 @@
</mat-step> </mat-step>
<mat-step [stepControl]="totpConfigForm"> <mat-step [stepControl]="totpConfigForm">
<ng-template matStepLabel>{{ 'security.2fa.dialog.verification-step-label' | translate }}</ng-template> <ng-template matStepLabel>{{ 'security.2fa.dialog.verification-step-label' | translate }}</ng-template>
<form [formGroup]="totpConfigForm" fxLayoutAlign="start center" fxLayout="column" (ngSubmit)="onSaveConfig()"> <form [formGroup]="totpConfigForm" class="flex flex-col items-center justify-start" (ngSubmit)="onSaveConfig()">
<p class="mat-body qr-code-description" translate>security.2fa.dialog.scan-qr-code</p> <p class="mat-body qr-code-description" translate>security.2fa.dialog.scan-qr-code</p>
<canvas fxFlex #canvas [ngStyle]="{display: totpAuthURL ? 'block' : 'none'}"></canvas> <canvas class="flex-1" #canvas [style.display]="totpAuthURL ? 'block' : 'none'"></canvas>
<p class="mat-body qr-code-description" style="margin-top: 30px;" translate>security.2fa.dialog.enter-verification-code</p> <p class="mat-body qr-code-description" style="margin-top: 30px;" translate>security.2fa.dialog.enter-verification-code</p>
<mat-form-field fxFlex class="mat-block code-container"> <mat-form-field class="mat-block code-container flex-1">
<input matInput formControlName="verificationCode" <input matInput formControlName="verificationCode"
maxlength="6" type="text" required maxlength="6" type="text" required
inputmode="numeric" pattern="[0-9]*" inputmode="numeric" pattern="[0-9]*"
@ -64,7 +64,7 @@
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
</form> </form>
<div fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-row items-center justify-end">
<button mat-raised-button <button mat-raised-button
type="button" type="button"
color="primary" color="primary"
@ -79,7 +79,7 @@
<div> <div>
<h3 class="result-title" translate>security.2fa.dialog.success</h3> <h3 class="result-title" translate>security.2fa.dialog.success</h3>
<p class="mat-body result-description" translate>security.2fa.dialog.activation-step-description-totp</p> <p class="mat-body result-description" translate>security.2fa.dialog.activation-step-description-totp</p>
<div fxLayout="row" fxLayoutAlign="end center"> <div class="flex flex-row items-center justify-end">
<button mat-raised-button <button mat-raised-button
type="button" type="button"
color="primary" color="primary"

24
ui-ngx/src/app/modules/home/pages/tenant/tenant.component.html

@ -15,37 +15,37 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'manageTenantAdmins')" (click)="onEntityAction($event, 'manageTenantAdmins')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'tenant.manage-tenant-admins' | translate }} {{'tenant.manage-tenant-admins' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'tenant.delete' | translate }} {{'tenant.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onTenantIdCopied($event)" (cbOnSuccess)="onTenantIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>tenant.copyId</span> <span translate>tenant.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
@ -65,22 +65,22 @@
formControlName="tenantProfileId" formControlName="tenantProfileId"
(tenantProfileUpdated)="onTenantProfileUpdated()"> (tenantProfileUpdated)="onTenantProfileUpdated()">
</tb-tenant-profile-autocomplete> </tb-tenant-profile-autocomplete>
<div formGroupName="additionalInfo" fxLayout="column"> <div formGroupName="additionalInfo" class="flex flex-col">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>tenant.description</mat-label> <mat-label translate>tenant.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea> <textarea matInput formControlName="description" rows="2"></textarea>
</mat-form-field> </mat-form-field>
<section class="tb-default-dashboard" fxFlex fxLayout="column" *ngIf="entity?.id"> <section class="tb-default-dashboard flex flex-1 flex-col" *ngIf="entity?.id">
<section fxFlex fxLayout="column" fxLayout.gt-sm="row"> <section class="flex flex-1 flex-col gt-sm:flex-row">
<tb-dashboard-autocomplete <tb-dashboard-autocomplete
fxFlex class="flex-1"
label="{{ 'dashboard.home-dashboard' | translate }}" label="{{ 'dashboard.home-dashboard' | translate }}"
formControlName="homeDashboardId" formControlName="homeDashboardId"
[dashboardsScope]="'tenant'" [dashboardsScope]="'tenant'"
[tenantId]="entity?.id.id" [tenantId]="entity?.id.id"
[selectFirstDashboard]="false" [selectFirstDashboard]="false"
></tb-dashboard-autocomplete> ></tb-dashboard-autocomplete>
<mat-checkbox fxFlex formControlName="homeDashboardHideToolbar"> <mat-checkbox class="flex-1" formControlName="homeDashboardHideToolbar">
{{ 'dashboard.home-dashboard-hide-toolbar' | translate }} {{ 'dashboard.home-dashboard-hide-toolbar' | translate }}
</mat-checkbox> </mat-checkbox>
</section> </section>

10
ui-ngx/src/app/modules/home/pages/user/activation-link-dialog.component.html

@ -18,7 +18,7 @@
<form style="min-width: 400px; position: relative;"> <form style="min-width: 400px; position: relative;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>user.activation-link</h2> <h2 translate>user.activation-link</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="close()" (click)="close()"
type="button"> type="button">
@ -29,10 +29,10 @@
</mat-progress-bar> </mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<div mat-dialog-content tb-toast toastTarget="activationLinkDialogContent"> <div mat-dialog-content tb-toast toastTarget="activationLinkDialogContent">
<div class="mat-content" fxLayout="column"> <div class="mat-content flex flex-col">
<span [innerHTML]="'user.activation-link-text' | translate: {activationLink: activationLink, activationLinkTtl: activationLinkTtl}"></span> <span [innerHTML]="'user.activation-link-text' | translate: {activationLink: activationLink, activationLinkTtl: activationLinkTtl}"></span>
<div fxLayout="row" fxLayoutAlign="start center"> <div class="flex flex-row items-center justify-start">
<pre class="tb-highlight" fxFlex><code>{{ activationLink }}</code></pre> <pre class="tb-highlight flex-1"><code>{{ activationLink }}</code></pre>
<button mat-icon-button <button mat-icon-button
color="primary" color="primary"
ngxClipboard ngxClipboard
@ -45,7 +45,7 @@
</div> </div>
</div> </div>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
cdkFocusInitial cdkFocusInitial

4
ui-ngx/src/app/modules/home/pages/user/add-user-dialog.component.html

@ -18,7 +18,7 @@
<form (ngSubmit)="add()" style="min-width: 450px;"> <form (ngSubmit)="add()" style="min-width: 450px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>user.add</h2> <h2 translate>user.add</h2>
<span fxFlex></span> <span class="flex-1"></span>
<div [tb-help]="'users'"></div> <div [tb-help]="'users'"></div>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
@ -40,7 +40,7 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
cdkFocusInitial cdkFocusInitial

38
ui-ngx/src/app/modules/home/pages/user/user.component.html

@ -15,63 +15,63 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'disableAccount')" (click)="onEntityAction($event, 'disableAccount')"
[fxShow]="!isEdit && isUserCredentialPresent() && isUserCredentialsEnabled()"> [class.!hidden]="isEdit || !isUserCredentialPresent() || !isUserCredentialsEnabled()">
{{'user.disable-account' | translate }} {{'user.disable-account' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'enableAccount')" (click)="onEntityAction($event, 'enableAccount')"
[fxShow]="!isEdit && isUserCredentialPresent() && !isUserCredentialsEnabled()"> [class.!hidden]="isEdit || !isUserCredentialPresent() || isUserCredentialsEnabled()">
{{'user.enable-account' | translate }} {{'user.enable-account' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'displayActivationLink')" (click)="onEntityAction($event, 'displayActivationLink')"
[fxShow]="!isEdit && !isUserCredentialPresent()"> [class.!hidden]="isEdit || isUserCredentialPresent()">
{{'user.display-activation-link' | translate }} {{'user.display-activation-link' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'resendActivation')" (click)="onEntityAction($event, 'resendActivation')"
[fxShow]="!isEdit && !isUserCredentialPresent()"> [class.!hidden]="isEdit || isUserCredentialPresent()">
{{'user.resend-activation' | translate }} {{'user.resend-activation' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'loginAsUser')" (click)="onEntityAction($event, 'loginAsUser')"
*ngIf="loginAsUserEnabled$ | async" *ngIf="loginAsUserEnabled$ | async"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{ (entity?.authority === authority.TENANT_ADMIN ? 'user.login-as-tenant-admin' : 'user.login-as-customer-user') | translate }} {{ (entity?.authority === authority.TENANT_ADMIN ? 'user.login-as-tenant-admin' : 'user.login-as-customer-user') | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'user.delete' | translate }} {{'user.delete' | translate }}
</button> </button>
<div fxLayout="row" fxLayout.xs="column"> <div class="flex flex-row xs:flex-col">
<button mat-raised-button <button mat-raised-button
ngxClipboard ngxClipboard
(cbOnSuccess)="onUserIdCopied($event)" (cbOnSuccess)="onUserIdCopied($event)"
[cbContent]="entity?.id?.id" [cbContent]="entity?.id?.id"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>user.copyId</span> <span translate>user.copyId</span>
</button> </button>
</div> </div>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
@ -97,15 +97,15 @@
[enableFlagsSelect]="true" [enableFlagsSelect]="true"
formControlName="phone"> formControlName="phone">
</tb-phone-input> </tb-phone-input>
<div formGroupName="additionalInfo" fxLayout="column"> <div formGroupName="additionalInfo" class="flex flex-col">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
<mat-label translate>user.description</mat-label> <mat-label translate>user.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea> <textarea matInput formControlName="description" rows="2"></textarea>
</mat-form-field> </mat-form-field>
<section class="tb-default-dashboard" fxFlex fxLayout="column" *ngIf="entity?.id"> <section class="tb-default-dashboard flex flex-1 flex-col" *ngIf="entity?.id">
<section fxFlex fxLayout="column" fxLayout.gt-sm="row"> <section class="flex flex-1 flex-col gt-sm:flex-row">
<tb-dashboard-autocomplete <tb-dashboard-autocomplete
fxFlex class="flex-1"
label="{{ 'user.default-dashboard' | translate }}" label="{{ 'user.default-dashboard' | translate }}"
formControlName="defaultDashboardId" formControlName="defaultDashboardId"
[dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'" [dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'"
@ -113,13 +113,13 @@
[customerId]="entity?.customerId?.id" [customerId]="entity?.customerId?.id"
[selectFirstDashboard]="false" [selectFirstDashboard]="false"
></tb-dashboard-autocomplete> ></tb-dashboard-autocomplete>
<mat-checkbox fxFlex formControlName="defaultDashboardFullscreen"> <mat-checkbox class="flex-1" formControlName="defaultDashboardFullscreen">
{{ 'user.always-fullscreen' | translate }} {{ 'user.always-fullscreen' | translate }}
</mat-checkbox> </mat-checkbox>
</section> </section>
<section fxFlex fxLayout="column" fxLayout.gt-sm="row"> <section class="flex flex-1 flex-col gt-sm:flex-row">
<tb-dashboard-autocomplete <tb-dashboard-autocomplete
fxFlex class="flex-1"
label="{{ 'dashboard.home-dashboard' | translate }}" label="{{ 'dashboard.home-dashboard' | translate }}"
formControlName="homeDashboardId" formControlName="homeDashboardId"
[dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'" [dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'"
@ -127,7 +127,7 @@
[customerId]="entity?.customerId?.id" [customerId]="entity?.customerId?.id"
[selectFirstDashboard]="false" [selectFirstDashboard]="false"
></tb-dashboard-autocomplete> ></tb-dashboard-autocomplete>
<mat-checkbox fxFlex formControlName="homeDashboardHideToolbar"> <mat-checkbox class="flex-1" formControlName="homeDashboardHideToolbar">
{{ 'dashboard.home-dashboard-hide-toolbar' | translate }} {{ 'dashboard.home-dashboard-hide-toolbar' | translate }}
</mat-checkbox> </mat-checkbox>
</section> </section>

4
ui-ngx/src/app/modules/home/pages/widget/save-widget-type-as-dialog.component.html

@ -18,7 +18,7 @@
<form [formGroup]="saveWidgetTypeAsFormGroup" (ngSubmit)="saveAs()" style="min-width: 360px"> <form [formGroup]="saveWidgetTypeAsFormGroup" (ngSubmit)="saveAs()" style="min-width: 360px">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>{{ dialogTitle }}</h2> <h2 translate>{{ dialogTitle }}</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
@ -43,7 +43,7 @@
bundlesScope="{{bundlesScope}}"> bundlesScope="{{bundlesScope}}">
</tb-widgets-bundle-select> </tb-widgets-bundle-select>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

6
ui-ngx/src/app/modules/home/pages/widget/select-widget-type-dialog.component.html

@ -18,7 +18,7 @@
<form style="width: 800px;"> <form style="width: 800px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>widget.select-widget-type</h2> <h2 translate>widget.select-widget-type</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
@ -30,7 +30,7 @@
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<div mat-dialog-content> <div mat-dialog-content>
<fieldset [disabled]="(isLoading$ | async)"> <fieldset [disabled]="(isLoading$ | async)">
<div fxLayout="column" fxLayoutGap="16px" fxLayout.gt-sm="row" fxLayoutAlign="center center"> <div class="flex flex-col items-center justify-center gap-4 gt-sm:flex-row">
<button *ngFor="let type of allWidgetTypes;" class="tb-card-button" mat-raised-button color="primary" <button *ngFor="let type of allWidgetTypes;" class="tb-card-button" mat-raised-button color="primary"
type="button" type="button"
(click)="typeSelected(widgetTypes[type])"> (click)="typeSelected(widgetTypes[type])">
@ -42,7 +42,7 @@
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"

35
ui-ngx/src/app/modules/home/pages/widget/widget-editor.component.html

@ -15,10 +15,10 @@
limitations under the License. limitations under the License.
--> -->
<div fxFlex fxLayout="column"> <div class="flex flex-1 flex-col">
<div fxFlex fxLayout="column" tb-fullscreen [fullscreen]="fullscreen" [tb-hotkeys]="hotKeys" [cheatSheet]="cheatSheetComponent"> <div class="flex flex-1 flex-col" tb-fullscreen [fullscreen]="fullscreen" [tb-hotkeys]="hotKeys" [cheatSheet]="cheatSheetComponent">
<tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet> <tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet>
<mat-toolbar class="mat-elevation-z1 tb-edit-toolbar mat-hue-3" fxLayoutGap="16px" fxLayoutGap.lt-xl="8px"> <mat-toolbar class="mat-elevation-z1 tb-edit-toolbar mat-hue-3 gap-4 lt-xl:gap-2">
<mat-form-field class="tb-widget-title tb-appearance-transparent"> <mat-form-field class="tb-widget-title tb-appearance-transparent">
<input [disabled]="isReadOnly" matInput required maxlength="255" <input [disabled]="isReadOnly" matInput required maxlength="255"
[(ngModel)]="widget.widgetName" (ngModelChange)="isDirty = true" [(ngModel)]="widget.widgetName" (ngModelChange)="isDirty = true"
@ -32,8 +32,8 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-button fxHide.lt-md [disabled]="!iframeWidgetEditModeInited" <button mat-button class="lt-md:!hidden" [disabled]="!iframeWidgetEditModeInited"
(click)="applyWidgetScript()" (click)="applyWidgetScript()"
matTooltip="{{ 'widget.run' | translate }} (CTRL + Return)" matTooltip="{{ 'widget.run' | translate }} (CTRL + Return)"
matTooltipPosition="below"> matTooltipPosition="below">
@ -41,7 +41,7 @@
<span translate>action.run</span> <span translate>action.run</span>
</button> </button>
<button mat-raised-button <button mat-raised-button
fxHide.lt-md [disabled]="(isLoading$ | async) || undoDisabled()" class="lt-md:!hidden" [disabled]="(isLoading$ | async) || undoDisabled()"
(click)="undoWidget()" (click)="undoWidget()"
matTooltip="{{ 'widget.undo' | translate }} (CTRL + Q)" matTooltip="{{ 'widget.undo' | translate }} (CTRL + Q)"
matTooltipPosition="below"> matTooltipPosition="below">
@ -49,7 +49,7 @@
<span translate>action.undo</span> <span translate>action.undo</span>
</button> </button>
<button *ngIf="!isReadOnly" mat-raised-button <button *ngIf="!isReadOnly" mat-raised-button
fxHide.lt-md [disabled]="(isLoading$ | async) || saveDisabled()" class="lt-md:!hidden" [disabled]="(isLoading$ | async) || saveDisabled()"
(click)="saveWidget()" (click)="saveWidget()"
[tb-circular-progress]="saveWidgetPending" [tb-circular-progress]="saveWidgetPending"
matTooltip="{{ 'widget.save' | translate }} (CTRL + S)" matTooltip="{{ 'widget.save' | translate }} (CTRL + S)"
@ -58,7 +58,7 @@
<span translate>action.save</span> <span translate>action.save</span>
</button> </button>
<button mat-raised-button <button mat-raised-button
fxHide.lt-md [disabled]="(isLoading$ | async) || saveAsDisabled()" class="lt-md:!hidden" [disabled]="(isLoading$ | async) || saveAsDisabled()"
(click)="saveWidgetAs()" (click)="saveWidgetAs()"
[tb-circular-progress]="saveWidgetAsPending" [tb-circular-progress]="saveWidgetAsPending"
matTooltip="{{ 'widget.saveAs' | translate }} (Shift + CTRL + S)" matTooltip="{{ 'widget.saveAs' | translate }} (Shift + CTRL + S)"
@ -67,20 +67,20 @@
<span translate>action.saveAs</span> <span translate>action.saveAs</span>
</button> </button>
<button mat-button <button mat-button
fxHide.lt-lg class="lt-lg:!hidden"
(click)="fullscreen = !fullscreen" (click)="fullscreen = !fullscreen"
matTooltip="{{ 'widget.toggle-fullscreen' | translate }} (Shift + CTRL + F)" matTooltip="{{ 'widget.toggle-fullscreen' | translate }} (Shift + CTRL + F)"
matTooltipPosition="below"> matTooltipPosition="below">
<mat-icon>{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon> <mat-icon>{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>
<span translate>widget.toggle-fullscreen</span> <span translate>widget.toggle-fullscreen</span>
</button> </button>
<button mat-icon-button fxHide fxShow.md <button mat-icon-button class="lt-md:!hidden gt-md:!hidden"
(click)="fullscreen = !fullscreen" (click)="fullscreen = !fullscreen"
matTooltip="{{ 'widget.toggle-fullscreen' | translate }} (Shift + CTRL + F)" matTooltip="{{ 'widget.toggle-fullscreen' | translate }} (Shift + CTRL + F)"
matTooltipPosition="below"> matTooltipPosition="below">
<mat-icon>{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon> <mat-icon>{{ fullscreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>
</button> </button>
<button mat-icon-button fxHide.gt-sm <button mat-icon-button class="gt-md:!hidden"
[matMenuTriggerFor]="widgetEditMenu"> [matMenuTriggerFor]="widgetEditMenu">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>
</button> </button>
@ -111,7 +111,7 @@
</button> </button>
</mat-menu> </mat-menu>
</mat-toolbar> </mat-toolbar>
<div fxFlex style="position: relative;"> <div class="flex-1" style="position: relative;">
<div class="tb-editor tb-absolute-fill"> <div class="tb-editor tb-absolute-fill">
<div #topPanel class="tb-split tb-split-vertical"> <div #topPanel class="tb-split tb-split-vertical">
<div #topLeftPanel class="tb-split tb-content"> <div #topLeftPanel class="tb-split tb-content">
@ -119,10 +119,9 @@
<mat-tab label="{{ 'widget.resources' | translate }}"> <mat-tab label="{{ 'widget.resources' | translate }}">
<div class="tb-resize-container" style="background-color: #fff;"> <div class="tb-resize-container" style="background-color: #fff;">
<div class="mat-padding"> <div class="mat-padding">
<div fxFlex fxLayout="row" style="max-height: 40px;" <div class="flex flex-1 flex-row items-center justify-start" style="max-height: 40px;"
fxLayoutAlign="start center"
*ngFor="let resource of widget.resources; let i = index" > *ngFor="let resource of widget.resources; let i = index" >
<tb-resource-autocomplete fxFlex class="mat-block resource-field" <tb-resource-autocomplete class="mat-block resource-field flex-1"
hideRequiredMarker required hideRequiredMarker required
subscriptSizing="dynamic" subscriptSizing="dynamic"
[allowAutocomplete]="resource.isModule" [allowAutocomplete]="resource.isModule"
@ -240,7 +239,7 @@
<mat-tab label="{{ 'widget.widget-settings' | translate }}"> <mat-tab label="{{ 'widget.widget-settings' | translate }}">
<div class="tb-resize-container" style="background-color: #fff;"> <div class="tb-resize-container" style="background-color: #fff;">
<div class="mat-padding"> <div class="mat-padding">
<tb-gallery-image-input fxFlex label="{{'widget.image-preview' | translate}}" <tb-gallery-image-input class="flex-1" label="{{'widget.image-preview' | translate}}"
[(ngModel)]="widget.image" [(ngModel)]="widget.image"
(ngModelChange)="isDirty = true" > (ngModelChange)="isDirty = true" >
</tb-gallery-image-input> </tb-gallery-image-input>
@ -257,7 +256,7 @@
[(ngModel)]="widget.tags" [(ngModel)]="widget.tags"
(ngModelChange)="isDirty = true"> (ngModelChange)="isDirty = true">
</tb-string-items-list> </tb-string-items-list>
<div fxLayout="column" fxLayoutGap="16px" style="padding-bottom: 16px;"> <div class="flex flex-col gap-4" style="padding-bottom: 16px;">
<mat-slide-toggle class="mat-block" <mat-slide-toggle class="mat-block"
[(ngModel)]="widget.scada" [(ngModel)]="widget.scada"
(ngModelChange)="isDirty = true"> (ngModelChange)="isDirty = true">
@ -324,7 +323,7 @@
</div> </div>
</div> </div>
<div #framePanel class="tb-split tb-content" style="overflow-y: hidden; position: relative;"> <div #framePanel class="tb-split tb-content" style="overflow-y: hidden; position: relative;">
<div class="mat-content tb-progress-cover" fxFlex fxLayout="column" fxLayoutAlign="center center" <div class="mat-content tb-progress-cover flex flex-1 flex-col items-center justify-center"
*ngIf="!iframeWidgetEditModeInited"> *ngIf="!iframeWidgetEditModeInited">
<mat-spinner diameter="100" mode="indeterminate" color="warn"></mat-spinner> <mat-spinner diameter="100" mode="indeterminate" color="warn"></mat-spinner>
</div> </div>

16
ui-ngx/src/app/modules/home/pages/widget/widget-type.component.html

@ -15,33 +15,33 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column"> <div class="tb-details-buttons xs:flex xs:flex-col">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'edit')" (click)="onEntityAction($event, 'edit')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{ 'widget.edit' | translate }} {{ 'widget.edit' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openDetails')" (click)="onEntityAction($event, 'openDetails')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'export')" (click)="onEntityAction($event, 'export')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{ 'widget.export' | translate }} {{ 'widget.export' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{ 'widget.delete-widget' | translate }} {{ 'widget.delete-widget' | translate }}
</button> </button>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
@ -54,7 +54,7 @@
{{ 'widget.title-max-length' | translate }} {{ 'widget.title-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<tb-gallery-image-input fxFlex <tb-gallery-image-input class="flex-1"
label="{{'widget.image-preview' | translate}}" label="{{'widget.image-preview' | translate}}"
formControlName="image"> formControlName="image">
</tb-gallery-image-input> </tb-gallery-image-input>
@ -67,7 +67,7 @@
label="{{ 'widget.tags' | translate }}" label="{{ 'widget.tags' | translate }}"
formControlName="tags"> formControlName="tags">
</tb-string-items-list> </tb-string-items-list>
<div fxLayout="column" fxLayoutGap="16px"> <div class="flex flex-col gap-4">
<mat-slide-toggle formControlName="scada"> <mat-slide-toggle formControlName="scada">
{{ 'widget.scada' | translate }} {{ 'widget.scada' | translate }}
</mat-slide-toggle> </mat-slide-toggle>

4
ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-dialog.component.html

@ -18,7 +18,7 @@
<form (ngSubmit)="save()" style="width: 650px;"> <form (ngSubmit)="save()" style="width: 650px;">
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<h2 translate>widgets-bundle.add</h2> <h2 translate>widgets-bundle.add</h2>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button <button mat-icon-button
(click)="cancel()" (click)="cancel()"
type="button"> type="button">
@ -36,7 +36,7 @@
[standalone]="true"> [standalone]="true">
</tb-widgets-bundle> </tb-widgets-bundle>
</div> </div>
<div mat-dialog-actions fxLayoutAlign="end center"> <div mat-dialog-actions class="flex items-center justify-end">
<button mat-button color="primary" <button mat-button color="primary"
type="button" type="button"
cdkFocusInitial cdkFocusInitial

4
ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.html

@ -26,7 +26,7 @@
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>
<span class="mat-headline-5">{{ widgetsBundle.title }}: {{ 'widget.widgets' | translate }}</span> <span class="mat-headline-5">{{ widgetsBundle.title }}: {{ 'widget.widgets' | translate }}</span>
<span fxFlex></span> <span class="flex-1"></span>
<button mat-icon-button [disabled]="isLoading$ | async" <button mat-icon-button [disabled]="isLoading$ | async"
*ngIf="!isReadOnly" *ngIf="!isReadOnly"
matTooltip="{{ 'widget.add-new-widget' | translate }}" matTooltip="{{ 'widget.add-new-widget' | translate }}"
@ -90,7 +90,7 @@
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
<button cdkDragHandle *ngIf="editMode" <button cdkDragHandle *ngIf="editMode"
[fxShow]="widgets?.length > 1" [class.!hidden]="!widgets || widgets.length <= 1"
mat-icon-button mat-icon-button
matTooltip="{{ 'action.drag' | translate }}" matTooltip="{{ 'action.drag' | translate }}"
matTooltipPosition="above" matTooltipPosition="above"

14
ui-ngx/src/app/modules/home/pages/widget/widgets-bundle.component.html

@ -15,33 +15,33 @@
limitations under the License. limitations under the License.
--> -->
<div class="tb-details-buttons" fxLayout.xs="column" *ngIf="!standalone"> <div class="tb-details-buttons xs:flex xs:flex-col" *ngIf="!standalone">
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'open')" (click)="onEntityAction($event, 'open')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'widgets-bundle.open-widgets-bundle' | translate }} {{'widgets-bundle.open-widgets-bundle' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'openDetails')" (click)="onEntityAction($event, 'openDetails')"
[fxShow]="!isEdit && !isDetailsPage"> [class.!hidden]="isEdit || isDetailsPage">
{{'common.open-details-page' | translate }} {{'common.open-details-page' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'export')" (click)="onEntityAction($event, 'export')"
[fxShow]="!isEdit"> [class.!hidden]="isEdit">
{{'widgets-bundle.export' | translate }} {{'widgets-bundle.export' | translate }}
</button> </button>
<button mat-raised-button color="primary" <button mat-raised-button color="primary"
[disabled]="(isLoading$ | async)" [disabled]="(isLoading$ | async)"
(click)="onEntityAction($event, 'delete')" (click)="onEntityAction($event, 'delete')"
[fxShow]="!hideDelete() && !isEdit"> [class.!hidden]="hideDelete() || isEdit">
{{'widgets-bundle.delete' | translate }} {{'widgets-bundle.delete' | translate }}
</button> </button>
</div> </div>
<div class="mat-padding" fxLayout="column"> <div class="mat-padding flex flex-col">
<form [formGroup]="entityForm"> <form [formGroup]="entityForm">
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> <fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block"> <mat-form-field class="mat-block">
@ -54,7 +54,7 @@
{{ 'widgets-bundle.title-max-length' | translate }} {{ 'widgets-bundle.title-max-length' | translate }}
</mat-error> </mat-error>
</mat-form-field> </mat-form-field>
<tb-gallery-image-input fxFlex <tb-gallery-image-input class="flex-1"
label="{{'widgets-bundle.image-preview' | translate}}" label="{{'widgets-bundle.image-preview' | translate}}"
formControlName="image"> formControlName="image">
</tb-gallery-image-input> </tb-gallery-image-input>

1
ui-ngx/tailwind.config.js

@ -92,6 +92,7 @@ module.exports = {
gap: { gap: {
'0.75': '0.1875rem', '0.75': '0.1875rem',
'1.25': '0.3125rem', '1.25': '0.3125rem',
'3.75': '0.9375rem',
'6.25': '1.5625rem' '6.25': '1.5625rem'
}, },
minHeight: { minHeight: {

Loading…
Cancel
Save