feat: per-position camera settings, material alias dialog, product delete, media browser links
- Per-render-position focal_length_mm/sensor_width_mm (DB → pipeline → Blender)
- FOV-based camera distance with min clamp fix for wide-angle lenses
- Unmapped materials blocking dialog on "Dispatch Renders" with batch alias creation
- Material check endpoint (GET /orders/{id}/check-materials)
- Batch alias endpoint (POST /materials/batch-aliases)
- Quick-map "No alias" badges on Materials page
- Full product hard-delete with storage cleanup (MinIO + disk files + orphaned CadFile)
- Delete button on ProductDetail page with confirmation
- Clickable product names in Media Browser (links to product page)
- Single-line render dispatch/retry (POST /orders/{id}/lines/{id}/dispatch-render)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -243,6 +243,12 @@ export default function AdminPage() {
|
||||
onError: (e: any) => toast.error(e.response?.data?.detail || 'Failed'),
|
||||
})
|
||||
|
||||
const purgeRenderMediaMut = useMutation({
|
||||
mutationFn: () => api.delete('/admin/settings/purge-render-media'),
|
||||
onSuccess: (res) => toast.success(res.data.message || 'Render media purged'),
|
||||
onError: (e: any) => toast.error(e.response?.data?.detail || 'Failed'),
|
||||
})
|
||||
|
||||
const [smtpDraft, setSmtpDraft] = useState<Partial<Settings>>({})
|
||||
const smtp = { ...settings, ...smtpDraft } as Settings
|
||||
|
||||
@@ -1017,6 +1023,23 @@ export default function AdminPage() {
|
||||
</button>
|
||||
<p className="text-xs text-content-muted">Removes STEP files, thumbnails, and DB records not linked to any product.</p>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
<button
|
||||
onClick={() => setConfirmState({
|
||||
open: true,
|
||||
title: 'Purge All Rendered Media',
|
||||
message: 'Delete ALL still renders and turntable animations? Thumbnails, GLBs, and USD masters are kept. This cannot be undone.',
|
||||
onConfirm: () => { purgeRenderMediaMut.mutate(); setConfirmState(s => ({ ...s, open: false })) },
|
||||
})}
|
||||
disabled={purgeRenderMediaMut.isPending}
|
||||
className="btn-secondary text-sm w-full justify-start text-red-500"
|
||||
title="Delete all still and turntable render media (files + DB records)"
|
||||
>
|
||||
<Trash2 size={14} className={purgeRenderMediaMut.isPending ? 'animate-spin' : ''} />
|
||||
{purgeRenderMediaMut.isPending ? 'Purging…' : 'Purge All Stills & Turntables'}
|
||||
</button>
|
||||
<p className="text-xs text-content-muted">Deletes all rendered images and animations. Thumbnails, GLBs, and USD files are preserved.</p>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
<button
|
||||
onClick={() => reextractMetadataMut.mutate()}
|
||||
|
||||
Reference in New Issue
Block a user