fix: stuck template generation
This commit is contained in:
parent
667415997e
commit
3415208a7c
3 changed files with 12 additions and 3 deletions
|
|
@ -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=[]
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ const CustomTemplatePage = () => {
|
|||
}
|
||||
}, []);
|
||||
|
||||
|
||||
// Loading state
|
||||
if (isRequiredKeyLoading) {
|
||||
return <LoadingSpinner message="Checking API Key..." />;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue