1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improved device group summary page.

This commit is contained in:
Ylian Saint-Hilaire 2019-12-18 14:57:29 -08:00
parent 3cb56ee4ec
commit a0479092eb
14 changed files with 720 additions and 326 deletions

View file

@ -4122,7 +4122,11 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if (fileOptions != null) {
for (var i in acceptLanguages) {
if ((acceptLanguages[i] == 'en') || (acceptLanguages[i].startsWith('en-'))) { break; } // English requested, break out.
if (fileOptions[acceptLanguages[i]] != null) { res.render(fileOptions[acceptLanguages[i]], args); return; } // Found a match.
if (fileOptions[acceptLanguages[i]] != null) {
// Found a match. If the file no longer exists, default to English.
if (obj.fs.existsSync(fileOptions[acceptLanguages[i]] + '.handlebars')) { res.render(fileOptions[acceptLanguages[i]], args); } else { res.render(filename, args); }
return;
}
}
}
}