Merge branch 'master' of github.com:thingsboard/thingsboard

This commit is contained in:
Andrii Shvaika 2021-10-25 10:50:46 +03:00
commit 34ecde2c36
2 changed files with 37 additions and 25 deletions

View File

@ -15,28 +15,33 @@
limitations under the License. limitations under the License.
--> -->
<button #toggleHelpButton <fieldset class="tb-help-popup-button-container" *ngIf="!textMode">
*ngIf="!textMode" <div #toggleHelpButton
mat-icon-button matTooltip="{{'help.show-help' | translate}}"
matTooltipPosition="above"
style="border-radius: 50%"
(click)="toggleHelp()">
<button mat-icon-button
color="primary" color="primary"
class="tb-help-popup-button tb-mat-32" class="tb-help-popup-button tb-mat-32"
type="button" type="button">
(click)="toggleHelp()"
matTooltip="{{'help.show-help' | translate}}"
matTooltipPosition="above">
<mat-icon class="material-icons">{{popoverVisible ? 'help' : 'help_outline'}}</mat-icon> <mat-icon class="material-icons">{{popoverVisible ? 'help' : 'help_outline'}}</mat-icon>
<mat-spinner *ngIf="popoverVisible && !popoverReady" class="tb-help-popup-button-loading" mode="indeterminate" diameter="20" strokeWidth="2"></mat-spinner> <mat-spinner *ngIf="popoverVisible && !popoverReady" class="tb-help-popup-button-loading" mode="indeterminate" diameter="20" strokeWidth="2"></mat-spinner>
</button> </button>
<button #toggleHelpTextButton </div>
*ngIf="textMode" </fieldset>
mat-button <fieldset class="tb-help-popup-button-container" *ngIf="textMode">
<div #toggleHelpTextButton
(click)="toggleHelp()">
<button mat-button
color="primary" color="primary"
class="tb-help-popup-text-button" class="tb-help-popup-text-button"
[ngClass]="{'mat-stroked-button': popoverVisible && popoverReady}" [ngClass]="{'mat-stroked-button': popoverVisible && popoverReady}">
(click)="toggleHelp()">
<ng-container *ngIf="triggerSafeHtml"> <ng-container *ngIf="triggerSafeHtml">
<span [style]="triggerStyle" [innerHTML]="triggerSafeHtml"></span> <span [style]="triggerStyle" [innerHTML]="triggerSafeHtml"></span>
</ng-container> </ng-container>
<mat-icon *ngIf="!popoverVisible || popoverReady" class="tb-mat-16">open_in_new</mat-icon> <mat-icon *ngIf="!popoverVisible || popoverReady" class="tb-mat-16">open_in_new</mat-icon>
<mat-spinner *ngIf="popoverVisible && !popoverReady" mode="indeterminate" diameter="16" strokeWidth="2"></mat-spinner> <mat-spinner *ngIf="popoverVisible && !popoverReady" mode="indeterminate" diameter="16" strokeWidth="2"></mat-spinner>
</button> </button>
</div>
</fieldset>

View File

@ -13,6 +13,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
.tb-help-popup-button-container {
width: initial;
display: inline-block;
vertical-align: middle;
}
.tb-help-popup-button { .tb-help-popup-button {
position: relative; position: relative;
.mat-progress-spinner { .mat-progress-spinner {