diff --git a/README.md b/README.md index 5c11df4..2e892ce 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ docker run --rm -p 8080:80 manicandles-frontend:uat After the one-time [server setup](docs/STATIC-DEPLOYMENT.md), main-branch Drone pushes upload the checked static build over SSH and activate it through the existing Nginx HTTPS site. Readiness failure restores the previous release. Drone requires the `manicandles_deploy_key` secret. Feature branches run validation without uploading or activating a release. -Storefront list returns only id/name/slug; details return prices/attributes/groups. The API has no product-media fields, so catalog cards use a generic branded placeholder rather than assigning local photos to unknown records. Existing marketing imagery remains intact. +Storefront list returns id/name/slug and the main photo; details return prices/attributes/groups and all photos. Staff upload up to 8 JPEG/PNG/WebP photos per product (2 MiB each) under Admin catalog; products without photos show a branded placeholder. Existing marketing imagery remains intact. Addresses, cart/checkout, orders, catalog, access, stock, coupons and pricing tools are available after sign-in. Customers can create their own account at `/workspace` (requires the backend `/auth/register` endpoint). There is no contact-message endpoint; simulated success was replaced with an availability notice. Newsletter signup awaits consent/messaging flows. diff --git a/deploy/nginx-locations.conf b/deploy/nginx-locations.conf index 477114f..2633283 100644 --- a/deploy/nginx-locations.conf +++ b/deploy/nginx-locations.conf @@ -23,7 +23,7 @@ location /api/ { proxy_hide_header Access-Control-Allow-Origin; proxy_hide_header Access-Control-Allow-Credentials; - location ~ "^/api/v1/(?:supplier-documents|b2b/artworks)/[0-9a-fA-F-]{36}/versions$" { + location ~ "^/api/v1/(?:(?:supplier-documents|b2b/artworks)/[0-9a-fA-F-]{36}/versions|products/[0-9a-fA-F-]{36}/images)$" { client_max_body_size 3m; proxy_pass https://manicandles-backend.midastix.com; } diff --git a/nginx.conf b/nginx.conf index 1915496..19d5bea 100644 --- a/nginx.conf +++ b/nginx.conf @@ -23,7 +23,7 @@ server { proxy_hide_header Access-Control-Allow-Origin; proxy_hide_header Access-Control-Allow-Credentials; - location ~ "^/api/v1/(?:supplier-documents|b2b/artworks)/[0-9a-fA-F-]{36}/versions$" { + location ~ "^/api/v1/(?:(?:supplier-documents|b2b/artworks)/[0-9a-fA-F-]{36}/versions|products/[0-9a-fA-F-]{36}/images)$" { client_max_body_size 3m; proxy_pass https://manicandles-backend.midastix.com; } diff --git a/src/components/Catalog.tsx b/src/components/Catalog.tsx index 13e8285..954c953 100644 --- a/src/components/Catalog.tsx +++ b/src/components/Catalog.tsx @@ -4,7 +4,7 @@ import Alert from "@mui/material/Alert"; import Button from "@mui/material/Button"; import Skeleton from "@mui/material/Skeleton"; import { Flame } from "lucide-react"; -import { listProducts } from "@/lib/api"; +import { listProducts, productImageUrl } from "@/lib/api"; import { usePlatform } from "@/lib/platform"; import { ApiNotice } from "./ApiNotice"; import "@/pages/products.css"; @@ -75,11 +75,21 @@ export function Catalog({
-