forked from Tadrisino/MathApp_frontend
- Text: kasra/fatha/damma/shadda/sukun/hamza-above and «هی» ezafe removed from every user-visible string (comments untouched); tanwin kept. Stale copy fixed (question packs are no longer sold), awkward onboarding sentences rewritten, سؤال → سوال. plainPersian() in MathText cleans the live tutor stream. - Home: the mascot + speech bubble header is gone; the selected companion hops beside the current island and sits at every third bend (CSS transform animations only). - Checkout: order summary, payment-method rows with Zarinpal/Bazaar icons and radio, amount on the pay button, lock trust line, darker overlay. paymentMethods in config.js per channel (web: zarinpal, app: zarinpal+bazaar by default). - Profile: «ورود با حساب دیگر» removed (it was logout); new «حساب کاربری» sheet shows phone/ID and holds «حذف حساب کاربری»; logout is a red row. Delete sheet tells Bazaar subscribers to cancel renewal in Bazaar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.9 KiB
TypeScript
42 lines
1.9 KiB
TypeScript
import { Diagram } from '@/diagram';
|
||
import type { DiagramSpec } from '@/diagram/types';
|
||
import { SAMPLES } from './diagramSamples';
|
||
import { MathText } from '@/lib/MathText';
|
||
|
||
const TEXTS = [
|
||
'۵) پس وقتی از ۲ سه واحد به چپ برویم، به عدد -۱ میرسیم.',
|
||
'✅ جواب: رأس سهمی در (1, -1) است.',
|
||
'۴) ۲ - ۳ = -۱.',
|
||
'مجموع زاویههای داخلی = (5 - 2) × 180 = 3 × 180 = 540 درجه',
|
||
'بازه [-2, 3) یعنی از −۲ تا ۳، خود ۳ نه.',
|
||
'sin 30° = 0.5 و cos 30° ≈ 0.87 است.',
|
||
'در کتاب ۲/۵ یعنی دو و نیم (اختیاری).',
|
||
];
|
||
|
||
/**
|
||
* گالریِ شکلها، فقط در حالتِ توسعه: http://localhost:5173/?gallery
|
||
* برای وارسیِ چشمی بعد از هر تغییر در src/diagram. اگر window.__GALLERY__ ست شده
|
||
* باشد (تستِ خودکار با خروجیِ واقعیِ مدل)، همانها را نشان میدهد.
|
||
*/
|
||
export function DiagramGallery() {
|
||
const injected = (window as unknown as { __GALLERY__?: { title: string; spec: DiagramSpec }[] }).__GALLERY__;
|
||
const items = injected ?? SAMPLES;
|
||
return (
|
||
<div dir="rtl" className="min-h-screen bg-white p-3">
|
||
{!injected && (
|
||
<div className="mx-auto mb-3 max-w-[420px] space-y-1.5 rounded-2xl border border-line p-3 text-sm leading-7" data-texts>
|
||
{TEXTS.map((t) => <p key={t} className="rounded-xl bg-soft px-3 py-1.5"><MathText text={t} /></p>)}
|
||
</div>
|
||
)}
|
||
<div className="mx-auto grid max-w-[1200px] grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||
{items.map((it, i) => (
|
||
<section key={i} data-sample={i} className="rounded-2xl border border-line p-2">
|
||
<h2 className="mb-1 text-xs font-black text-body">{i + 1}. {it.title}</h2>
|
||
<Diagram spec={it.spec} />
|
||
</section>
|
||
))}
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|