Backend takılma problemi giderildi.
This commit is contained in:
parent
37d3065ed7
commit
6a5881960f
9 changed files with 113 additions and 72 deletions
|
|
@ -10288,7 +10288,7 @@
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.About",
|
"key": "App.About",
|
||||||
"tr": "Hakkımızda",
|
"tr": "Hakkımızda",
|
||||||
"en": "About Us"
|
"en": "About"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
|
||||||
|
|
@ -525,10 +525,26 @@ public class PlatformHttpApiHostModule : AbpModule
|
||||||
app.UseConfiguredEndpoints();
|
app.UseConfiguredEndpoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task OnPostApplicationInitializationAsync(ApplicationInitializationContext context)
|
public override Task OnPostApplicationInitializationAsync(ApplicationInitializationContext context)
|
||||||
{
|
{
|
||||||
using var scope = context.ServiceProvider.CreateScope();
|
var serviceProvider = context.ServiceProvider;
|
||||||
var initializer = scope.ServiceProvider.GetRequiredService<BackgroundWorkerInitializer>();
|
|
||||||
await initializer.RunAsync();
|
_ = Task.Run(async () =>
|
||||||
|
{
|
||||||
|
using var scope = serviceProvider.CreateScope();
|
||||||
|
var logger = scope.ServiceProvider.GetRequiredService<ILogger<PlatformHttpApiHostModule>>();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var initializer = scope.ServiceProvider.GetRequiredService<BackgroundWorkerInitializer>();
|
||||||
|
await initializer.RunAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.LogError(ex, "Background worker initialization failed.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,14 +121,14 @@ const PublicLayout = () => {
|
||||||
onClick={() => setThemeMode(THEME_ENUM.MODE_LIGHT)}
|
onClick={() => setThemeMode(THEME_ENUM.MODE_LIGHT)}
|
||||||
aria-pressed={!isDarkMode}
|
aria-pressed={!isDarkMode}
|
||||||
title="Light mode"
|
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
|
!isDarkMode
|
||||||
? 'bg-white text-gray-950'
|
? 'bg-white text-gray-950'
|
||||||
: 'text-gray-300 hover:bg-white/10 hover:text-white'
|
: 'text-gray-300 hover:bg-white/10 hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<LuSun size={15} strokeWidth={1.8} />
|
<LuSun size={15} strokeWidth={1.8} />
|
||||||
{translate('::App.Light')}
|
<span className="hidden xl:inline">{translate('::App.Light')}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
|
@ -136,12 +136,12 @@ const PublicLayout = () => {
|
||||||
onClick={() => setThemeMode(THEME_ENUM.MODE_DARK)}
|
onClick={() => setThemeMode(THEME_ENUM.MODE_DARK)}
|
||||||
aria-pressed={isDarkMode}
|
aria-pressed={isDarkMode}
|
||||||
title="Dark mode"
|
title="Dark mode"
|
||||||
className={`inline-flex h-8 items-center gap-1.5 px-2.5 text-xs font-semibold transition-colors rounded-r-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-r-md ${
|
||||||
isDarkMode ? 'bg-white text-gray-950' : 'text-gray-300 hover:bg-white/10 hover:text-white'
|
isDarkMode ? 'bg-white text-gray-950' : 'text-gray-300 hover:bg-white/10 hover:text-white'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<LuMoon size={15} strokeWidth={1.8} />
|
<LuMoon size={15} strokeWidth={1.8} />
|
||||||
{translate('::App.Dark')}
|
<span className="hidden xl:inline">{translate('::App.Dark')}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
@ -163,11 +163,15 @@ const PublicLayout = () => {
|
||||||
: 'bg-gray-950/80 backdrop-blur-sm py-4 border-b border-white/5'
|
: 'bg-gray-950/80 backdrop-blur-sm py-4 border-b border-white/5'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="container mx-auto px-6 flex items-center justify-between">
|
<div className="container mx-auto px-6 relative grid grid-cols-[auto_1fr_auto] items-center lg:grid-cols-[1fr_auto] xl:grid-cols-[auto_1fr_auto]">
|
||||||
<Logo mode="dark" />
|
<Logo
|
||||||
|
mode="dark"
|
||||||
|
className="relative z-10 max-w-[190px] overflow-hidden lg:hidden xl:block xl:max-w-none"
|
||||||
|
imgClass="h-10 w-auto object-contain xl:h-auto"
|
||||||
|
/>
|
||||||
|
|
||||||
{/* Desktop Navigation */}
|
{/* Desktop / tablet navigation */}
|
||||||
<nav className="hidden md:flex items-center gap-1">
|
<nav className="hidden lg:flex lg:col-start-1 xl:col-start-2 items-center justify-self-start xl:justify-self-center gap-1">
|
||||||
{navLinks
|
{navLinks
|
||||||
.filter((l) => !isLoginLink(l.resourceKey))
|
.filter((l) => !isLoginLink(l.resourceKey))
|
||||||
.map((link) => {
|
.map((link) => {
|
||||||
|
|
@ -216,7 +220,7 @@ const PublicLayout = () => {
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{/* Right side: Language + Login */}
|
{/* Right side: Language + Login */}
|
||||||
<div className="hidden md:flex items-center gap-3">
|
<div className="relative z-10 hidden lg:flex lg:col-start-2 xl:col-start-3 lg:justify-self-end items-center gap-2 xl:gap-3">
|
||||||
<LanguageSelector />
|
<LanguageSelector />
|
||||||
{themeToggle}
|
{themeToggle}
|
||||||
<div className="w-px h-5 bg-white/20" />
|
<div className="w-px h-5 bg-white/20" />
|
||||||
|
|
@ -237,9 +241,10 @@ const PublicLayout = () => {
|
||||||
|
|
||||||
{/* Mobile Menu Button */}
|
{/* Mobile Menu Button */}
|
||||||
<button
|
<button
|
||||||
className="md:hidden flex items-center justify-center w-9 h-9 text-white rounded-md hover:bg-white/10 transition-colors"
|
className="lg:hidden col-start-3 justify-self-end flex items-center justify-center w-9 h-9 text-white rounded-md hover:bg-white/10 transition-colors"
|
||||||
onClick={toggleMenu}
|
onClick={toggleMenu}
|
||||||
aria-label="Toggle menu"
|
aria-label="Toggle menu"
|
||||||
|
aria-expanded={isOpen}
|
||||||
>
|
>
|
||||||
{isOpen ? <LuX size={20} strokeWidth={2} /> : <LuMenu size={20} strokeWidth={2} />}
|
{isOpen ? <LuX size={20} strokeWidth={2} /> : <LuMenu size={20} strokeWidth={2} />}
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -247,68 +252,88 @@ const PublicLayout = () => {
|
||||||
|
|
||||||
{/* Mobile Navigation */}
|
{/* Mobile Navigation */}
|
||||||
<div
|
<div
|
||||||
className={`md:hidden overflow-hidden transition-all duration-300 ease-in-out ${
|
className={`lg:hidden overflow-hidden transition-all duration-300 ease-in-out ${
|
||||||
isOpen ? 'max-h-screen opacity-100' : 'max-h-0 opacity-0'
|
isOpen ? 'max-h-screen opacity-100' : 'max-h-0 opacity-0'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="bg-gray-950/98 backdrop-blur-md border-t border-white/10">
|
<div className="border-t border-white/10 bg-gray-950/98 backdrop-blur-md">
|
||||||
<div className="container mx-auto px-6 py-3">
|
<div className="container mx-auto px-6 py-3">
|
||||||
<nav className="flex flex-col gap-1">
|
<nav className="flex flex-col gap-1">
|
||||||
{navLinks.map((link) => {
|
<div className="lg:hidden flex flex-col gap-1">
|
||||||
const active = isActiveLink(link.path)
|
{navLinks.map((link) => {
|
||||||
const isLogin = isLoginLink(link.resourceKey)
|
const active = isActiveLink(link.path)
|
||||||
if (isLogin) {
|
const isLogin = isLoginLink(link.resourceKey)
|
||||||
|
if (isLogin) {
|
||||||
|
return link.path ? (
|
||||||
|
<Link
|
||||||
|
key={link.path}
|
||||||
|
to={link.path}
|
||||||
|
onClick={toggleMenu}
|
||||||
|
className="mt-2 flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-500 rounded-lg transition-colors"
|
||||||
|
>
|
||||||
|
{link.name}
|
||||||
|
</Link>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
return link.path ? (
|
return link.path ? (
|
||||||
<Link
|
<Link
|
||||||
key={link.path}
|
key={link.path}
|
||||||
to={link.path}
|
to={link.path}
|
||||||
onClick={toggleMenu}
|
onClick={toggleMenu}
|
||||||
className="mt-2 flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-500 rounded-lg transition-colors"
|
className={`flex items-center gap-2.5 px-3 py-2.5 text-sm font-medium rounded-md transition-colors ${
|
||||||
|
active
|
||||||
|
? 'bg-white/10 text-white'
|
||||||
|
: 'text-gray-300 hover:bg-white/5 hover:text-white'
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
|
{link.icon && (
|
||||||
|
<link.icon
|
||||||
|
size={16}
|
||||||
|
strokeWidth={1.75}
|
||||||
|
className={active ? 'text-blue-400' : 'text-gray-400'}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{link.name}
|
{link.name}
|
||||||
</Link>
|
</Link>
|
||||||
) : null
|
) : (
|
||||||
}
|
<button
|
||||||
return link.path ? (
|
key={link.name}
|
||||||
<Link
|
onClick={() => {
|
||||||
key={link.path}
|
link.action?.()
|
||||||
to={link.path}
|
toggleMenu()
|
||||||
onClick={toggleMenu}
|
}}
|
||||||
className={`flex items-center gap-2.5 px-3 py-2.5 text-sm font-medium rounded-md transition-colors ${
|
className="flex items-center gap-2.5 px-3 py-2.5 text-sm font-medium text-gray-300 hover:bg-white/5 hover:text-white rounded-md transition-colors text-left"
|
||||||
active
|
>
|
||||||
? 'bg-white/10 text-white'
|
{link.icon && (
|
||||||
: 'text-gray-300 hover:bg-white/5 hover:text-white'
|
<link.icon size={16} strokeWidth={1.75} className="text-gray-400" />
|
||||||
}`}
|
)}
|
||||||
>
|
{link.name}
|
||||||
{link.icon && (
|
</button>
|
||||||
<link.icon
|
)
|
||||||
size={16}
|
})}
|
||||||
strokeWidth={1.75}
|
</div>
|
||||||
className={active ? 'text-blue-400' : 'text-gray-400'}
|
<div className="mt-1 border-t border-white/10 pt-2 pb-1">
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{link.name}
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
<button
|
|
||||||
key={link.name}
|
|
||||||
onClick={() => {
|
|
||||||
link.action?.()
|
|
||||||
toggleMenu()
|
|
||||||
}}
|
|
||||||
className="flex items-center gap-2.5 px-3 py-2.5 text-sm font-medium text-gray-300 hover:bg-white/5 hover:text-white rounded-md transition-colors text-left"
|
|
||||||
>
|
|
||||||
{link.icon && (
|
|
||||||
<link.icon size={16} strokeWidth={1.75} className="text-gray-400" />
|
|
||||||
)}
|
|
||||||
{link.name}
|
|
||||||
</button>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
<div className="pt-2 pb-1 border-t border-white/10 mt-1">
|
|
||||||
<div className="flex items-center justify-between gap-3">
|
<div className="flex items-center justify-between gap-3">
|
||||||
<LanguageSelector />
|
<div className="flex h-10 min-w-10 items-center justify-center rounded-lg bg-white/5 ring-1 ring-white/10">
|
||||||
{themeToggle}
|
<LanguageSelector />
|
||||||
|
</div>
|
||||||
|
<div className="flex h-10 items-center rounded-lg bg-white/5 px-1 ring-1 ring-white/10">
|
||||||
|
{themeToggle}
|
||||||
|
</div>
|
||||||
|
{navLinks
|
||||||
|
.filter((l) => isLoginLink(l.resourceKey))
|
||||||
|
.map((link) =>
|
||||||
|
link.path ? (
|
||||||
|
<Link
|
||||||
|
key={link.path}
|
||||||
|
to={link.path}
|
||||||
|
onClick={toggleMenu}
|
||||||
|
className="hidden h-10 lg:inline-flex items-center justify-center px-4 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-500 rounded-lg shadow-md shadow-blue-900/30 transition-colors"
|
||||||
|
>
|
||||||
|
{link.name}
|
||||||
|
</Link>
|
||||||
|
) : null,
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ export const ProductCard: React.FC<ProductCardProps> = ({
|
||||||
<button
|
<button
|
||||||
onClick={handleAddToCart}
|
onClick={handleAddToCart}
|
||||||
disabled={isDisabled}
|
disabled={isDisabled}
|
||||||
className={`w-full font-medium py-3 px-4 rounded-lg transition-colors duration-200 transform ${
|
className={`w-full font-medium py-3 px-4 rounded-lg transition-colors duration-200 transform dark:bg-gray-700 dark:text-gray-400 ${
|
||||||
isDisabled
|
isDisabled
|
||||||
? 'bg-gray-400 text-gray-700 cursor-not-allowed dark:bg-gray-700 dark:text-gray-400'
|
? 'bg-gray-400 text-gray-700 cursor-not-allowed dark:bg-gray-700 dark:text-gray-400'
|
||||||
: 'bg-blue-600 hover:bg-blue-700 text-white hover:scale-[1.02] active:scale-[0.98]'
|
: 'bg-blue-600 hover:bg-blue-700 text-white hover:scale-[1.02] active:scale-[0.98]'
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ const Blog = () => {
|
||||||
onClick={() => handleCategoryChange('')}
|
onClick={() => handleCategoryChange('')}
|
||||||
className={`px-4 py-2 bg-blue-100 text-blue-800 text-sm font-medium rounded-lg transition-colors ${
|
className={`px-4 py-2 bg-blue-100 text-blue-800 text-sm font-medium rounded-lg transition-colors ${
|
||||||
selectedCategory === ''
|
selectedCategory === ''
|
||||||
? 'bg-blue-600 text-white'
|
? 'bg-blue-600 text-black'
|
||||||
: 'bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700'
|
: 'bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
@ -170,7 +170,7 @@ const Blog = () => {
|
||||||
alt={post.title}
|
alt={post.title}
|
||||||
className="object-cover w-full h-48"
|
className="object-cover w-full h-48"
|
||||||
/>
|
/>
|
||||||
<div className="absolute top-4 right-4 bg-blue-600 text-white px-3 py-1 rounded-full text-sm">
|
<div className="absolute top-4 right-4 bg-blue-600 text-white px-3 py-1 rounded-full text-sm dark:bg-blue-900">
|
||||||
{translate('::Public.' + post.category.name)}
|
{translate('::Public.' + post.category.name)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -267,7 +267,7 @@ const Blog = () => {
|
||||||
placeholder={translate('::Abp.Account.EmailAddress')}
|
placeholder={translate('::Abp.Account.EmailAddress')}
|
||||||
className="flex-1 px-4 py-2 border border-gray-300 rounded-lg bg-white text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400"
|
className="flex-1 px-4 py-2 border border-gray-300 rounded-lg bg-white text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400"
|
||||||
/>
|
/>
|
||||||
<Button className="bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700 transition-colors">
|
<Button className="bg-blue-600 text-black px-6 py-2 rounded-lg hover:bg-blue-700 transition-colors dark:bg-blue-500 dark:hover:bg-blue-600">
|
||||||
{translate('::Public.common.subscribe')}
|
{translate('::Public.common.subscribe')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -269,11 +269,11 @@ const Demo: React.FC<DemoModalProps> = ({ isOpen, onClose }) => {
|
||||||
</label>
|
</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<FaMapPin className="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400" />
|
<FaMapPin className="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400" />
|
||||||
<input
|
<textarea
|
||||||
type="text"
|
|
||||||
name="address"
|
name="address"
|
||||||
value={formData.address}
|
value={formData.address}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
|
rows={3}
|
||||||
className={`w-full pl-11 pr-4 py-2.5 bg-gray-50 border ${
|
className={`w-full pl-11 pr-4 py-2.5 bg-gray-50 border ${
|
||||||
errors.address
|
errors.address
|
||||||
? "border-red-500 focus:border-red-500 focus:ring-red-500/20"
|
? "border-red-500 focus:border-red-500 focus:ring-red-500/20"
|
||||||
|
|
|
||||||
|
|
@ -1178,7 +1178,7 @@ const Home: React.FC = () => {
|
||||||
isDesignMode={isDesignMode}
|
isDesignMode={isDesignMode}
|
||||||
onSelect={handleSelectBlock}
|
onSelect={handleSelectBlock}
|
||||||
>
|
>
|
||||||
<section className="bg-blue-600 py-16">
|
<section className="bg-blue-900 py-16 dark:bg-gray-800">
|
||||||
<div className="container mx-auto px-4 text-center">
|
<div className="container mx-auto px-4 text-center">
|
||||||
<h2 className={content?.ctaTitleStyle}>{content?.ctaTitle}</h2>
|
<h2 className={content?.ctaTitleStyle}>{content?.ctaTitle}</h2>
|
||||||
<p className={content?.ctaSubtitleStyle}>{content?.ctaSubtitle}</p>
|
<p className={content?.ctaSubtitleStyle}>{content?.ctaSubtitle}</p>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ const Products: React.FC = () => {
|
||||||
></Helmet>
|
></Helmet>
|
||||||
|
|
||||||
{/* Hero Section */}
|
{/* Hero Section */}
|
||||||
<div className="relative bg-blue-900 py-12 text-white dark:bg-gray-950"></div>
|
<div className="relative bg-blue-900 py-14 text-white dark:bg-gray-950"></div>
|
||||||
|
|
||||||
<div className="container mx-auto px-4 pt-4">
|
<div className="container mx-auto px-4 pt-4">
|
||||||
<BillingControls
|
<BillingControls
|
||||||
|
|
|
||||||
|
|
@ -1035,7 +1035,7 @@ const Services: React.FC = () => {
|
||||||
isDesignMode={isDesignMode}
|
isDesignMode={isDesignMode}
|
||||||
onSelect={handleSelectBlock}
|
onSelect={handleSelectBlock}
|
||||||
>
|
>
|
||||||
<div className={content?.ctaSectionStyleClass || 'bg-blue-900 text-white py-16'}>
|
<div className={content?.ctaSectionStyleClass || 'bg-blue-900 text-white py-16 dark:bg-gray-800'}>
|
||||||
<div className="container mx-auto px-4 text-center">
|
<div className="container mx-auto px-4 text-center">
|
||||||
<h2 className={content?.ctaTitleStyleClass || 'text-3xl font-bold mb-6 text-white'}>{content?.ctaTitle}</h2>
|
<h2 className={content?.ctaTitleStyleClass || 'text-3xl font-bold mb-6 text-white'}>{content?.ctaTitle}</h2>
|
||||||
<p className={content?.ctaDescriptionStyleClass || 'text-xl mb-8 max-w-2xl mx-auto'}>{content?.ctaDescription}</p>
|
<p className={content?.ctaDescriptionStyleClass || 'text-xl mb-8 max-w-2xl mx-auto'}>{content?.ctaDescription}</p>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue