Add Image Generation Settings Endpoint and Update Frontend Modal: Implement a new API endpoint to fetch image generation settings, enhance the ImageQueueModal to display progress and status, and integrate the settings into the image generation workflow.
This commit is contained in:
@@ -1039,6 +1039,23 @@ export async function generateImages(imageIds: number[]): Promise<any> {
|
||||
});
|
||||
}
|
||||
|
||||
export interface ImageGenerationSettings {
|
||||
success: boolean;
|
||||
config: {
|
||||
provider: string;
|
||||
model: string;
|
||||
image_type: string;
|
||||
max_in_article_images: number;
|
||||
image_format: string;
|
||||
desktop_enabled: boolean;
|
||||
mobile_enabled: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export async function fetchImageGenerationSettings(): Promise<ImageGenerationSettings> {
|
||||
return fetchAPI('/v1/system/integrations/image_generation/');
|
||||
}
|
||||
|
||||
export async function deleteTaskImage(id: number): Promise<void> {
|
||||
return fetchAPI(`/v1/writer/images/${id}/`, {
|
||||
method: 'DELETE',
|
||||
|
||||
Reference in New Issue
Block a user