diff --git a/frontend/application/components/ArchivePage.tsx b/frontend/application/components/ArchivePage.tsx index 053320ec..bd2db4cc 100644 --- a/frontend/application/components/ArchivePage.tsx +++ b/frontend/application/components/ArchivePage.tsx @@ -921,7 +921,7 @@ export default function ArchivePage({ }} className={`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border text-[11px] font-black shadow-2xs transition-all whitespace-nowrap ${selectedCategory !== "all" ? "bg-canina-blue text-white border-canina-blue" : "bg-white border-medical-gray-200 text-medical-gray-700"}`} > - {selectedCategory !== "all" ? (CATEGORY_LABELS[selectedCategory] || "راهکار درمانی") : "راهکار درمانی"} + {selectedCategory !== "all" ? (CATEGORY_LABELS[selectedCategory] || "دسته‌بندی") : "دسته‌بندی و راهکار"} @@ -933,7 +933,7 @@ export default function ArchivePage({ >
-

انتخاب راهکار درمانی

+

فیلتر دسته‌بندی و راهکار درمانی

)}
+ {/* Sort Dropdown */} +
+
+
+ + مرتب‌سازی: +
+ +
+
+ {selectedTag && ( -
- تگ انتخاب شده: #{selectedTag} +
+ تگ: #{selectedTag} @@ -189,54 +230,61 @@ export default function BlogPage({ )}
- {/* Category Filter Pills */} -
- - {categories.map((c) => ( + {/* Category Filter Pills with smooth edge mask */} +
+
- ))} + {categories.map((c) => ( + + ))} +
{/* Quick Tag Cloud */} {allTags.length > 0 && (
- + - محبوب‌ترین تگ‌ها: + تگ‌های محبوب: - {allTags.slice(0, 10).map((tag) => ( + {allTags.slice(0, 8).map((tag) => (
)} - {/* Regular Posts Grid */} - {regularPosts.length > 0 ? ( -
- {regularPosts.map((post, idx) => ( + {/* Regular Posts Grid - Mobile-Optimized */} + {slicedRegularPosts.length > 0 ? ( + <> +
+

همه مقالات تخصصی

+ + {toPersian(regularPosts.length)} مقاله + +
+ +
+ {slicedRegularPosts.map((post, idx) => ( router.push(`/blog/${encodeURIComponent(post.slug || post.id)}`)} >
@@ -348,7 +404,7 @@ export default function BlogPage({ {(post.viewCount ?? 0).toLocaleString('fa-IR')}
-
+
@@ -374,7 +430,7 @@ export default function BlogPage({
-
+
{post.author} @@ -387,6 +443,22 @@ export default function BlogPage({ ))}
+ + {hasMore && ( +
+ +
+ )} + ) : (

diff --git a/frontend/application/components/IngredientWiki.tsx b/frontend/application/components/IngredientWiki.tsx index 8f9e488d..91d9503d 100644 --- a/frontend/application/components/IngredientWiki.tsx +++ b/frontend/application/components/IngredientWiki.tsx @@ -166,36 +166,36 @@ export default function IngredientWiki() {

-
-
- - علم در خدمت کیفیت +
+
+ + علم در خدمت کیفیت
-

+

دانشنامه مواد نایاب و ارگانیک کنینا

-

+

تمامی ترکیبات فعال و مکمل‌های به کار رفته در محصولات دارویی و مراقبتی Canina Pharma آلمان، دارای بالاترین گرید بیولوژیک و فارماکوپه اروپا می‌باشند.

-
- +
+ setSearchQuery(e.target.value)} - className="w-full bg-medical-gray-50 border border-medical-gray-200 rounded-full py-3 pr-11 pl-4 text-sm focus:outline-none focus:ring-2 focus:ring-canina-blue/20" + className="w-full bg-white border border-medical-gray-200 rounded-2xl py-2.5 sm:py-3 pr-10 pl-4 text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-canina-blue/20 shadow-xs" />
{/* Sugar-Free & Gluten-Free Medical Standards Banner */} -
-
- +
+
+ ۱۰۰٪ فاقد قند افزوده (Sugar-Free)
-
- +
+ مطابق استانداردهای دارویی و بالینی آلمان
@@ -219,7 +219,7 @@ export default function IngredientWiki() { } return ( -
+
{filtered.map((ing, idx) => { const hasIngredient = getProductsForIngredient(ing.id, ing.name); const isTargeted = termParam === ing.id; @@ -228,7 +228,7 @@ export default function IngredientWiki() {
{/* Content */}
@@ -238,23 +238,23 @@ export default function IngredientWiki() { viewport={{ once: true }} transition={{ duration: 0.6 }} > -
-
+
+
-

{ing.name}

+

{ing.name}

کد ماده مؤثره: {ing.id}
-

+

{ing.description}

-
+
{ing.benefits.map((benefit, bIdx) => ( -
+
{benefit}
@@ -269,10 +269,10 @@ export default function IngredientWiki() { initial={{ opacity: 0, scale: 0.95 }} whileInView={{ opacity: 1, scale: 1 }} viewport={{ once: true }} - className="bg-medical-gray-50/80 rounded-[3rem] p-6 sm:p-8 border border-medical-gray-200/60 relative overflow-hidden flex-1 flex flex-col justify-between" + className="bg-medical-gray-50/80 rounded-xl sm:rounded-3xl p-3.5 sm:p-6 border border-medical-gray-200/60 relative overflow-hidden flex-1 flex flex-col justify-between" >
-
+

موجود در محصولات کاتالوگ

diff --git a/frontend/application/components/SupportChat.tsx b/frontend/application/components/SupportChat.tsx index 4ac4ba33..cbd2d577 100644 --- a/frontend/application/components/SupportChat.tsx +++ b/frontend/application/components/SupportChat.tsx @@ -160,9 +160,35 @@ export default function SupportChat() { // safe fallback kept } if (!controller.signal.aborted && token() === current) { - setRows((r) => { const next = [...r]; const i = next.length - 1; if (i >= 0 && next[i].question === question && next[i].answer === 'در حال بررسی…') next[i] = { question, answer }; return next; }); + // Typewriting animation for smooth AI assistant response streaming feel + const fullAnswer = answer; + const stepSize = Math.max(2, Math.floor(fullAnswer.length / 40)); + let currentIdx = 0; + + const typeInterval = setInterval(() => { + currentIdx += stepSize; + if (currentIdx >= fullAnswer.length || controller.signal.aborted) { + clearInterval(typeInterval); + setRows((r) => { + const next = [...r]; + const i = next.length - 1; + if (i >= 0 && next[i].question === question) next[i] = { question, answer: fullAnswer }; + return next; + }); + if (pending.current === controller) setBusy(false); + } else { + const partial = fullAnswer.slice(0, currentIdx) + " ▍"; + setRows((r) => { + const next = [...r]; + const i = next.length - 1; + if (i >= 0 && next[i].question === question) next[i] = { question, answer: partial }; + return next; + }); + } + }, 18); + } else { + if (pending.current === controller) setBusy(false); } - if (pending.current === controller) setBusy(false); } if (!config?.enabled) return configError ? تنظیمات پشتیبان هوشمند در دسترس نیست. : null;