diff --git a/src/FrontOffice.Main/Pages/Index.razor.cs b/src/FrontOffice.Main/Pages/Index.razor.cs index 96875f8..88fb346 100644 --- a/src/FrontOffice.Main/Pages/Index.razor.cs +++ b/src/FrontOffice.Main/Pages/Index.razor.cs @@ -26,6 +26,10 @@ public partial class Index : IDisposable private List _testimonials = new(); private List _faqs = new(); + // Track whether animations need re-initialization after data load + private bool _dataLoaded; + private bool _animationsInitialized; + protected override async Task OnInitializedAsync() { MainService.OnChangeHandler += OnStateChanged; @@ -45,6 +49,7 @@ public partial class Index : IDisposable } PopulateFromSettings(); + _dataLoaded = true; // Load latest published blog posts try @@ -222,8 +227,11 @@ public partial class Index : IDisposable protected override async Task OnAfterRenderAsync(bool firstRender) { - if (firstRender) + // Init/re-init scroll animations after data is loaded and rendered + if ((firstRender || (_dataLoaded && !_animationsInitialized)) && _steps.Any()) { + _animationsInitialized = true; + // Init scroll-triggered fade-in animations await JS.InvokeVoidAsync("initScrollAnimations"); diff --git a/src/FrontOffice.Main/Shared/MainLayout.razor b/src/FrontOffice.Main/Shared/MainLayout.razor index 0f0f72d..0a9f4b2 100644 --- a/src/FrontOffice.Main/Shared/MainLayout.razor +++ b/src/FrontOffice.Main/Shared/MainLayout.razor @@ -19,7 +19,7 @@
- + + - خانه + @(_isAuthenticated ? "داشبورد" : "خانه") @if (_isAuthenticated) { diff --git a/src/FrontOffice.Main/appsettings.Development.json b/src/FrontOffice.Main/appsettings.Development.json deleted file mode 100644 index 36c36cb..0000000 --- a/src/FrontOffice.Main/appsettings.Development.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "GwUrl": "https://cms.kbs2.ir", - "DownloadUrl": "", - "EncryptionSettings": { - "Key": "kmcQ3XTmH4mrdh8VHziuscyf8LLYjG//Kyni81nH/0E=", - "IV": "1wyF3Tt142MOkCpIyCxh/g==" - }, - "SignalR": { - "HubPath": "/hubs/token-notification" - }, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -}