Added feature to set custom picture for AgentInvitePage for Windows Guests in config.json. In domain-section add to change picture. Else defailt will be used. "agentInviteImagePreview": "images/winagent.png",
JSuenram committed
Feb 15, 2022 at 12:45 UTC
4c0123d458300425053e97dc30e846adea8e237a
3 files changed
+8
-2
meshcentral-config-schema.json
+1
@@ -302,6 +302,7 @@
302
"mobileSite": { "type": "boolean", "default": true, "description": "When set to false, this setting will disable the mobile site." },
303
"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." },
304
"nightMode": { "type": "integer", "default": 0, "description": "0 = User selects day/night mode, 1 = Always night mode, 2 = Always day mode" },
305
+ "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." },
306
"userQuota": { "type": "integer" },
307
"meshQuota": { "type": "integer" },
308
"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." },
views/agentinvite.handlebars
+2
-2
@@ -92,7 +92,7 @@
92
<h3>Microsoft™ Windows 64bit</h3>
93
<p><a id="win64url">Download the software here</a>, run it and press "Install" or "Connect".</p>
94
<div style="text-align:center">
95
- <img class="winagent-img" src="images/winagent.png" />
95
+ <img id="agentInviteImagePreview64" class="winagent-img" src="{{{agentInviteImagePreview}}}" />
96
</div>
97
</div>
98
@@ -100,7 +100,7 @@
100
<h3>Microsoft™ Windows 32bit</h3>
101
<p><a id="win32url">Download the software here</a>, run it and press "Install" or "Connect".</p>
102
<div style="text-align:center">
103
- <img class="winagent-img" src="images/winagent.png" />
103
+ <img id="agentInviteImagePreview32" class="winagent-img" src="{{{agentInviteImagePreview}}}" />
104
</div>
105
</div>
106
webserver.js
+5
@@ -7504,6 +7504,11 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
7504
xargs.min = minify ? '-min' : '';
7505
xargs.titlehtml = domain.titlehtml;
7506
xargs.title = (domain.title != null) ? domain.title : 'MeshCentral';
7507
+ if (domain.agentinviteimagepreview == null) {
7508
+ xargs.agentInviteImagePreview = 'images/winagent.png';
7509
+ } else {
7510
+ xargs.agentInviteImagePreview = domain.agentinviteimagepreview;
7511
+ }
7512
if (
7513
((page == 'login2') && (domain.loginpicture == null) && (domain.titlehtml == null)) ||
7514
((page != 'login2') && (domain.titlepicture == null) && (domain.titlehtml == null))