fix(recipes): restore batch import modal on reopen and log recipe ingest progress (#1084)

This commit is contained in:
Will Miao
2026-08-26 22:32:20 +08:00
parent 641a61f804
commit d188cec306
7 changed files with 379 additions and 6 deletions
@@ -30,6 +30,7 @@ export class ImageProcessor {
errorElement.textContent = '';
this.importManager.recipeImage = file;
this.importManager.importMode = 'upload';
console.log(`[RecipeImport] Recipe image selected: ${file.name}`);
// Show the selected file name in the drop zone
this.importManager.updateSelectedFileName(file.name);
@@ -66,6 +67,10 @@ export class ImageProcessor {
errorElement.textContent = '';
this.importManager.importMode = 'url';
console.log(
`[RecipeImport] Analyzing recipe input (${input.startsWith('http://') || input.startsWith('https://') ? 'remote URL' : 'local path'}): ${input.slice(0, 80)}`
);
// Put the fetch button into a loading state to prevent duplicate submits
const fetchBtn = document.getElementById('fetchImageBtn');
this._setFetchButtonLoading(fetchBtn, true);
@@ -144,6 +149,9 @@ export class ImageProcessor {
this.importManager.importAsNew = false;
// Proceed to recipe details step
console.log(
`[RecipeImport] Analysis complete: ${this.importManager.recipeData.loras.length} LoRA(s) found, ${this.importManager.missingLoras.length} missing locally.`
);
this.importManager.showRecipeDetailsStep();
} catch (error) {
@@ -196,6 +204,9 @@ export class ImageProcessor {
this.importManager.importAsNew = false;
// Proceed to recipe details step
console.log(
`[RecipeImport] Analysis complete: ${this.importManager.recipeData.loras.length} LoRA(s) found, ${this.importManager.missingLoras.length} missing locally.`
);
this.importManager.showRecipeDetailsStep();
} catch (error) {
@@ -251,6 +262,9 @@ export class ImageProcessor {
this.importManager.importAsNew = false;
// Proceed to recipe details step
console.log(
`[RecipeImport] Analysis complete: ${this.importManager.recipeData.loras.length} LoRA(s) found, ${this.importManager.missingLoras.length} missing locally.`
);
this.importManager.showRecipeDetailsStep();
} catch (error) {