feat(landing-settings): add toggle switches for steps and features visibility
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 10m48s

- Introduced toggle switches to enable or disable the display of the "How It Works" and "Platform Features" sections in the landing settings.
- Updated the LandingSettingsModel to include properties for managing the visibility of these sections.
This commit is contained in:
masoodafar-web
2026-10-04 23:34:16 +03:30
parent 902cfbeb89
commit 420201e3b8
2 changed files with 22 additions and 0 deletions
@@ -56,6 +56,10 @@
@* ── Steps ── *@
<MudExpansionPanel Text="@($"مراحل ({Model.Steps.Count})")" Icon="@Icons.Material.Filled.FormatListNumbered">
<MudStack Spacing="2" Class="pa-2">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
<MudSwitch T="bool" @bind-Value="_stepsEnabled" Color="Color.Primary" />
<MudText Typo="Typo.body2">نمایش بخش «چگونه کار می‌کند؟»</MudText>
</MudStack>
<MudTextField @bind-Value="Model.StepsTitle"
Label="عنوان بخش مراحل"
Placeholder="سه گام تا شروع"
@@ -99,6 +103,10 @@
@* ── Features ── *@
<MudExpansionPanel Text="@($"ویژگی‌ها ({Model.Features.Count})")" Icon="@Icons.Material.Filled.Star">
<MudStack Spacing="2" Class="pa-2">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
<MudSwitch T="bool" @bind-Value="_featuresEnabled" Color="Color.Primary" />
<MudText Typo="Typo.body2">نمایش بخش «امکانات پلتفرم»</MudText>
</MudStack>
<MudTextField @bind-Value="Model.FeaturesTitle"
Label="عنوان بخش ویژگی‌ها"
Placeholder="چرا کارا بازار سلامت؟"
@@ -329,4 +337,16 @@
get => Model.FeaturedBlogEnabled ?? true;
set => Model.FeaturedBlogEnabled = value;
}
private bool _stepsEnabled
{
get => Model.StepsEnabled ?? false;
set => Model.StepsEnabled = value;
}
private bool _featuresEnabled
{
get => Model.FeaturesEnabled ?? false;
set => Model.FeaturesEnabled = value;
}
}
@@ -9,8 +9,10 @@ public class LandingSettingsModel
public string? HeroButtonPrimaryText { get; set; }
public string? HeroButtonSecondaryText { get; set; }
public List<TrustBadgeModel> TrustBadges { get; set; } = new();
public bool? StepsEnabled { get; set; }
public string? StepsTitle { get; set; }
public List<StepModel> Steps { get; set; } = new();
public bool? FeaturesEnabled { get; set; }
public string? FeaturesTitle { get; set; }
public List<FeatureModel> Features { get; set; } = new();
public string? StatsTitle { get; set; }