diff --git a/py/routes/recipe_routes.py b/py/routes/recipe_routes.py index e264ed16..85cd86ed 100644 --- a/py/routes/recipe_routes.py +++ b/py/routes/recipe_routes.py @@ -1373,7 +1373,7 @@ class RecipeRoutes: json.dump(recipe_data, f, indent=4, ensure_ascii=False) updated_lora['inLibrary'] = True - updated_lora['preview_url'] = target_lora['preview_url'] + updated_lora['preview_url'] = config.get_preview_static_url(target_lora['preview_url']) updated_lora['localPath'] = target_lora['file_path'] # Update in cache if it exists diff --git a/static/js/components/RecipeModal.js b/static/js/components/RecipeModal.js index 8e7dbb09..ce5070a0 100644 --- a/static/js/components/RecipeModal.js +++ b/static/js/components/RecipeModal.js @@ -989,13 +989,10 @@ class RecipeModal { setTimeout(() => { this.showRecipeDetails(this.currentRecipe); }, 500); - - // Refresh recipes list - if (window.recipeManager && typeof window.recipeManager.loadRecipes === 'function') { - setTimeout(() => { - window.recipeManager.loadRecipes(true); - }, 1000); - } + + state.virtualScroller.updateSingleItem(this.currentRecipe.file_path, { + loras: this.currentRecipe.loras + }); } else { showToast(`Error: ${result.error}`, 'error'); }