refactoring
This commit is contained in:
parent
d9807e797b
commit
a1d26e29b3
@ -19,7 +19,7 @@
|
|||||||
<div class="tb-form-row column-xs" fxLayoutAlign="space-between center">
|
<div class="tb-form-row column-xs" fxLayoutAlign="space-between center">
|
||||||
<div class="fixed-title-width tb-required" [style.width.%]="50"
|
<div class="fixed-title-width tb-required" [style.width.%]="50"
|
||||||
tb-hint-tooltip-icon="{{ 'gateway.max-number-of-workers-hint' | translate }}">
|
tb-hint-tooltip-icon="{{ 'gateway.max-number-of-workers-hint' | translate }}">
|
||||||
{{ 'gateway.max-number-of-workers' | translate }}
|
<div tbTruncateTooltip>{{ 'gateway.max-number-of-workers' | translate }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tb-flex no-gap">
|
<div class="tb-flex no-gap">
|
||||||
<mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
|
<mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="tb-form-row column-xs" fxLayoutAlign="space-between center">
|
<div class="tb-form-row column-xs" fxLayoutAlign="space-between center">
|
||||||
<div class="fixed-title-width tb-required" [style.width.%]="50"
|
<div class="fixed-title-width tb-required" [style.width.%]="50"
|
||||||
tb-hint-tooltip-icon="{{ 'gateway.max-messages-queue-for-worker-hint' | translate }}">
|
tb-hint-tooltip-icon="{{ 'gateway.max-messages-queue-for-worker-hint' | translate }}">
|
||||||
{{ 'gateway.max-messages-queue-for-worker' | translate }}
|
<div tbTruncateTooltip>{{ 'gateway.max-messages-queue-for-worker' | translate }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tb-flex no-gap">
|
<div class="tb-flex no-gap">
|
||||||
<mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
|
<mat-form-field class="tb-flex no-gap" appearance="outline" subscriptSizing="dynamic">
|
||||||
|
|||||||
@ -33,6 +33,7 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { WorkersConfig } from '@home/components/widget/lib/gateway/gateway-widget.models';
|
import { WorkersConfig } from '@home/components/widget/lib/gateway/gateway-widget.models';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
import { TooltipDirective } from '@shared/directives/tooltip/tooltip.directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-workers-config-control',
|
selector: 'tb-workers-config-control',
|
||||||
@ -42,6 +43,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
SharedModule,
|
SharedModule,
|
||||||
|
TooltipDirective,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,12 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<div class="tb-hint-tooltip">
|
<ng-content class="tb-hint-tooltip-content"></ng-content>
|
||||||
<div class="tb-hint-tooltip-content">
|
<tb-icon class="tb-hint-tooltip-icon tb-mat-18"
|
||||||
<ng-content></ng-content>
|
|
||||||
</div>
|
|
||||||
<tb-icon class="tb-hint-tooltip-icon tb-mat-18"
|
|
||||||
*ngIf="tooltipText"
|
*ngIf="tooltipText"
|
||||||
matTooltip="{{ tooltipText }}"
|
matTooltip="{{ tooltipText }}"
|
||||||
[matTooltipPosition]="tooltipPosition">{{ hintIcon }}</tb-icon>
|
[matTooltipPosition]="tooltipPosition">{{ hintIcon }}</tb-icon>
|
||||||
</div>
|
|
||||||
|
|||||||
@ -13,21 +13,21 @@
|
|||||||
* 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.
|
||||||
*/
|
*/
|
||||||
|
:host(.tb-hint-tooltip) {
|
||||||
:host {
|
|
||||||
.tb-hint-tooltip {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
&-content {
|
:host {
|
||||||
|
.tb-hint-tooltip-content {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
max-width: fit-content;
|
max-width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-icon {
|
.tb-hint-tooltip-icon {
|
||||||
color: #E0E0E0;
|
color: #E0E0E0;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
order: 3;
|
order: 3;
|
||||||
@ -38,5 +38,4 @@
|
|||||||
color: #9E9E9E;
|
color: #9E9E9E;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
/// limitations under the License.
|
/// limitations under the License.
|
||||||
///
|
///
|
||||||
|
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, HostBinding, Input } from '@angular/core';
|
||||||
import { TooltipPosition } from '@angular/material/tooltip';
|
import { TooltipPosition } from '@angular/material/tooltip';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -24,6 +24,7 @@ import { TooltipPosition } from '@angular/material/tooltip';
|
|||||||
})
|
})
|
||||||
export class HintTooltipIconComponent {
|
export class HintTooltipIconComponent {
|
||||||
|
|
||||||
|
@HostBinding('class.tb-hint-tooltip')
|
||||||
@Input('tb-hint-tooltip-icon') tooltipText: string;
|
@Input('tb-hint-tooltip-icon') tooltipText: string;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user