Require podcast avatar before enabling Analyze & Continue button
- canSubmit now checks for avatar presence (uploaded, brand, or generated) - Checks avatarFile, avatarUrl, avatarPreview, brandAvatarFromDb, brandAvatarBlobUrl - Updated tooltip to reflect new requirement
This commit is contained in:
@@ -269,7 +269,16 @@ export const CreateModal: React.FC<CreateModalProps> = ({ onCreate, open, defaul
|
|||||||
};
|
};
|
||||||
}, [duration, speakers, knobs.bitrate, knobs.scene_length_target]);
|
}, [duration, speakers, knobs.bitrate, knobs.scene_length_target]);
|
||||||
|
|
||||||
const canSubmit = Boolean(topicInput.trim());
|
// Check if avatar is present (from any source: upload, brand avatar, or generated)
|
||||||
|
const hasAvatar = Boolean(
|
||||||
|
avatarFile || // User uploaded an image
|
||||||
|
avatarUrl || // Already processed avatar URL
|
||||||
|
avatarPreview || // Avatar preview available
|
||||||
|
brandAvatarFromDb || // Brand avatar from database
|
||||||
|
brandAvatarBlobUrl // Brand avatar blob URL
|
||||||
|
);
|
||||||
|
|
||||||
|
const canSubmit = Boolean(topicInput.trim() && hasAvatar);
|
||||||
|
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
if (!canSubmit || isSubmitting) return;
|
if (!canSubmit || isSubmitting) return;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export const CreateActions: React.FC<CreateActionsProps> = ({
|
|||||||
disabled={!canSubmit || isSubmitting}
|
disabled={!canSubmit || isSubmitting}
|
||||||
loading={isSubmitting}
|
loading={isSubmitting}
|
||||||
startIcon={<AutoAwesomeIcon />}
|
startIcon={<AutoAwesomeIcon />}
|
||||||
tooltip={!canSubmit ? "Enter an idea or URL to continue" : "We’ll start AI analysis after this click"}
|
tooltip={!canSubmit ? "Enter an idea/URL and add a podcast avatar to continue" : "We'll start AI analysis after this click"}
|
||||||
>
|
>
|
||||||
{isSubmitting ? "Analyzing..." : "Analyze & Continue"}
|
{isSubmitting ? "Analyzing..." : "Analyze & Continue"}
|
||||||
</PrimaryButton>
|
</PrimaryButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user