Compare commits

...

4 Commits

Author SHA1 Message Date
b3deb31ab5 1.0.82 2020-12-07 05:25:26 +00:00
6ea5482e3d fix(core): update 2020-12-07 05:25:25 +00:00
0ead7215ff 1.0.81 2020-12-07 03:47:39 +00:00
286bb0887a fix(core): update 2020-12-07 03:47:39 +00:00
3 changed files with 16 additions and 14 deletions

14
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-domtools",
"version": "1.0.80",
"version": "1.0.82",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -1949,9 +1949,9 @@
}
},
"@pushrocks/smartrouter": {
"version": "1.0.6",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.6.tgz",
"integrity": "sha512-aKhZOkHsqOUiPFA3+61vkZvInGb1lQ/68FIfT7dBrrFdHXXPo6tY8cm+GnT4ELUnXLpZBmnNm2rxLa22z6j4dg==",
"version": "1.0.7",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrouter/-/smartrouter-1.0.7.tgz",
"integrity": "sha512-ns4ye4uyzjpFUDr/vciOZog4y5QDsFBxwnYmXkSMxCA7hwiL0Fn64lvCexjez05t6Gz54ge5yflWSvyv63X0kA==",
"requires": {
"path-to-regexp": "^6.1.0"
}
@ -2134,9 +2134,9 @@
}
},
"@pushrocks/websetup": {
"version": "3.0.11",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebsetup/-/websetup-3.0.11.tgz",
"integrity": "sha512-5nQqrQSiP5/WUv5pLsmjYAkfGosi2DqEH1mNrliOTr6iA8syGQ7bOQk4JY7jApjk64wO5L7l8qBGvKJuZ+p9Dw==",
"version": "3.0.12",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fwebsetup/-/websetup-3.0.12.tgz",
"integrity": "sha512-/E1IJQF0uG29E+Opb/pm/byq6Gd5P0ZZHuyZ4iVeIzSqMI4QC+W2IxwkXYDtbOLFAXDCe0qsn+6xako+WvAeEA==",
"requires": {
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3",

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-domtools",
"version": "1.0.80",
"version": "1.0.82",
"private": false,
"description": "tools to simplify complex css structures",
"main": "dist_ts/index.js",
@ -27,11 +27,11 @@
"@pushrocks/lik": "^4.0.20",
"@pushrocks/smartdelay": "^2.0.10",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrouter": "^1.0.6",
"@pushrocks/smartrouter": "^1.0.7",
"@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smartstate": "^1.0.21",
"@pushrocks/webrequest": "^2.0.13",
"@pushrocks/websetup": "^3.0.11",
"@pushrocks/websetup": "^3.0.12",
"@pushrocks/webstore": "^1.0.16",
"lit-element": "^2.4.0",
"sweet-scroll": "^4.0.0"

View File

@ -15,7 +15,7 @@ export class ThemeManager {
// lets care
this.goBrightBoolean = this.preferredColorSchemeMediaMatch.matches;
this.preferredColorSchemeMediaMatch.addEventListener('change', eventArg => {
this.preferredColorSchemeMediaMatch.addEventListener('change', (eventArg) => {
this.goBrightBoolean = eventArg.matches;
this.updateAllConnectedElements();
});
@ -23,7 +23,9 @@ export class ThemeManager {
}
private async updateAllConnectedElements() {
if (document.body && document.body.style) {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
}
this.themeObservable.next(this.goBrightBoolean);
}