Enhance site deployment and preview functionality. Updated Preview.tsx to improve deployment record handling and fallback URL logic. Added deploy functionality in Blueprints.tsx and Preview.tsx, including loading states and user feedback. Introduced ProgressModal for page generation status updates. Updated siteBuilder.api.ts to include deployBlueprint API method.

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-18 18:58:48 +00:00
parent ce6da7d2d5
commit c378e503d8
6 changed files with 351 additions and 28 deletions

View File

@@ -157,5 +157,16 @@ export const siteBuilderApi = {
body: JSON.stringify({ ids }),
});
},
/**
* Deploy a blueprint to Sites renderer
*/
async deployBlueprint(blueprintId: number): Promise<{ success: boolean; deployment_url?: string; deployment_id?: number }> {
const response = await fetchAPI(`/v1/publisher/deploy/${blueprintId}/`, {
method: 'POST',
});
// Handle unified response format
return response?.data || response;
},
};