Merge branch 'Ylianst:master' into master

This commit is contained in:
petervanv 2022-02-15 20:24:59 +01:00 committed by GitHub
commit 752c8a493c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 9 deletions

View File

@ -1076,6 +1076,8 @@ function handleServerCommand(data) {
break; break;
} }
case 'messagebox': { case 'messagebox': {
sendConsoleText(JSON.stringify(data));
// Display a message box // Display a message box
if (data.title && data.msg) if (data.title && data.msg)
{ {
@ -1095,6 +1097,7 @@ function handleServerCommand(data) {
ipr.title = data.title; ipr.title = data.title;
ipr.message = data.msg; ipr.message = data.msg;
ipr.username = data.username; ipr.username = data.username;
if (data.realname && (data.realname != '')) { ipr.username = data.realname; }
global._clientmessage = ipr.then(function (img) global._clientmessage = ipr.then(function (img)
{ {
this.messagebox = require('win-dialog').create(this.title, this.message, this.username, { timeout: 120000, b64Image: img.split(',').pop(), background: color_options.background, foreground: color_options.foreground }); this.messagebox = require('win-dialog').create(this.title, this.message, this.username, { timeout: 120000, b64Image: img.split(',').pop(), background: color_options.background, foreground: color_options.foreground });

View File

@ -302,7 +302,6 @@
"mobileSite": { "type": "boolean", "default": true, "description": "When set to false, this setting will disable the mobile site." }, "mobileSite": { "type": "boolean", "default": true, "description": "When set to false, this setting will disable the mobile site." },
"unknownUserRootRedirect": { "type": "string", "default": null, "description": "Redirects HTTP root requests to this URL only where user is not already logged in. When in use, direct users to /login to see the normal login page." }, "unknownUserRootRedirect": { "type": "string", "default": null, "description": "Redirects HTTP root requests to this URL only where user is not already logged in. When in use, direct users to /login to see the normal login page." },
"nightMode": { "type": "integer", "default": 0, "description": "0 = User selects day/night mode, 1 = Always night mode, 2 = Always day mode" }, "nightMode": { "type": "integer", "default": 0, "description": "0 = User selects day/night mode, 1 = Always night mode, 2 = Always day mode" },
"agentInviteImagePreview": { "type": "string", "default": "images/winagent.png", "description": "The filename of a image file in .png format located in Meshcentral-Data to display in the MeshCentral Agent invitation page, image should be 549x393 but can be larger." },
"userQuota": { "type": "integer" }, "userQuota": { "type": "integer" },
"meshQuota": { "type": "integer" }, "meshQuota": { "type": "integer" },
"loginKey": { "type": [ "string", "array" ], "items": { "type": "string" }, "default": null, "description": "Requires that users add the value ?key=xxx in the URL in order to see the web site." }, "loginKey": { "type": [ "string", "array" ], "items": { "type": "string" }, "default": null, "description": "Requires that users add the value ?key=xxx in the URL in order to see the web site." },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -92,7 +92,7 @@
<h3>Microsoft&trade; Windows 64bit</h3> <h3>Microsoft&trade; Windows 64bit</h3>
<p><a id="win64url">Download the software here</a>, run it and press "Install" or "Connect".</p> <p><a id="win64url">Download the software here</a>, run it and press "Install" or "Connect".</p>
<div style="text-align:center"> <div style="text-align:center">
<img id="agentInviteImagePreview64" class="winagent-img" src="{{{agentInviteImagePreview}}}" /> <img class="winagent-img" src="images/winagent.png" />
</div> </div>
</div> </div>
@ -100,7 +100,7 @@
<h3>Microsoft&trade; Windows 32bit</h3> <h3>Microsoft&trade; Windows 32bit</h3>
<p><a id="win32url">Download the software here</a>, run it and press "Install" or "Connect".</p> <p><a id="win32url">Download the software here</a>, run it and press "Install" or "Connect".</p>
<div style="text-align:center"> <div style="text-align:center">
<img id="agentInviteImagePreview32" class="winagent-img" src="{{{agentInviteImagePreview}}}" /> <img class="winagent-img" src="images/winagent.png" />
</div> </div>
</div> </div>

View File

@ -4049,7 +4049,7 @@
} }
} else { } else {
// If sorted by "Groups-Tags" and a device has no tags, put in a group only section. // If sorted by "Groups-Tags" and a device has no tags, put in a group only section.
if ((sort == 4) && ((node.tags == null) || (node.tags.length == 0))) { if ((sort == 4) && (mesh2 != null) && ((node.tags == null) || (node.tags.length == 0))) {
var tag = mesh2.name; var tag = mesh2.name;
var collapsed = CollapsedGroups['tag:' + encodeURIComponentEx(tag)]; var collapsed = CollapsedGroups['tag:' + encodeURIComponentEx(tag)];
var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':'')); var r2 = r.replace('**xx**xx*TaG*xx**xx**', encodeURIComponentEx(tag) + (collapsed?' style=display:none':''));

View File

@ -7504,11 +7504,6 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
xargs.min = minify ? '-min' : ''; xargs.min = minify ? '-min' : '';
xargs.titlehtml = domain.titlehtml; xargs.titlehtml = domain.titlehtml;
xargs.title = (domain.title != null) ? domain.title : 'MeshCentral'; xargs.title = (domain.title != null) ? domain.title : 'MeshCentral';
if (domain.agentinviteimagepreview == null) {
xargs.agentInviteImagePreview = 'images/winagent.png';
} else {
xargs.agentInviteImagePreview = domain.agentinviteimagepreview;
}
if ( if (
((page == 'login2') && (domain.loginpicture == null) && (domain.titlehtml == null)) || ((page == 'login2') && (domain.loginpicture == null) && (domain.titlehtml == null)) ||
((page != 'login2') && (domain.titlepicture == null) && (domain.titlehtml == null)) ((page != 'login2') && (domain.titlepicture == null) && (domain.titlehtml == null))