Compare commits

...

2 Commits

4 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,10 @@
# Changelog # Changelog
## 2024-10-21 - 2.0.65 - fix(ThemeManager)
Refactor ThemeManager class to separate global style setting logic
- Moved logic to set global styles into a dedicated function setGlobalStylesOnPurpose in ThemeManager.
## 2024-10-06 - 2.0.64 - fix(pluginexports) ## 2024-10-06 - 2.0.64 - fix(pluginexports)
Add missing import for smartrouter in pluginexports. Add missing import for smartrouter in pluginexports.

View File

@ -1,6 +1,6 @@
{ {
"name": "@design.estate/dees-domtools", "name": "@design.estate/dees-domtools",
"version": "2.0.64", "version": "2.0.65",
"private": false, "private": false,
"description": "A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.", "description": "A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@design.estate/dees-domtools', name: '@design.estate/dees-domtools',
version: '2.0.64', version: '2.0.65',
description: 'A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.' description: 'A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.'
} }

View File

@ -21,10 +21,13 @@ export class ThemeManager {
this.updateAllConnectedElements(); this.updateAllConnectedElements();
} }
private async updateAllConnectedElements() { private async setGlobalStylesOnPurpose() {
if (document.body && document.body.style) { if (document.body && document.body.style) {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000'; document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
} }
}
private async updateAllConnectedElements() {
this.themeObservable.next(this.goBrightBoolean); this.themeObservable.next(this.goBrightBoolean);
} }