From 6991515d6d2dde457e24e2d5d9c55cf49e916e3a Mon Sep 17 00:00:00 2001 From: maliming Date: Sat, 12 Apr 2025 15:09:38 +0800 Subject: [PATCH] Refactor feature management modal to simplify disabled state handling and remove unused CSS styles --- .../FeatureManagementModal.cshtml | 78 +++++++++---------- .../feature-management-modal.css | 15 +--- 2 files changed, 38 insertions(+), 55 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml index f8372a2ed8..9b8aeaef5c 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml @@ -51,21 +51,20 @@ @if (feature.ValueType is ToggleStringValueType) { -
- + - @if (feature.Description != null) - { -
@feature.Description
- } -
+ @if (feature.Description != null) + { +
@feature.Description
+ } } @if (feature.ValueType is FreeTextStringValueType) @@ -75,45 +74,42 @@ { type = "number"; } -
- - @if (feature.Description != null) - { -
@feature.Description
- } -
+ group-style="margin-inline-start: @(feature.Depth * 25)px"/> + @if (feature.Description != null) + { +
@feature.Description
+ } } @if (feature.ValueType is SelectionStringValueType selectType) { -
-
- - - + @foreach (var item in selectType.ItemSource.Items) + { + if (item.Value == feature.Value) { - if (item.Value == feature.Value) - { - - } - else - { - - } + + } + else + { + } - - @if (feature.Description != null) - { -
@feature.Description
} -
+ + @if (feature.Description != null) + { +
@feature.Description
+ }
} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/feature-management-modal.css b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/feature-management-modal.css index bcd176ce51..091315b6d5 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/feature-management-modal.css +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/feature-management-modal.css @@ -2,19 +2,6 @@ max-height: 400px; } - .custom-scroll-container > .col-md-4 { max-height: 500px; -} - -.disabled-container { - pointer-events: none; - opacity: 0.5; -} - -.disabled-container input, -.disabled-container select, -.disabled-container button { - background-color: #e9ecef; - color: #6c757d; -} +} \ No newline at end of file