From e7f465f74f939ee8982ade72203c74ee23c0a0dc Mon Sep 17 00:00:00 2001 From: MMD Date: Tue, 15 Sep 2026 14:30:43 +0330 Subject: [PATCH] style(ui): maximize topic card images and fix RTL wizard arrows Frontend-only application of prod_v2 (55e959b, 9e99b46). Dev docker-compose.yml changes excluded. --- frontend/src/components/TopicGrid.tsx | 53 +++++++++++++++++------- frontend/src/pages/Wizard/WizardPage.tsx | 20 +++++---- 2 files changed, 49 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/TopicGrid.tsx b/frontend/src/components/TopicGrid.tsx index 9575ec8..0d6795a 100644 --- a/frontend/src/components/TopicGrid.tsx +++ b/frontend/src/components/TopicGrid.tsx @@ -5,39 +5,62 @@ import { faNum } from "../lib/formatters"; import { cn } from "../lib/utils"; export interface TopicGridProps { - topics: Topic[]; // از store (API) می‌آید + topics: Topic[]; selectedTopic?: string; onSelect: (topicName: string) => void; - showCounts?: boolean; // تعداد تأمین‌کننده‌های هر تاپیک - counts?: Record; // topic name → count + showCounts?: boolean; + counts?: Record; } -// گرید تاپیک‌ها (از /material-categories — نه لیست ثابت) export function TopicGrid({ topics, selectedTopic, onSelect, showCounts = false, counts }: TopicGridProps) { if (!topics.length) { return ; } + return ( -
+
{topics.map((t) => { const selected = selectedTopic != null && normalize(selectedTopic) === normalize(t.name); const count = counts?.[t.name] ?? 0; + return ( ); })} diff --git a/frontend/src/pages/Wizard/WizardPage.tsx b/frontend/src/pages/Wizard/WizardPage.tsx index edc12f5..b6fc451 100644 --- a/frontend/src/pages/Wizard/WizardPage.tsx +++ b/frontend/src/pages/Wizard/WizardPage.tsx @@ -1,5 +1,6 @@ import { useEffect, useMemo, useState } from "react"; import { Link, useNavigate, useSearchParams } from "react-router-dom"; +import { ChevronRight, ChevronLeft, Check } from "lucide-react"; import { toast } from "sonner"; import type { LineItem, Quote } from "../../lib/types"; import { api, nextId } from "../../lib/api"; @@ -453,17 +454,17 @@ export function WizardPage() {
)} - {/* پاورقی ویزارد — طراحی بازسازی‌شده با ناوبری استاندارد */} + {/* پاورقی ویزارد — با آیکون‌های استاندارد و جهت‌گیری دقیق RTL */}
- {/* دکمه مرحله قبلی */} + {/* دکمه مرحله قبلی (فلش رو به راست = بازگشت در فارسی) */}
{currentStep > 1 && ( )} @@ -473,19 +474,20 @@ export function WizardPage() {
انصراف + {/* دکمه مرحله بعدی (فلش رو به چپ = پیشروی در فارسی) */} {currentStep < TOTAL_STEPS && ( )} @@ -493,10 +495,10 @@ export function WizardPage() { )}