Rename SettingsManager to SeasonalSettingsManager and update related log messages
This commit is contained in:
@@ -68,7 +68,7 @@ const ThemeConfigs = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const SettingsManager = {
|
const SeasonalSettingsManager = {
|
||||||
initialized: false,
|
initialized: false,
|
||||||
config: null,
|
config: null,
|
||||||
|
|
||||||
@@ -237,17 +237,17 @@ const SeasonalsManager = {
|
|||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
this.config = await response.json();
|
this.config = await response.json();
|
||||||
window.SeasonalsPluginConfig = this.config;
|
window.SeasonalsPluginConfig = this.config;
|
||||||
console.log('Seasonals: Config loaded:', this.config);
|
console.log('Seasonals: Seasonals Config loaded:', this.config);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Seasonals: Error fetching config:', error);
|
console.error('Seasonals: Error fetching Seasonals config:', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize Settings UI
|
// Initialize Settings UI
|
||||||
SettingsManager.init(this.config);
|
SeasonalSettingsManager.init(this.config);
|
||||||
|
|
||||||
// User Preference Check
|
// User Preference Check
|
||||||
const isEnabled = SettingsManager.getSetting('enabled', 'true') === 'true';
|
const isEnabled = SeasonalSettingsManager.getSetting('enabled', 'true') === 'true';
|
||||||
if (!isEnabled) {
|
if (!isEnabled) {
|
||||||
console.log('Seasonals: Disabled by user preference.');
|
console.log('Seasonals: Disabled by user preference.');
|
||||||
return;
|
return;
|
||||||
@@ -267,7 +267,7 @@ const SeasonalsManager = {
|
|||||||
|
|
||||||
selectTheme() {
|
selectTheme() {
|
||||||
// Check local override
|
// Check local override
|
||||||
const forcedTheme = SettingsManager.getSetting('theme', 'auto');
|
const forcedTheme = SeasonalSettingsManager.getSetting('theme', 'auto');
|
||||||
if (forcedTheme !== 'auto') {
|
if (forcedTheme !== 'auto') {
|
||||||
console.log(`Seasonals: User forced theme: ${forcedTheme}`);
|
console.log(`Seasonals: User forced theme: ${forcedTheme}`);
|
||||||
return forcedTheme;
|
return forcedTheme;
|
||||||
|
|||||||
Reference in New Issue
Block a user