fix: enable Render Changes button after AD VTT upload
adVttUploaded was missing from the hasChanges condition in RerenderControls, leaving the button greyed out after an upload. Pass the flag as a prop and include it in hasChanges; also show an "Audio Description script was replaced" status message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e10d90219c
commit
76ca74d5a5
2 changed files with 10 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { useState } from 'react';
|
|||
interface RerenderControlsProps {
|
||||
pendingRegenerations: number[];
|
||||
pausePointsModified: boolean;
|
||||
adVttUploaded: boolean;
|
||||
isRendering: boolean;
|
||||
onRender: (options: { whisperRefine: boolean }) => void;
|
||||
onClearQueue: () => void;
|
||||
|
|
@ -11,13 +12,14 @@ interface RerenderControlsProps {
|
|||
export function RerenderControls({
|
||||
pendingRegenerations,
|
||||
pausePointsModified,
|
||||
adVttUploaded,
|
||||
isRendering,
|
||||
onRender,
|
||||
onClearQueue,
|
||||
}: RerenderControlsProps) {
|
||||
const [whisperRefine, setWhisperRefine] = useState(false);
|
||||
|
||||
const hasChanges = pendingRegenerations.length > 0 || pausePointsModified;
|
||||
const hasChanges = pendingRegenerations.length > 0 || pausePointsModified || adVttUploaded;
|
||||
|
||||
return (
|
||||
<div className="bg-purple-50 border border-purple-200 rounded-lg p-4">
|
||||
|
|
@ -47,6 +49,12 @@ export function RerenderControls({
|
|||
</p>
|
||||
)}
|
||||
|
||||
{adVttUploaded && !pausePointsModified && pendingRegenerations.length === 0 && (
|
||||
<p className="mt-1 text-sm text-purple-700">
|
||||
Audio Description script was replaced
|
||||
</p>
|
||||
)}
|
||||
|
||||
{!hasChanges && (
|
||||
<p className="mt-1 text-sm text-gray-500">
|
||||
No changes to render. Adjust pause points or queue TTS regenerations.
|
||||
|
|
|
|||
|
|
@ -751,6 +751,7 @@ export function QCDetail() {
|
|||
<RerenderControls
|
||||
pendingRegenerations={pendingRegenerations}
|
||||
pausePointsModified={pausePointsModified}
|
||||
adVttUploaded={adVttUploaded}
|
||||
isRendering={isRendering}
|
||||
onRender={handleRender}
|
||||
onClearQueue={handleClearRegenerationQueue}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue