mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-23 22:22:11 -03:00
Enhance settings management and localStorage integration
- Added functionality to load settings from localStorage in the SettingsManager, ensuring user preferences are retained across sessions. - Updated the state management to initialize settings from localStorage, improving user experience. - Refactored the UpdateService to streamline update notification preferences. - Improved migration logic in storageHelpers to prevent duplicate migrations and ensure data integrity. - Removed unnecessary console logs for cleaner output in various modules.
This commit is contained in:
@@ -8,15 +8,11 @@ export class UpdateService {
|
||||
this.latestVersion = "v0.0.0"; // Initialize with default values
|
||||
this.updateInfo = null;
|
||||
this.updateAvailable = false;
|
||||
this.updateNotificationsEnabled = getStorageItem('show_update_notifications') !== 'false';
|
||||
this.updateNotificationsEnabled = getStorageItem('show_update_notifications');
|
||||
this.lastCheckTime = parseInt(getStorageItem('last_update_check') || '0');
|
||||
}
|
||||
|
||||
initialize() {
|
||||
// Initialize update preferences from localStorage
|
||||
const showUpdates = getStorageItem('show_update_notifications');
|
||||
this.updateNotificationsEnabled = showUpdates === null || showUpdates === 'true';
|
||||
|
||||
// Register event listener for update notification toggle
|
||||
const updateCheckbox = document.getElementById('updateNotifications');
|
||||
if (updateCheckbox) {
|
||||
|
||||
Reference in New Issue
Block a user