feat: drag and drop text layers in badge editor, anchor flyers/recipes above footer, and editable titles in flyers section

This commit is contained in:
Jakub_Hostacny committed 2026-09-24 11:52:24 +02:00
1 parent 99dd0f272e
commit f9aa2297ba
3 files changed
+205 -43

No files matched your search

+30 -4
View File
@@ -838,10 +838,22 @@ export const ConfigPanel: React.FC<ConfigPanelProps> = ({
<div className="space-y-4">
<div className="p-3 bg-blue-50/50 rounded-xl border border-blue-100">
<span className="text-xs font-bold text-blue-900 block mb-1">
Leták 1: {module.data.item1?.title || 'Aktuálne letáky'}
Leták 1 (Ľavý stĺpec)
</span>
<p className="text-[11px] text-gray-500 mb-3">Farby, texty a rozloženie sú fixne podľa šablóny. Môžete upraviť odkaz a náhľadový obrázok.</p>
<p className="text-[11px] text-gray-500 mb-3">Môžete upraviť nadpis letáku, cieľový odkaz a náhľadový obrázok.</p>
<div className="space-y-3">
<div>
<label className="text-[10px] text-gray-600 font-semibold block mb-0.5">Nadpis letáku</label>
<input
type="text"
value={module.data.item1?.title || ''}
onChange={(e) => updateData({
item1: { ...module.data.item1, title: e.target.value }
})}
className="w-full text-xs border border-gray-300 rounded p-1.5 bg-white font-bold"
placeholder="Aktuálne letáky"
/>
</div>
<div>
<label className="text-[10px] text-gray-600 font-semibold block mb-0.5">Cieľová URL (kam to smeruje)</label>
<input
@@ -851,6 +863,7 @@ export const ConfigPanel: React.FC<ConfigPanelProps> = ({
item1: { ...module.data.item1, linkUrl: e.target.value }
})}
className="w-full text-xs border border-gray-300 rounded p-1.5 bg-white"
placeholder="https://www.coop.sk/sk/letaky"
/>
</div>
<ImageUploadInput
@@ -865,10 +878,22 @@ export const ConfigPanel: React.FC<ConfigPanelProps> = ({
<div className="p-3 bg-amber-50/50 rounded-xl border border-amber-100">
<span className="text-xs font-bold text-amber-900 block mb-1">
Leták 2: {module.data.item2?.title || 'Rozšírený leták'}
Leták 2 (Pravý stĺpec)
</span>
<p className="text-[11px] text-gray-500 mb-3">Farby, texty a rozloženie sú fixne podľa šablóny. Môžete upraviť odkaz a náhľadový obrázok.</p>
<p className="text-[11px] text-gray-500 mb-3">Môžete upraviť nadpis letáku, cieľový odkaz a náhľadový obrázok.</p>
<div className="space-y-3">
<div>
<label className="text-[10px] text-gray-600 font-semibold block mb-0.5">Nadpis letáku</label>
<input
type="text"
value={module.data.item2?.title || ''}
onChange={(e) => updateData({
item2: { ...module.data.item2, title: e.target.value }
})}
className="w-full text-xs border border-gray-300 rounded p-1.5 bg-white font-bold"
placeholder="Rozšírený leták"
/>
</div>
<div>
<label className="text-[10px] text-gray-600 font-semibold block mb-0.5">Cieľová URL (kam to smeruje)</label>
<input
@@ -878,6 +903,7 @@ export const ConfigPanel: React.FC<ConfigPanelProps> = ({
item2: { ...module.data.item2, linkUrl: e.target.value }
})}
className="w-full text-xs border border-gray-300 rounded p-1.5 bg-white"
placeholder="https://www.coop.sk/sk/letaky"
/>
</div>
<ImageUploadInput