mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-21 11:11:26 -03:00
feat(banners): rotate active banners one at a time with a pager
Stacking every active banner vertically ate header height when several were active at once. Only the highest-priority banner renders now; a ‹ 1/N › pager cycles through the rest, and all active banners are still recorded in the notification-center history so cycled-away ones stay reachable. Newly registered banners preempt the displayed one only when they outrank it. Also fix the startup flow: the restart-required banner (now priority 80) outranks the model-folders setup warning (60), and the setup banner is retired once a non-empty folder path is saved. New banners.pager.* keys translated in all 9 locales.
This commit is contained in:
@@ -2405,6 +2405,17 @@ export class SettingsManager {
|
||||
|
||||
try {
|
||||
await this.saveSetting('folder_paths', folderPaths);
|
||||
|
||||
// The "model folders need setup" startup banner is obsolete once
|
||||
// at least one folder path is configured.
|
||||
const hasAnyPath = Object.values(folderPaths).some(value => {
|
||||
const list = Array.isArray(value) ? value : [value];
|
||||
return list.some(path => typeof path === 'string' && path.trim());
|
||||
});
|
||||
if (hasAnyPath) {
|
||||
bannerService.removeBannerElement('startup-missing-model-paths');
|
||||
}
|
||||
|
||||
this._markModelPathsDirty();
|
||||
showToast('settings.modelPaths.saveSuccessRestart', {}, 'success');
|
||||
|
||||
@@ -2451,7 +2462,9 @@ export class SettingsManager {
|
||||
title: translate('settings.modelPaths.pendingRestartBannerTitle', {}, 'Restart required to apply path changes'),
|
||||
content: translate('settings.modelPaths.pendingRestartBannerMessage', {}, 'Model library paths were updated. Restart the LoRA Manager server to scan the new folders.'),
|
||||
dismissible: true,
|
||||
priority: 60,
|
||||
// Above startup warnings (60), below startup errors (90): a pending
|
||||
// restart is the most actionable state and should preempt prompts.
|
||||
priority: 80,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user