|
|
|
@@ -149,6 +149,15 @@ export default function AdminDashboard() { |
|
|
|
}));
|
|
|
|
};
|
|
|
|
|
|
|
|
const toggleAutoFullscreen = (index: number) => {
|
|
|
|
setIsEditing(prev => ({
|
|
|
|
...prev,
|
|
|
|
extraMedia: (prev?.extraMedia || []).map((m, i) =>
|
|
|
|
i === index ? { ...m, autoFullscreen: !m.autoFullscreen } : m
|
|
|
|
),
|
|
|
|
}));
|
|
|
|
};
|
|
|
|
|
|
|
|
const handleSaveCard = async () => {
|
|
|
|
if (!isEditing) return;
|
|
|
|
const generateSafeId = () => 'card-' + Date.now().toString(36) + Math.random().toString(36).substring(2);
|
|
|
|
@@ -478,17 +487,28 @@ export default function AdminDashboard() { |
|
|
|
<div className="text-xs font-semibold text-gray-700 uppercase tracking-wider">
|
|
|
|
{video ? 'Video' : 'Image'}
|
|
|
|
</div>
|
|
|
|
{video && (
|
|
|
|
<label className="flex items-center gap-2 mt-1 cursor-pointer">
|
|
|
|
<div className="flex flex-wrap gap-x-4 gap-y-1 mt-1">
|
|
|
|
{video && (
|
|
|
|
<label className="flex items-center gap-2 cursor-pointer">
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
checked={!!item.autoplay}
|
|
|
|
onChange={() => toggleAutoplay(i)}
|
|
|
|
className="w-4 h-4 text-blue-600 rounded"
|
|
|
|
/>
|
|
|
|
<span className="text-sm text-gray-700">Autoplay (muted)</span>
|
|
|
|
</label>
|
|
|
|
)}
|
|
|
|
<label className="flex items-center gap-2 cursor-pointer">
|
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
checked={!!item.autoplay}
|
|
|
|
onChange={() => toggleAutoplay(i)}
|
|
|
|
checked={!!item.autoFullscreen}
|
|
|
|
onChange={() => toggleAutoFullscreen(i)}
|
|
|
|
className="w-4 h-4 text-blue-600 rounded"
|
|
|
|
/>
|
|
|
|
<span className="text-sm text-gray-700">Autoplay (muted)</span>
|
|
|
|
<span className="text-sm text-gray-700">Auto fullscreen</span>
|
|
|
|
</label>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
onClick={() => removeExtraMedia(i)}
|
|
|
|
|