Print compatibility theme setting warning on startup

This commit is contained in:
Pavel Djundik 2017-09-19 12:08:08 +03:00
parent c7433eca95
commit 21c9919fa1
2 changed files with 8 additions and 5 deletions

View File

@ -84,6 +84,14 @@ function setHome(homePath) {
log.warn("debug option is now an object, see defaults file for more information.");
this.config.debug = {ircFramework: true};
}
// TODO: Remove in future release
// Backwards compatibility for old way of specifying themes in settings
if (this.config.theme.includes(".css")) {
log.warn(`Referring to CSS files in the ${colors.green("theme")} setting of ${colors.green(Helper.CONFIG_PATH)} is ${colors.bold("deprecated")} and will be removed in a future version.`);
} else {
this.config.theme = `themes/${this.config.theme}.css`;
}
}
function getUserConfigPath(name) {

View File

@ -201,11 +201,6 @@ function index(req, res, next) {
pkg,
Helper.config
);
if (!data.theme.includes(".css")) { // Backwards compatibility for old way of specifying themes in settings
data.theme = `themes/${data.theme}.css`;
} else {
log.warn(`Referring to CSS files in the ${colors.green("theme")} setting of ${colors.green(Helper.CONFIG_PATH)} is ${colors.bold("deprecated")} and will be removed in a future version.`);
}
data.gitCommit = Helper.getGitCommit();
data.themes = themes.getAll();