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

Added server maintenance mode.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-20 16:43:58 -08:00
parent 2c970c23d5
commit 9af599e4df
9 changed files with 154 additions and 83 deletions

View file

@ -53,6 +53,7 @@
var title = '';
if (titleid == 1) { title = "Account Verification"; }
if (titleid == 2) { title = "Desktop Sharing"; }
if (titleid == 3) { title = "Server Under Maintenance"; }
QH('topTitle', Q('topTitle').innerText + ' - ' + title);
QH('mainTitle', title);
@ -74,10 +75,11 @@
case 10: { msg = "ERROR: Invalid account check, verification url is only valid for 30 minutes."; break; }
case 11: { msg = "Sharing link not valid yet."; break; }
case 12: { msg = "Sharing link is expired."; break; }
case 13: { msg = "If you are an administrator, [login here].".replace('[', '<a href=login?admin=1>').replace(']', '</a>'); break; }
}
// Add login page link
if ((msgid != 11) && (msgid != 12)) { msg += ' <a href="' + domainurl + (urlargs.key ? ('?key=' + urlargs.key) : '') + '">' + "Go to login page" + '</a>.' }
if ((msgid != 11) && (msgid != 12) && (msgid != 13)) { msg += ' <a href="' + domainurl + (urlargs.key ? ('?key=' + urlargs.key) : '') + '">' + "Go to login page" + '</a>.' }
QH('mainMessage', msg);
function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };