feat: Support brand Intro and Outro videos in template fields

This commit is contained in:
2026-06-02 22:55:16 -05:00
parent dc6cab57bd
commit e85d8eabcc
2 changed files with 36 additions and 13 deletions
@@ -25,17 +25,31 @@ const TYPE_OPTIONS: { value: TemplateFieldType; label: string; icon: React.React
{ value: 'sticker', label: 'Sticker', icon: <Zap size={10} /> },
];
/** Brand sources */
const BRAND_SOURCES: { value: BrandSource; label: string }[] = [
{ value: 'brand-name', label: 'Nombre de Marca' },
{ value: 'tagline', label: 'Tagline' },
{ value: 'logo', label: 'Logo' },
{ value: 'instagram', label: 'Instagram' },
{ value: 'tiktok', label: 'TikTok' },
{ value: 'twitter', label: 'X / Twitter' },
{ value: 'youtube', label: 'YouTube' },
{ value: 'website', label: 'Website' },
];
/** Brand sources categorized by field type */
const BRAND_SOURCES_MAP: Record<TemplateFieldType, { value: BrandSource; label: string }[]> = {
'text': [
{ value: 'brand-name', label: 'Nombre de Marca' },
{ value: 'tagline', label: 'Tagline' },
{ value: 'instagram', label: 'Instagram' },
{ value: 'tiktok', label: 'TikTok' },
{ value: 'twitter', label: 'X / Twitter' },
{ value: 'youtube', label: 'YouTube' },
{ value: 'website', label: 'Website' },
],
'image': [
{ value: 'logo', label: 'Logo' },
],
'video': [
{ value: 'intro-video', label: 'Video Intro de Marca' },
{ value: 'outro-video', label: 'Video Outro de Marca' },
],
'color': [
{ value: 'primary-color', label: 'Color Primario' },
{ value: 'secondary-color', label: 'Color Secundario' },
],
'shape': [],
'sticker': [],
};
/**
* FieldConfigPanel — Right panel in the Template Builder.
@@ -196,7 +210,7 @@ export const FieldConfigPanel: React.FC = () => {
className="w-full bg-neutral-800 border border-neutral-700 rounded-lg px-2 py-1.5 text-xs text-white focus:border-violet-500/50 focus:outline-none"
>
<option value="">Seleccionar...</option>
{BRAND_SOURCES.map(s => (
{(BRAND_SOURCES_MAP[field.type] || []).map(s => (
<option key={s.value} value={s.value}>{s.label}</option>
))}
</select>