feat: bring back noskin option

if forum sets a default skin there was no way for the user to go back to the no skin version
This commit is contained in:
Barış Soner Uşaklı
2023-06-10 11:55:59 -04:00
parent 33a6b3e1da
commit 2edfe0ef3e
7 changed files with 51 additions and 19 deletions

View File

@@ -179,13 +179,13 @@ async function getBundleMetadata(target) {
let themeData = null;
if (target === 'client') {
themeData = await db.getObjectFields('config', ['theme:type', 'theme:id', 'bootswatchSkin']);
themeData = await db.getObjectFields('config', ['theme:type', 'theme:id']);
const themeId = (themeData['theme:id'] || 'nodebb-theme-harmony');
const baseThemePath = path.join(nconf.get('themes_path'), (themeData['theme:type'] && themeData['theme:type'] === 'local' ? themeId : 'nodebb-theme-harmony'));
paths.unshift(baseThemePath);
paths.unshift(`${baseThemePath}/node_modules`);
themeData.bootswatchSkin = skin || themeData.bootswatchSkin;
themeData.bootswatchSkin = skin;
}
const [scssImports, cssImports, acpScssImports] = await Promise.all([