Changes to config: defaults -> theme, preLoginTheme -> theme.preLogin, etc.

This commit is contained in:
Bryan Ashby
2018-11-07 18:33:07 -07:00
parent 8182146574
commit 7d74556868
6 changed files with 26 additions and 33 deletions

View File

@@ -23,10 +23,11 @@ module.exports = class LoginServerModule extends ServerModule {
//
// Choose initial theme before we have user context
//
if('*' === conf.config.preLoginTheme) {
const preLoginTheme = _.get(conf.config, 'theme.preLogin');
if('*' === preLoginTheme) {
client.user.properties.theme_id = theme.getRandomTheme() || '';
} else {
client.user.properties.theme_id = conf.config.preLoginTheme;
client.user.properties.theme_id = preLoginTheme;
}
theme.setClientTheme(client, client.user.properties.theme_id);