soheil khaledabadi 1ea325ad47 fix: show missing tutorial file download, support more video formats
- Render the download button for a tutorial's uploaded file field
  (it was fetched from the API but never displayed).
- Recognize mov/avi/wmv as video (the backend already accepts them as
  uploads) and add a download fallback for any media type the browser
  can't play inline instead of a dead "unknown file type" message.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMLvfLviDB12t4U9UijE4k
2026-09-04 18:02:08 +03:30
2026-09-02 20:29:41 +03:30
2026-09-02 20:29:41 +03:30
2024-05-17 19:09:23 +03:30
2026-09-02 20:29:41 +03:30
2026-09-02 20:29:41 +03:30
2026-09-02 20:29:41 +03:30
2026-09-02 20:29:41 +03:30
2024-09-14 22:01:55 +03:30
2026-09-02 20:29:41 +03:30
2026-09-02 00:47:48 +03:30
2024-06-24 01:18:39 +04:30
2026-09-02 20:29:41 +03:30
2024-05-17 19:09:23 +03:30
2024-05-17 19:09:23 +03:30
2024-06-29 13:56:13 +03:30

Persian Game frontend

رابط کاربری React + TypeScript این پروژه با Vite ساخته و در محیط production توسط Nginx سرو می‌شود.

اجرای Docker

پیش‌نیازها: Docker Engine و Docker Compose v2.

cp .env.example .env
docker compose up --detach --build

سپس برنامه روی http://localhost:8080 در دسترس است. برای مشاهده وضعیت و لاگ‌ها:

docker compose ps
docker compose logs --follow web

برای توقف برنامه:

docker compose down

اسکریپت زیر نیز Compose را اعتبارسنجی، image را build و سرویس را اجرا می‌کند:

./build.sh

تنظیمات

مقادیر قابل تنظیم در .env:

  • APP_PORT: پورت میزبان؛ مقدار پیش‌فرض 8080 است.
  • VITE_API_URL: آدرس کامل API؛ مقدار پیش‌فرض https://api.persain-game.com/api/v1 است.
  • PERSIAN_GAME_IMAGE: نام و tag ایمیج ساخته‌شده.

متغیر VITE_API_URL هنگام build داخل فایل‌های استاتیک قرار می‌گیرد. پس از تغییر آن باید image را دوباره build کنید:

docker compose build --no-cache web
docker compose up --detach web

توسعه محلی بدون Docker

npm ci
npm run dev

بررسی production build و lint:

npm run build
npm run lint
Description
No description provided
Readme 5.2 MiB
Languages
TypeScript 97.1%
CSS 1.4%
HTML 0.6%
Dockerfile 0.4%
JavaScript 0.4%