From 6a5881960fd7104f0ca8ce7021034edb9adf3666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Thu, 4 Jun 2026 15:08:52 +0300 Subject: [PATCH] =?UTF-8?q?Backend=20tak=C4=B1lma=20problemi=20giderildi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/LanguagesData.json | 2 +- .../PlatformHttpApiHostModule.cs | 24 ++- ui/src/components/layouts/PublicLayout.tsx | 141 +++++++++++------- ui/src/components/orders/ProductCard.tsx | 2 +- ui/src/views/public/Blog.tsx | 6 +- ui/src/views/public/Demo.tsx | 4 +- ui/src/views/public/Home.tsx | 2 +- ui/src/views/public/Products.tsx | 2 +- ui/src/views/public/Services.tsx | 2 +- 9 files changed, 113 insertions(+), 72 deletions(-) diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index 3cef8ae..cbcd933 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -10288,7 +10288,7 @@ "resourceName": "Platform", "key": "App.About", "tr": "Hakkımızda", - "en": "About Us" + "en": "About" }, { "resourceName": "Platform", diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs b/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs index 73ba4d6..1c4bc66 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs +++ b/api/src/Sozsoft.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs @@ -525,10 +525,26 @@ public class PlatformHttpApiHostModule : AbpModule app.UseConfiguredEndpoints(); } - public override async Task OnPostApplicationInitializationAsync(ApplicationInitializationContext context) + public override Task OnPostApplicationInitializationAsync(ApplicationInitializationContext context) { - using var scope = context.ServiceProvider.CreateScope(); - var initializer = scope.ServiceProvider.GetRequiredService(); - await initializer.RunAsync(); + var serviceProvider = context.ServiceProvider; + + _ = Task.Run(async () => + { + using var scope = serviceProvider.CreateScope(); + var logger = scope.ServiceProvider.GetRequiredService>(); + + try + { + var initializer = scope.ServiceProvider.GetRequiredService(); + await initializer.RunAsync(); + } + catch (Exception ex) + { + logger.LogError(ex, "Background worker initialization failed."); + } + }); + + return Task.CompletedTask; } } diff --git a/ui/src/components/layouts/PublicLayout.tsx b/ui/src/components/layouts/PublicLayout.tsx index 73e001f..24ff9f4 100644 --- a/ui/src/components/layouts/PublicLayout.tsx +++ b/ui/src/components/layouts/PublicLayout.tsx @@ -121,14 +121,14 @@ const PublicLayout = () => { onClick={() => setThemeMode(THEME_ENUM.MODE_LIGHT)} aria-pressed={!isDarkMode} title="Light mode" - className={`inline-flex h-8 items-center gap-1.5 px-2.5 text-xs font-semibold transition-colors rounded-l-md ${ + className={`inline-flex h-8 w-8 xl:w-auto items-center justify-center gap-1.5 px-0 xl:px-2.5 text-xs font-semibold transition-colors rounded-l-md ${ !isDarkMode ? 'bg-white text-gray-950' : 'text-gray-300 hover:bg-white/10 hover:text-white' }`} > - {translate('::App.Light')} + {translate('::App.Light')} ) @@ -163,11 +163,15 @@ const PublicLayout = () => { : 'bg-gray-950/80 backdrop-blur-sm py-4 border-b border-white/5' }`} > -
- +
+ - {/* Desktop Navigation */} -