feat: remove options page and add edit page

This commit is contained in:
Chaewon Lee
2026-06-12 17:24:26 +09:00
committed by GitHub
parent 5d65a5ffae
commit e7c690ac13
26 changed files with 622 additions and 351 deletions

View File

@@ -88,13 +88,24 @@ export async function generateImages(jobId) {
/**
* @param {string} jobId
* @param {'S' | 'M' | 'L'} size
* @param {{ mode: string, prompt: string, selection: Array<{ x: number, y: number }> }} editInstruction
*/
export async function selectOption(jobId, size) {
const response = await fetch('/api/flower-flow/select-option', {
export async function editImages(jobId, editInstruction) {
const response = await fetch('/api/flower-flow/edit-images', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jobId, size })
body: JSON.stringify({ jobId, ...editInstruction })
});
return parseResponse(response);
}
/** @param {string} jobId */
export async function finalizeJob(jobId) {
const response = await fetch('/api/flower-flow/finalize', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jobId })
});
return parseResponse(response);