diff --git a/dashboard/src/components/ResultCard.jsx b/dashboard/src/components/ResultCard.jsx
index b4af91b..e7fe6c7 100644
--- a/dashboard/src/components/ResultCard.jsx
+++ b/dashboard/src/components/ResultCard.jsx
@@ -105,16 +105,19 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK
try {
const apiKey = geminiApiKey || localStorage.getItem('gemini_key');
- if (!apiKey) {
+ // Managed (paid) users get the Gemini key resolved server-side;
+ // only BYOK/self-host needs a local key.
+ if (!apiKey && !isManaged) {
throw new Error("Gemini API Key is missing. Please set it in Settings.");
}
+ const geminiHeaders = apiKey ? { 'X-Gemini-Key': apiKey } : {};
// Try Remotion effects endpoint first
const effectsRes = await apiFetch('/api/effects/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
- 'X-Gemini-Key': apiKey
+ ...geminiHeaders
},
body: JSON.stringify({
job_id: jobId,
@@ -146,7 +149,7 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK
method: 'POST',
headers: {
'Content-Type': 'application/json',
- 'X-Gemini-Key': apiKey
+ ...geminiHeaders
},
body: JSON.stringify({
job_id: jobId,
diff --git a/dashboard/src/components/SubtitleModal.jsx b/dashboard/src/components/SubtitleModal.jsx
index 4514f0c..7a2e37f 100644
--- a/dashboard/src/components/SubtitleModal.jsx
+++ b/dashboard/src/components/SubtitleModal.jsx
@@ -60,6 +60,16 @@ const CAPTION_PRESETS = [
{ id: 'classic', label: 'Classic', style: 'classic', effect: 'none', highlightColor: '#FFD700', baseOpacity: 1.0, uppercase: false, fontName: 'Verdana', borderWidth: 2 },
];
+// Mirrors the backend's ASS dimming: a fully-opaque scaled color (not CSS
+// opacity), so the preview matches what gets burned into the video.
+const dimColor = (hex, k) => {
+ const m = /^#?([0-9a-f]{6})$/i.exec(hex || '');
+ if (!m) return hex;
+ const scale = 0.35 + 0.65 * k;
+ const [r, g, b] = [0, 2, 4].map(i => Math.round(parseInt(m[1].slice(i, i + 2), 16) * scale));
+ return `rgb(${r}, ${g}, ${b})`;
+};
+
const swatchClass = (selected) =>
`w-6 h-6 rounded-full transition-all ${selected
? 'ring-2 ring-[color:var(--color-accent)] ring-offset-2 ring-offset-[color:var(--color-paper-2)]'
@@ -210,6 +220,36 @@ export default function SubtitleModal({ isOpen, onClose, onGenerate, isProcessin