|
|
@@ -149,11 +149,11 @@ export default function AdminDashboard() { |
|
|
}));
|
|
|
}));
|
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
const setVolume = (index: number, volume: number) => {
|
|
|
|
|
|
|
|
|
const toggleMuted = (index: number) => {
|
|
|
setIsEditing(prev => ({
|
|
|
setIsEditing(prev => ({
|
|
|
...prev,
|
|
|
...prev,
|
|
|
extraMedia: (prev?.extraMedia || []).map((m, i) =>
|
|
|
extraMedia: (prev?.extraMedia || []).map((m, i) =>
|
|
|
i === index ? { ...m, volume } : m
|
|
|
|
|
|
|
|
|
i === index ? { ...m, muted: !m.muted } : m
|
|
|
),
|
|
|
),
|
|
|
}));
|
|
|
}));
|
|
|
};
|
|
|
};
|
|
|
@@ -514,7 +514,7 @@ export default function AdminDashboard() { |
|
|
{video ? 'Video' : 'Image'}
|
|
|
{video ? 'Video' : 'Image'}
|
|
|
</div>
|
|
|
</div>
|
|
|
{video && (
|
|
|
{video && (
|
|
|
<div className="mt-1 space-y-1.5">
|
|
|
|
|
|
|
|
|
<div className="mt-1 flex flex-wrap gap-x-4 gap-y-1">
|
|
|
<label className="flex items-center gap-2 cursor-pointer">
|
|
|
<label className="flex items-center gap-2 cursor-pointer">
|
|
|
<input
|
|
|
<input
|
|
|
type="checkbox"
|
|
|
type="checkbox"
|
|
|
@@ -524,20 +524,15 @@ export default function AdminDashboard() { |
|
|
/>
|
|
|
/>
|
|
|
<span className="text-sm text-gray-700">Autoplay</span>
|
|
|
<span className="text-sm text-gray-700">Autoplay</span>
|
|
|
</label>
|
|
|
</label>
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
|
|
<span className="text-sm text-gray-700 shrink-0">Volume:</span>
|
|
|
|
|
|
|
|
|
<label className="flex items-center gap-2 cursor-pointer">
|
|
|
<input
|
|
|
<input
|
|
|
type="range"
|
|
|
|
|
|
min={0}
|
|
|
|
|
|
max={100}
|
|
|
|
|
|
value={Math.round((item.volume ?? 1) * 100)}
|
|
|
|
|
|
onChange={e => setVolume(i, parseInt(e.target.value, 10) / 100)}
|
|
|
|
|
|
className="flex-1 accent-blue-600"
|
|
|
|
|
|
|
|
|
type="checkbox"
|
|
|
|
|
|
checked={!!item.muted}
|
|
|
|
|
|
onChange={() => toggleMuted(i)}
|
|
|
|
|
|
className="w-4 h-4 text-blue-600 rounded"
|
|
|
/>
|
|
|
/>
|
|
|
<span className="text-xs text-gray-600 w-10 text-right tabular-nums">
|
|
|
|
|
|
{Math.round((item.volume ?? 1) * 100)}%
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<span className="text-sm text-gray-700">Muted</span>
|
|
|
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
)}
|
|
|
)}
|
|
|
</div>
|
|
|
</div>
|
|
|
|