NW
|
301763f428
|
feat(admin): issue #146 — photo upload with sharp crop/optimization (restore old behavior)
- POST /api/upload: FormData, 10MB limit, sharp resize 800px inside + webp@80, saves to /app/uploads, returns /uploads/url
- GET /uploads/[...path]: serves files with Content-Type, path traversal protected
- compose: ./uploads mounted in tg_shop_admin
- Dockerfile: /app/uploads created + chown nextjs
- catalog-page: file input + thumbnail preview + remove for photoUrl/hiddenPhotoUrl
- Bot resolvePhotoSource already supports /uploads/ paths — no bot changes
|
2026-08-10 09:38:31 +01:00 |
|
NW
|
a4a5fd449d
|
feat(admin): integrate Next.js admin panel (admin-next/) from feat/nextjs-admin
- Add admin-next/: full Next.js + Prisma + shadcn admin panel (45 API routes, 76 components)
- docker-compose: tg_shop_admin service (port 3000, shared db/shop.db, prisma), bot talks to it via ADMIN_CHAT_URL=http://tg_shop_admin:3000/api/chat
- tor-proxy now proxies onion admin to tg_shop_admin:3000 (new panel)
- chatbotService: ADMIN_CHAT_URL default = http://tg_shop_admin:3000/api/chat (removed localhost:3100 anachronism)
- .env admin secrets gitignored (admin-next/.env)
|
2026-08-08 01:31:45 +01:00 |
|