Browse Source

style(iot-hub): detail dialog mobile close button + meta-grid overflow polish

Split the detail dialog close button into desktop (inline in header) and mobile (absolute, top-right) variants. Switch meta-grid first column to minmax(0, …) so the creator section can shrink, and truncate the creator name with a tooltip. Add 8px right margin to the card type label.
pull/15787/head
Igor Kulikov 4 months ago
parent
commit
1afd2f273b
  1. 1
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.scss
  2. 10
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html
  3. 27
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.scss

1
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-card.component.scss

@ -285,6 +285,7 @@
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.54); color: rgba(0, 0, 0, 0.54);
text-transform: uppercase; text-transform: uppercase;
margin-right: 8px;
tb-icon { tb-icon {
font-size: 12px; font-size: 12px;

10
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.html

@ -69,12 +69,16 @@
</span> </span>
} }
} }
<button mat-icon-button class="shrink-0" (click)="close()" type="button"> <button mat-icon-button class="dlg-close-btn-desktop" (click)="close()" type="button">
<tb-icon>close</tb-icon> <tb-icon>close</tb-icon>
</button> </button>
</div> </div>
</div> </div>
<button mat-icon-button class="dlg-close-btn-mobile" (click)="close()" type="button">
<tb-icon>close</tb-icon>
</button>
<!-- Scrollable content --> <!-- Scrollable content -->
<div class="dlg-body"> <div class="dlg-body">
<!-- Main content --> <!-- Main content -->
@ -163,7 +167,7 @@
<div class="dlg-divider"></div> <div class="dlg-divider"></div>
<div class="dlg-meta" [class.dlg-meta-4-col]="item.type === ItemType.SOLUTION_TEMPLATE || item.type === ItemType.DASHBOARD"> <div class="dlg-meta" [class.dlg-meta-4-col]="item.type === ItemType.SOLUTION_TEMPLATE || item.type === ItemType.DASHBOARD">
@if (showCreator) { @if (showCreator) {
<div class="dlg-meta-group"> <div class="dlg-meta-group dlg-meta-creator-section">
<span class="dlg-meta-label">{{ 'iot-hub.creator' | translate }}</span> <span class="dlg-meta-label">{{ 'iot-hub.creator' | translate }}</span>
<div class="dlg-meta-creator" role="button" tabindex="0" <div class="dlg-meta-creator" role="button" tabindex="0"
[class.clickable]="mode !== 'add'" [class.clickable]="mode !== 'add'"
@ -179,7 +183,7 @@
<mat-icon class="dlg-meta-creator-verified">verified</mat-icon> <mat-icon class="dlg-meta-creator-verified">verified</mat-icon>
} }
</div> </div>
<span class="dlg-meta-creator-name">{{ item.creatorDisplayName }}</span> <span class="dlg-meta-creator-name" tbTruncateWithTooltip>{{ item.creatorDisplayName }}</span>
</div> </div>
</div> </div>
} }

27
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.scss

@ -54,6 +54,21 @@
} }
.dlg-close-btn-desktop {
@media #{$mat-lt-sm} {
display: none;
}
}
.dlg-close-btn-mobile {
position: absolute;
top: 16px;
right: 12px;
@media #{$mat-gt-xs} {
display: none;
}
}
// Header icon for CF/RC — Design: 64px, rounded-8, colored bg, white icon 36px // Header icon for CF/RC — Design: 64px, rounded-8, colored bg, white icon 36px
.dlg-header-icon { .dlg-header-icon {
width: 64px; width: 64px;
@ -250,21 +265,25 @@
display: grid; display: grid;
gap: 24px; gap: 24px;
padding: 16px 24px 12px; padding: 16px 24px 12px;
grid-template-columns: max-content minmax(0, max-content) minmax(auto, max-content) minmax(auto, 1fr) max-content; grid-template-columns: minmax(0, max-content) minmax(0, max-content) minmax(auto, max-content) minmax(auto, 1fr) max-content;
&.dlg-meta-4-col { &.dlg-meta-4-col {
grid-template-columns: max-content minmax(auto, max-content) minmax(auto, 1fr) max-content; grid-template-columns: minmax(0, max-content) minmax(auto, max-content) minmax(auto, 1fr) max-content;
} }
.dlg-meta-details { .dlg-meta-details {
display: none; display: none;
} }
.dlg-meta-creator-section {
min-width: 0;
}
@media #{$mat-lt-md} { @media #{$mat-lt-md} {
grid-template-columns: max-content max-content max-content; grid-template-columns: minmax(0, 1fr) max-content max-content;
&.dlg-meta-4-col { &.dlg-meta-4-col {
grid-template-columns: max-content max-content max-content; grid-template-columns: minmax(0, 1fr) max-content max-content;
} }
.dlg-meta-details-section { .dlg-meta-details-section {

Loading…
Cancel
Save