mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-24 22:41:26 -03:00
fix(recipes): show initialization screen and auto-reload during first scan
The recipes page always rendered with is_initializing=False, so a cold start displayed an empty grid that never updated until a manual refresh. Mirror the model pages: gate render_page on the scanner state, broadcast init progress from RecipeScanner (including a completion message, and a failure fallback so the page never stalls), and teach initialization.js to detect the /loras/recipes page before the generic /loras match.
This commit is contained in:
@@ -52,7 +52,11 @@ class InitializationManager {
|
||||
detectPageType() {
|
||||
// Get the current page type from URL or data attribute
|
||||
const path = window.location.pathname;
|
||||
if (path.includes('/checkpoints')) {
|
||||
// The recipes page lives at /loras/recipes, so it must be matched
|
||||
// before the generic '/loras' check.
|
||||
if (path.includes('/recipes')) {
|
||||
this.pageType = 'recipes';
|
||||
} else if (path.includes('/checkpoints')) {
|
||||
this.pageType = 'checkpoints';
|
||||
} else if (path.includes('/loras')) {
|
||||
this.pageType = 'loras';
|
||||
@@ -216,7 +220,8 @@ class InitializationManager {
|
||||
const scannerTypeToPageType = {
|
||||
'lora': 'loras',
|
||||
'checkpoint': 'checkpoints',
|
||||
'embedding': 'embeddings'
|
||||
'embedding': 'embeddings',
|
||||
'recipe': 'recipes'
|
||||
};
|
||||
|
||||
if (scannerTypeToPageType[data.scanner_type] !== this.pageType) {
|
||||
|
||||
Reference in New Issue
Block a user