mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21: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:
@@ -1,11 +1,16 @@
|
||||
// Create the new hierarchical state structure
|
||||
import { getStorageItem } from '../utils/storageHelpers.js';
|
||||
|
||||
// Load settings from localStorage or use defaults
|
||||
const savedSettings = getStorageItem('settings', {
|
||||
blurMatureContent: true,
|
||||
show_only_sfw: false
|
||||
});
|
||||
|
||||
export const state = {
|
||||
// Global state
|
||||
global: {
|
||||
settings: {
|
||||
blurMatureContent: true,
|
||||
show_only_sfw: false
|
||||
},
|
||||
settings: savedSettings,
|
||||
loadingManager: null,
|
||||
observer: null,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user