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:
@@ -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;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user