Implement auto color-scheme in order to respect browser's selected prefers-color-scheme

This commit is contained in:
Hadi Nategh
2021-01-26 17:04:37 +01:00
parent 511325570a
commit dad82bf1f1
7 changed files with 67 additions and 8 deletions

View File

@ -118,7 +118,7 @@ var EgwApp = /** @class */ (function () {
// Highlights the favorite based on initial list state
this.highlight_favorite();
// apply theme mode
jQuery('html').attr('data-darkmode', egw.preference('darkmode', 'common'));
window.framework._setDarkMode(egw.getSessionItem('api', 'darkmode'));
};
/**
* Observer method receives update notifications from all applications

View File

@ -208,7 +208,7 @@ export abstract class EgwApp
// Highlights the favorite based on initial list state
this.highlight_favorite();
// apply theme mode
jQuery('html').attr('data-darkmode', <string> egw.preference('darkmode', 'common'));
window.framework._setDarkMode(egw.getSessionItem('api', 'darkmode'));
}
/**