Media replaces Video, and the greyed-out Image
Two rows, one of them marked `soon`, for a distinction that was never the editor's to make. The path names a real file and what that file IS is a fact about it — the site reads it off the extension the way a gallery item always has. So the picker asks for a file and stops asking what kind. `video` is gone from what an editor can create and still legal in the database. Every row was migrated; one written by something older should still be editable rather than open nothing, which is why the edit path answers to both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Handshake, Images, Mail, Type, Video, type LucideIcon } from 'lucide-react';
|
||||
import { Handshake, Image, Images, Mail, Type, type LucideIcon } from 'lucide-react';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/u
|
||||
* A kind the server would accept and this has never heard of is not creatable anyway.
|
||||
*/
|
||||
|
||||
export type ComponentKind = 'free-text' | 'video' | 'gallery' | 'contact-form' | 'partners';
|
||||
export type ComponentKind = 'free-text' | 'media' | 'gallery' | 'contact-form' | 'partners';
|
||||
|
||||
type Choice = {
|
||||
kind: ComponentKind | null;
|
||||
@@ -42,8 +42,15 @@ type Choice = {
|
||||
*/
|
||||
const CHOICES: Choice[] = [
|
||||
{ kind: 'free-text', label: 'Text', hint: 'Words, headings and links', Icon: Type },
|
||||
{ kind: null, label: 'Image', hint: 'One picture from the media store', Icon: Images },
|
||||
{ kind: 'video', label: 'Video', hint: 'No controls, a poster, autoplay and loop', Icon: Video },
|
||||
/*
|
||||
One entry, either kind, because the block does not store which.
|
||||
|
||||
Image and Video were two rows — one of them greyed out as `soon` — and the distinction was never
|
||||
the editor's to make: the path names a real file and what that file IS is a fact about it. So the
|
||||
picker asks for a file and the site works out the rest, which is also what a gallery item has
|
||||
always done.
|
||||
*/
|
||||
{ kind: 'media', label: 'Media', hint: 'A photograph or a video, from the media store', Icon: Image },
|
||||
{ kind: 'gallery', label: 'Gallery', hint: 'A named set of media', Icon: Images },
|
||||
/*
|
||||
Two that place something the site already draws.
|
||||
|
||||
Reference in New Issue
Block a user