diff --git a/src/FrontOffice.Main/Pages/Index.razor b/src/FrontOffice.Main/Pages/Index.razor index a652f1b..d0626ae 100644 --- a/src/FrontOffice.Main/Pages/Index.razor +++ b/src/FrontOffice.Main/Pages/Index.razor @@ -131,7 +131,10 @@ @* ═══════════════════════════════════════════════ 2. HOW IT WORKS — 3 numbered steps + (appsettings Landing:ShowStepsSection; default false) ═══════════════════════════════════════════════ *@ +@if (_showStepsSection) +{
@@ -157,10 +160,14 @@
+} @* ═══════════════════════════════════════════════ 3. FEATURES — 6 cards with icons + (appsettings Landing:ShowFeaturesSection; default false) ═══════════════════════════════════════════════ *@ +@if (_showFeaturesSection) +{
@@ -188,6 +195,7 @@
+} @* ═══════════════════════════════════════════════ 4. STATS — Counter cards diff --git a/src/FrontOffice.Main/Pages/Index.razor.cs b/src/FrontOffice.Main/Pages/Index.razor.cs index 4062577..7b0a525 100644 --- a/src/FrontOffice.Main/Pages/Index.razor.cs +++ b/src/FrontOffice.Main/Pages/Index.razor.cs @@ -21,6 +21,8 @@ public partial class Index : IDisposable private bool _isAuthenticated; private string _twentyCardPortalUrl = string.Empty; + private bool _showStepsSection; + private bool _showFeaturesSection; // ── CMS page data ── private PageSettingsDto? _pageData; @@ -53,6 +55,9 @@ public partial class Index : IDisposable MainService.OnChangeHandler += OnStateChanged; _isAuthenticated = await AuthService.IsAuthenticatedAsync(); _twentyCardPortalUrl = Configuration["TwentyCard:CreditPortalUrl"] ?? string.Empty; + // appsettings Landing:* — default false (hidden). Set true to restore sections. + _showStepsSection = Configuration.GetValue("Landing:ShowStepsSection", false); + _showFeaturesSection = Configuration.GetValue("Landing:ShowFeaturesSection", false); // Load landing page settings from CMS try @@ -344,8 +349,10 @@ public partial class Index : IDisposable public string? HeroButtonPrimaryText { get; set; } public string? HeroButtonSecondaryText { get; set; } public List? TrustBadges { get; set; } + public bool? StepsEnabled { get; set; } public string? StepsTitle { get; set; } public List? Steps { get; set; } + public bool? FeaturesEnabled { get; set; } public string? FeaturesTitle { get; set; } public List? Features { get; set; } public string? StatsTitle { get; set; } diff --git a/src/FrontOffice.Main/appsettings.Staging.json b/src/FrontOffice.Main/appsettings.Staging.json index 9eeec81..e5ab841 100644 --- a/src/FrontOffice.Main/appsettings.Staging.json +++ b/src/FrontOffice.Main/appsettings.Staging.json @@ -9,6 +9,10 @@ "TwentyCard": { "CreditPortalUrl": "https://userpanel.20card.ir/" }, + "Landing": { + "ShowStepsSection": false, + "ShowFeaturesSection": false + }, "EncryptionSettings": { "Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=", "IV": "1wyF3Tt142MOkCpIyCxh/g==" diff --git a/src/FrontOffice.Main/appsettings.json b/src/FrontOffice.Main/appsettings.json index 33d9fbb..1876c38 100644 --- a/src/FrontOffice.Main/appsettings.json +++ b/src/FrontOffice.Main/appsettings.json @@ -9,6 +9,10 @@ "TwentyCard": { "CreditPortalUrl": "https://userpanel.20card.ir/" }, + "Landing": { + "ShowStepsSection": false, + "ShowFeaturesSection": false + }, "EncryptionSettings": { "Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=", "IV": "1wyF3Tt142MOkCpIyCxh/g=="