mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
feat(onboarding): prevent onboarding from starting if version-mismatch banner is visible
This commit is contained in:
@@ -68,7 +68,10 @@ export class AppCore {
|
|||||||
|
|
||||||
// Start onboarding if needed (after everything is initialized)
|
// Start onboarding if needed (after everything is initialized)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
onboardingManager.start();
|
// Do not show onboarding if version-mismatch banner is visible
|
||||||
|
if (!bannerService.isBannerVisible('version-mismatch')) {
|
||||||
|
onboardingManager.start();
|
||||||
|
}
|
||||||
}, 1000); // Small delay to ensure all elements are rendered
|
}, 1000); // Small delay to ensure all elements are rendered
|
||||||
|
|
||||||
// Return the core instance for chaining
|
// Return the core instance for chaining
|
||||||
|
|||||||
@@ -171,6 +171,16 @@ class BannerService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a banner is currently rendered and visible
|
||||||
|
* @param {string} bannerId
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
isBannerVisible(bannerId) {
|
||||||
|
const el = document.querySelector(`[data-banner-id="${bannerId}"]`);
|
||||||
|
return !!el && el.offsetParent !== null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update container visibility based on active banners
|
* Update container visibility based on active banners
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user