fix: stuck template generation

This commit is contained in:
Suraj Jha 2025-08-13 17:54:47 +05:45
parent 667415997e
commit 3415208a7c
No known key found for this signature in database
GPG key ID: 5AC6C16355CE2C14
3 changed files with 12 additions and 3 deletions

View file

@ -249,7 +249,7 @@ async def analyze_fonts_in_all_slides(slide_xmls: List[str]) -> FontAnalysisResu
return FontAnalysisResult(
internally_supported_fonts=internally_supported_fonts,
not_supported_fonts=not_supported_fonts
not_supported_fonts=[]
)

View file

@ -157,13 +157,23 @@ export const useSlideProcessing = (
setSlides(initialSlides);
const hasUnsupported = Array.isArray(pptxData.fonts?.not_supported_fonts) && pptxData.fonts.not_supported_fonts.length > 0;
toast.success(
`Template Processing Finished`,
{
description: `Please Upload the not supported fonts, and click Extract Template`
description: hasUnsupported
? `Please Upload the not supported fonts, and click Extract Template`
: `All fonts are supported. Starting template extraction...`
}
);
// If all fonts are supported, auto-start extraction from the first slide
if (!hasUnsupported && initialSlides.length > 0) {
const firstSlide = initialSlides[0];
setTimeout(() => processSlideToHtml(firstSlide, 0), 300);
}
} catch (error) {
console.error("Error processing file:", error);

View file

@ -82,7 +82,6 @@ const CustomTemplatePage = () => {
}
}, []);
// Loading state
if (isRequiredKeyLoading) {
return <LoadingSpinner message="Checking API Key..." />;