mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-09 20:39:25 -03:00
fix(recipe): set dataset.favorite on recipe cards for correct bulk favorite menu
This commit is contained in:
@@ -28,6 +28,7 @@ class RecipeCard {
|
|||||||
card.dataset.created = this.recipe.created_date;
|
card.dataset.created = this.recipe.created_date;
|
||||||
card.dataset.id = this.recipe.id || '';
|
card.dataset.id = this.recipe.id || '';
|
||||||
card.dataset.folder = this.recipe.folder || '';
|
card.dataset.folder = this.recipe.folder || '';
|
||||||
|
card.dataset.favorite = this.recipe.favorite ? 'true' : 'false';
|
||||||
|
|
||||||
// Get base model with fallback
|
// Get base model with fallback
|
||||||
const baseModelLabel = (this.recipe.base_model || '').trim() || 'Unknown';
|
const baseModelLabel = (this.recipe.base_model || '').trim() || 'Unknown';
|
||||||
@@ -161,6 +162,7 @@ class RecipeCard {
|
|||||||
|
|
||||||
// Update early to provide instant feedback and avoid race conditions with re-renders
|
// Update early to provide instant feedback and avoid race conditions with re-renders
|
||||||
this.recipe.favorite = newFavoriteState;
|
this.recipe.favorite = newFavoriteState;
|
||||||
|
card.dataset.favorite = newFavoriteState ? 'true' : 'false';
|
||||||
|
|
||||||
// Function to update icon state
|
// Function to update icon state
|
||||||
const updateIconUI = (icon, state) => {
|
const updateIconUI = (icon, state) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user