-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10838 from rusikv/enhancement/mobile-app-qr-code-…
…improvements [QR-code widget] - Styles improvements, added label limit
- Loading branch information
Showing
26 changed files
with
671 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
common/data/src/main/java/org/thingsboard/server/common/data/mobile/BadgeStyle.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
.../home/components/widget/config/basic/cards/mobile-app-qr-code-basic-config.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<!-- | ||
Copyright © 2016-2024 The Thingsboard Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<ng-container *ngIf="mobileAppQrCodeWidgetConfigForm" [formGroup]="mobileAppQrCodeWidgetConfigForm"> | ||
<div class="tb-form-panel no-border no-padding"> | ||
<div class="tb-form-row no-border no-padding-bottom"> | ||
<mat-slide-toggle class="mat-slide" formControlName="useSystemSettings" (click)="$event.stopPropagation()"> | ||
{{ 'admin.mobile-app.use-system-settings' | translate }} | ||
</mat-slide-toggle> | ||
</div> | ||
</div> | ||
<div class="tb-form-panel no-border no-padding" *ngIf="!mobileAppQrCodeWidgetConfigForm.get('useSystemSettings').value"> | ||
<div class="tb-form-panel"> | ||
<div class="tb-form-panel-title" translate>widget-config.appearance</div> | ||
<div class="tb-form-hint tb-primary-fill">{{ 'widgets.mobile-app-qr-code.configuration-hint' | translate }}</div> | ||
<div class="tb-form-row space-between no-padding-bottom column-xs"> | ||
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="badgeEnabled" | ||
(click)="$event.stopPropagation()"> | ||
{{ 'admin.mobile-app.badges' | translate }} | ||
</mat-slide-toggle> | ||
<mat-form-field class="flex" appearance="outline" subscriptSizing="dynamic"> | ||
<mat-select formControlName="badgePosition" appearance="outline" subscriptSizing="dynamic"> | ||
<mat-option *ngFor="let badgePosition of badgePositionTranslationsMap | keyvalue" [value]="badgePosition.key"> | ||
{{ badgePosition.value | translate }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
</div> | ||
<div class="tb-form-row space-between no-padding-bottom column-xs"> | ||
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="qrCodeLabelEnabled" (click)="$event.stopPropagation()"> | ||
{{ 'admin.mobile-app.label' | translate }} | ||
</mat-slide-toggle> | ||
<mat-form-field class="flex" appearance="outline" subscriptSizing="dynamic"> | ||
<input matInput formControlName="qrCodeLabel" maxlength="50" placeholder="{{'admin.mobile-app.set' | translate}}"> | ||
<mat-icon matSuffix | ||
matTooltipPosition="above" | ||
matTooltipClass="tb-error-tooltip" | ||
[matTooltip]="'admin.mobile-app.label-required' | translate" | ||
*ngIf="mobileAppQrCodeWidgetConfigForm.get('qrCodeLabel').hasError('required') | ||
&& mobileAppQrCodeWidgetConfigForm.get('qrCodeLabel').touched" | ||
class="tb-error"> | ||
warning | ||
</mat-icon> | ||
</mat-form-field> | ||
</div> | ||
<div class="tb-form-row column-xs"> | ||
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showTitle"> | ||
{{ 'widgets.liquid-level-card.title' | translate }} | ||
</mat-slide-toggle> | ||
<div class="tb-flex row flex-start align-center"> | ||
<mat-form-field class="flex" appearance="outline" subscriptSizing="dynamic"> | ||
<input matInput formControlName="title" placeholder="{{ 'widget-config.set' | translate }}"> | ||
</mat-form-field> | ||
<tb-font-settings formControlName="titleFont" | ||
[previewText]="mobileAppQrCodeWidgetConfigForm.get('title').value"> | ||
</tb-font-settings> | ||
<tb-color-input asBoxInput colorClearButton formControlName="titleColor"> | ||
</tb-color-input> | ||
</div> | ||
</div> | ||
<div class="tb-form-row column-xs"> | ||
<mat-slide-toggle class="mat-slide fixed-title-width" formControlName="showTitleIcon"> | ||
{{ 'widgets.liquid-level-card.icon' | translate }} | ||
</mat-slide-toggle> | ||
<div class="tb-flex row flex-end align-center"> | ||
<mat-form-field appearance="outline" class="flex number" subscriptSizing="dynamic"> | ||
<input matInput type="number" min="0" formControlName="iconSize" placeholder="{{ 'widget-config.set' | translate }}"> | ||
</mat-form-field> | ||
<tb-css-unit-select fxFlex formControlName="iconSizeUnit"></tb-css-unit-select> | ||
<tb-material-icon-select asBoxInput | ||
iconClearButton | ||
[color]="mobileAppQrCodeWidgetConfigForm.get('iconColor').value" | ||
formControlName="titleIcon"> | ||
</tb-material-icon-select> | ||
<tb-color-input asBoxInput colorClearButton formControlName="iconColor"> | ||
</tb-color-input> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="tb-form-panel"> | ||
<div class="tb-form-panel-title" translate>widget-config.card-appearance</div> | ||
<div class="tb-form-row space-between"> | ||
<div>{{ 'widgets.background.background' | translate }}</div> | ||
<tb-background-settings formControlName="background"> | ||
</tb-background-settings> | ||
</div> | ||
<div class="tb-form-row space-between"> | ||
<div translate>widget-config.show-card-buttons</div> | ||
<mat-chip-listbox multiple formControlName="cardButtons"> | ||
<mat-chip-option value="fullscreen">{{ 'fullscreen.fullscreen' | translate }}</mat-chip-option> | ||
</mat-chip-listbox> | ||
</div> | ||
<div class="tb-form-row space-between"> | ||
<div>{{ 'widget-config.card-border-radius' | translate }}</div> | ||
<mat-form-field appearance="outline" subscriptSizing="dynamic"> | ||
<input matInput formControlName="borderRadius" placeholder="{{ 'widget-config.set' | translate }}"> | ||
</mat-form-field> | ||
</div> | ||
</div> | ||
<tb-widget-actions-panel | ||
formControlName="actions"> | ||
</tb-widget-actions-panel> | ||
</div> | ||
</ng-container> |
Oops, something went wrong.