mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
feat: Refactor duplicates management with user preference for notification visibility and modular banner component, fixes #359
This commit is contained in:
@@ -254,4 +254,20 @@ export function resetDismissedBanner(bannerId) {
|
||||
const dismissedBanners = getStorageItem('dismissed_banners', []);
|
||||
const updatedBanners = dismissedBanners.filter(id => id !== bannerId);
|
||||
setStorageItem('dismissed_banners', updatedBanners);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the show duplicates notification preference
|
||||
* @returns {boolean} True if notification should be shown (default: true)
|
||||
*/
|
||||
export function getShowDuplicatesNotification() {
|
||||
return getStorageItem('show_duplicates_notification', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the show duplicates notification preference
|
||||
* @param {boolean} show - Whether to show the notification
|
||||
*/
|
||||
export function setShowDuplicatesNotification(show) {
|
||||
setStorageItem('show_duplicates_notification', show);
|
||||
}
|
||||
Reference in New Issue
Block a user