MAJOR CHANGE to theming system:

* Less complex
* Themes are only loaded once. Users share avail themes[] objects
* Themes are applied to configuration _once_
* Users can switch themes in configuration
* Other related improvements
This commit is contained in:
Bryan Ashby 2016-01-14 22:44:33 -07:00
parent ef047bc515
commit 4fdd3dbbfe
8 changed files with 207 additions and 66 deletions

View file

@ -274,9 +274,7 @@ function prepareClient(client, cb) {
} else {
client.user.properties.theme_id = conf.config.preLoginTheme;
}
theme.loadTheme(client.user.properties.theme_id, function themeLoaded(err, theme) {
client.currentTheme = theme;
cb(null);
});
theme.setClientTheme(client, client.user.properties.theme_id);
cb(null); // note: currently useless to use cb here - but this may change...again...
}