From a17536ce1e2f79a50db278941c535d26637f8f7c Mon Sep 17 00:00:00 2001 From: Boris Vasilenko Date: Thu, 5 Dec 2024 09:18:45 +0300 Subject: [PATCH 01/19] NAS-132783 / 25.04 / Improve master-detail-view (#11140) * NAS-132783: Improve master-detail-view * NAS-132783: Fix styles --------- Co-authored-by: Boris Vasilenko --- .../master-detail-view.component.html | 26 +++----- .../master-detail-view.component.scss | 59 ++----------------- .../all-targets/all-targets.component.html | 12 ++-- .../all-targets/all-targets.component.scss | 21 +++---- .../target-list/target-list.component.ts | 1 - .../all-instances.component.html | 4 +- .../instance-list.component.html | 10 ++-- .../instance-list.component.scss | 5 +- .../instance-list/instance-list.component.ts | 1 - src/assets/styles/mixins/layout.scss | 1 - 10 files changed, 35 insertions(+), 105 deletions(-) diff --git a/src/app/modules/master-detail-view/master-detail-view.component.html b/src/app/modules/master-detail-view/master-detail-view.component.html index 339ac71bde8..12e82093ecf 100644 --- a/src/app/modules/master-detail-view/master-detail-view.component.html +++ b/src/app/modules/master-detail-view/master-detail-view.component.html @@ -9,25 +9,15 @@ ixDetailsHeight [class.details-container-mobile]="showMobileDetails()" > -
-

-
- - {{ 'Details for' | translate }} -
- - - {{ 'Details for' | translate }} - - - - - +
+ @if(isMobileView()) { + + } +

+

- -
diff --git a/src/app/modules/master-detail-view/master-detail-view.component.scss b/src/app/modules/master-detail-view/master-detail-view.component.scss index 294ee4618b8..9987b20ec39 100644 --- a/src/app/modules/master-detail-view/master-detail-view.component.scss +++ b/src/app/modules/master-detail-view/master-detail-view.component.scss @@ -26,15 +26,14 @@ overflow: auto; } -.header { +.header-container { align-items: center; background: var(--bg1); - color: var(--fg1); + color: var(--fg2); display: flex; - justify-content: space-between; + gap: 8px; margin-bottom: 0; - margin-top: 20px; - padding-bottom: 16px; + padding: 15px 0; position: sticky; top: 0; z-index: 5; @@ -42,57 +41,11 @@ @media (max-width: calc($breakpoint-hidden - 1px)) { border-bottom: solid 1px var(--lines); margin: 0 16px 16px 0; + padding-top: 0; position: static; } -} - -.title { - align-items: center; - color: var(--fg2); - display: flex; - gap: 8px; - min-height: 36px; - width: 100%; - @media (max-width: $breakpoint-tablet) { - align-items: flex-start; - flex-direction: column; - gap: unset; - max-width: 100%; + .header { width: 100%; } - - @media (max-width: calc($breakpoint-hidden - 1px)) { - margin-top: 0; - } - - .mobile-prefix { - align-items: center; - display: none; - - @media (max-width: $breakpoint-hidden) { - display: flex; - max-width: 50%; - opacity: 0.85; - } - - @media (max-width: $breakpoint-tablet) { - max-width: 100%; - width: 100%; - } - } - - .prefix { - display: inline; - - @media (max-width: $breakpoint-hidden) { - display: none; - } - } - - .name { - @media (max-width: $breakpoint-tablet) { - margin-left: 40px; - } - } } diff --git a/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.html b/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.html index d43a6ff2e48..c1b393634d1 100644 --- a/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.html +++ b/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.html @@ -6,15 +6,15 @@ master [dataProvider]="dataProvider" [isMobileView]="masterDetailView.isMobileView()" - [showMobileDetails]="masterDetailView.showMobileDetails()" (toggleShowMobileDetails)="masterDetailView.toggleShowMobileDetails($event)" > - - {{ dataProvider.expandedRow?.name }} - +
+ + {{ 'Details for' | translate }} + {{ dataProvider.expandedRow?.name }} + - @if (dataProvider.expandedRow; as target) {
} -
+
@if (dataProvider.expandedRow) { diff --git a/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.scss b/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.scss index f25a72cb30b..ad983bc412b 100644 --- a/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.scss +++ b/src/app/pages/sharing/iscsi/target/all-targets/all-targets.component.scss @@ -1,15 +1,10 @@ -:host { - &::ng-deep { - .details-container .header { - margin-top: 13px; - } - } -} - -.detail-actions { +.detail-header { + align-items: center; display: flex; - flex-wrap: wrap; - gap: 8px; - justify-content: flex-end; - width: 100%; + justify-content: space-between; + + .detail-actions { + display: flex; + gap: 8px; + } } diff --git a/src/app/pages/sharing/iscsi/target/all-targets/target-list/target-list.component.ts b/src/app/pages/sharing/iscsi/target/all-targets/target-list/target-list.component.ts index eb1df57b8b3..f547d45387a 100644 --- a/src/app/pages/sharing/iscsi/target/all-targets/target-list/target-list.component.ts +++ b/src/app/pages/sharing/iscsi/target/all-targets/target-list/target-list.component.ts @@ -59,7 +59,6 @@ import { SlideInService } from 'app/services/slide-in.service'; }) export class TargetListComponent implements OnInit { readonly isMobileView = input(); - readonly showMobileDetails = input(); readonly toggleShowMobileDetails = output(); readonly dataProvider = input>(); diff --git a/src/app/pages/virtualization/components/all-instances/all-instances.component.html b/src/app/pages/virtualization/components/all-instances/all-instances.component.html index 391454568b1..a36fe8031e2 100644 --- a/src/app/pages/virtualization/components/all-instances/all-instances.component.html +++ b/src/app/pages/virtualization/components/all-instances/all-instances.component.html @@ -9,11 +9,11 @@ - + + {{ 'Details for' | translate }} {{ selectedInstance()?.name }} diff --git a/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.html b/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.html index c163153394c..c0e5c8d71f9 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.html +++ b/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.html @@ -10,12 +10,10 @@

{{ 'Instances' | translate }}