diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.html b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.html index 936eaf624a..0a153045f3 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.html @@ -11,11 +11,33 @@
{{ data.update.converter.name }}
@if (data.usedBy.length) { {{ 'iot-hub.device-update-shared' | translate }} - + + @if (usedByHidden.length) { + + } } @if (data.modified) { diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.scss b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.scss index ae19cef879..926023ed3b 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.scss @@ -43,6 +43,38 @@ color: rgba(0, 0, 0, 0.54); } +// Material expansion-panel timing +.tb-converter-update-more { + display: grid; + grid-template-rows: 0fr; + transition: grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1); + > ul { + overflow: hidden; + min-height: 0; + } + &.expanded { + grid-template-rows: 1fr; + } + @media (prefers-reduced-motion: reduce) { + transition: none; + } +} + +.tb-converter-update-toggle { + padding: 0; + border: none; + background: none; + font-size: 12px; + font-weight: 500; + line-height: 16px; + color: var(--tb-primary-500); + cursor: pointer; + &:hover, + &:focus-visible { + text-decoration: underline; + } +} + .tb-converter-update-link { color: #305680; text-decoration: underline; diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.ts index 3db43abe6f..b33d11b2b6 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-converter-update-dialog.component.ts @@ -21,6 +21,8 @@ export interface IotHubConverterUpdateDialogData { usedBy: string[]; } +const USED_BY_SHOWN = 3; + /** * Brings an installed device package's default converter to ThingsBoard's default converter now, without a new version of * the package. Closes with true once it is updated. @@ -34,6 +36,9 @@ export interface IotHubConverterUpdateDialogData { export class TbIotHubConverterUpdateDialogComponent extends DialogComponent { readonly modifiedHint = splitTextWithLink(this.translate.instant('iot-hub.device-update-modified')); + readonly usedByShown: string[]; + readonly usedByHidden: string[]; + usedByExpanded = false; updating = false; errorMessage: string | null = null; @@ -46,6 +51,10 @@ export class TbIotHubConverterUpdateDialogComponent extends DialogComponent