mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
feat: update preview URL handling in RecipeRoutes and optimize recipe refresh logic in RecipeModal. Fixes #244
This commit is contained in:
@@ -1373,7 +1373,7 @@ class RecipeRoutes:
|
|||||||
json.dump(recipe_data, f, indent=4, ensure_ascii=False)
|
json.dump(recipe_data, f, indent=4, ensure_ascii=False)
|
||||||
|
|
||||||
updated_lora['inLibrary'] = True
|
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']
|
updated_lora['localPath'] = target_lora['file_path']
|
||||||
|
|
||||||
# Update in cache if it exists
|
# Update in cache if it exists
|
||||||
|
|||||||
@@ -989,13 +989,10 @@ class RecipeModal {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.showRecipeDetails(this.currentRecipe);
|
this.showRecipeDetails(this.currentRecipe);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
// Refresh recipes list
|
state.virtualScroller.updateSingleItem(this.currentRecipe.file_path, {
|
||||||
if (window.recipeManager && typeof window.recipeManager.loadRecipes === 'function') {
|
loras: this.currentRecipe.loras
|
||||||
setTimeout(() => {
|
});
|
||||||
window.recipeManager.loadRecipes(true);
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
showToast(`Error: ${result.error}`, 'error');
|
showToast(`Error: ${result.error}`, 'error');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user