Fixed agent invite when minify is enabled.
This commit is contained in:
parent
d470944b8d
commit
1b976f12e1
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "meshcentral",
|
"name": "meshcentral",
|
||||||
"version": "0.4.1-a",
|
"version": "0.4.1-b",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Remote Management",
|
"Remote Management",
|
||||||
"Intel AMT",
|
"Intel AMT",
|
||||||
|
|
21
webserver.js
21
webserver.js
|
@ -3667,35 +3667,32 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
if (minify) {
|
if (minify) {
|
||||||
p = obj.path.join(obj.parent.webViewsOverridePath, pagename + '-mobile-min');
|
p = obj.path.join(obj.parent.webViewsOverridePath, pagename + '-mobile-min');
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile + Minify + Override document
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile + Minify + Override document
|
||||||
} else {
|
|
||||||
p = obj.path.join(obj.parent.webViewsOverridePath, pagename + '-mobile');
|
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile + Override document
|
|
||||||
}
|
}
|
||||||
|
p = obj.path.join(obj.parent.webViewsOverridePath, pagename + '-mobile');
|
||||||
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile + Override document
|
||||||
}
|
}
|
||||||
if (minify) {
|
if (minify) {
|
||||||
p = obj.path.join(obj.parent.webViewsPath, pagename + '-mobile-min');
|
p = obj.path.join(obj.parent.webViewsPath, pagename + '-mobile-min');
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile + Minify document
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile + Minify document
|
||||||
} else {
|
|
||||||
p = obj.path.join(obj.parent.webViewsPath, pagename + '-mobile');
|
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile document
|
|
||||||
}
|
}
|
||||||
|
p = obj.path.join(obj.parent.webViewsPath, pagename + '-mobile');
|
||||||
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Mobile document
|
||||||
}
|
}
|
||||||
if (obj.parent.webViewsOverridePath != null) {
|
if (obj.parent.webViewsOverridePath != null) {
|
||||||
if (minify) {
|
if (minify) {
|
||||||
p = obj.path.join(obj.parent.webViewsOverridePath, pagename + '-min');
|
p = obj.path.join(obj.parent.webViewsOverridePath, pagename + '-min');
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Minify + Override document
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Minify + Override document
|
||||||
} else {
|
|
||||||
p = obj.path.join(obj.parent.webViewsOverridePath, pagename);
|
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Override document
|
|
||||||
}
|
}
|
||||||
|
p = obj.path.join(obj.parent.webViewsOverridePath, pagename);
|
||||||
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Override document
|
||||||
}
|
}
|
||||||
if (minify) {
|
if (minify) {
|
||||||
p = obj.path.join(obj.parent.webViewsPath, pagename + '-min');
|
p = obj.path.join(obj.parent.webViewsPath, pagename + '-min');
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Minify document
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Minify document
|
||||||
} else {
|
|
||||||
p = obj.path.join(obj.parent.webViewsPath, pagename);
|
|
||||||
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Default document
|
|
||||||
}
|
}
|
||||||
|
p = obj.path.join(obj.parent.webViewsPath, pagename);
|
||||||
|
if (obj.fs.existsSync(p + '.handlebars')) { return p; } // Default document
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if a mobile browser is detected.
|
// Return true if a mobile browser is detected.
|
||||||
|
|
Loading…
Reference in New Issue