mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 22:25:52 -05:00
Added consent prompt to device group UI.
This commit is contained in:
parent
c25658f5f0
commit
fb5bfc99bd
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.3.4-q",
|
||||
"version": "0.3.4-r",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
File diff suppressed because one or more lines are too long
@ -6055,9 +6055,9 @@
|
||||
var consent = 0;
|
||||
if (currentMesh.consent) { consent = currentMesh.consent; }
|
||||
if (serverinfo.consent) { consent |= serverinfo.consent; }
|
||||
if (consent & 1) { meshFeatures.push('Desktop Notify'); }
|
||||
if (consent & 2) { meshFeatures.push('Terminal Notify'); }
|
||||
if (consent & 4) { meshFeatures.push('Files Notify'); }
|
||||
if (consent & 0x0008) { meshFeatures.push('Desktop Prompt'); } else { if (consent & 0x0001) { meshFeatures.push('Desktop Notify'); } }
|
||||
if (consent & 0x0010) { meshFeatures.push('Terminal Prompt'); } else { if (consent & 0x0002) { meshFeatures.push('Terminal Notify'); } }
|
||||
if (consent & 0x0020) { meshFeatures.push('Files Prompt'); } else { if (consent & 0x0004) { meshFeatures.push('Files Notify'); } }
|
||||
//if ((consent & 7) == 7) { meshFeatures.push('Always Notify'); } else if ((currentMesh.consent & 7) != 0) { meshFeatures.push('Notify Sometimes'); }
|
||||
//if ((consent & 56) == 56) { meshFeatures.push('Always Blink Border'); } else if ((currentMesh.consent & 56) != 0) { meshFeatures.push('Blick Border Sometimes'); }
|
||||
|
||||
@ -6228,33 +6228,39 @@
|
||||
if (xxdialogMode) return;
|
||||
var x = '', consent = (currentMesh.consent) ? currentMesh.consent : 0;
|
||||
x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px"><b>Desktop</b></div>';
|
||||
x += "<div><input type=checkbox id=d20flag1 " + ((consent & 0x0001) ? 'checked' : '') + ">Notify User</div>";
|
||||
//x += "<div><input type=checkbox id=d20flag2 " + ((consent & 0x0008) ? 'checked' : '') + ">Blinking Border</div>";
|
||||
x += "<div><input type=checkbox id=d20flag1 " + ((consent & 0x0001) ? 'checked' : '') + ">Notify user</div>";
|
||||
x += "<div><input type=checkbox id=d20flag2 " + ((consent & 0x0008) ? 'checked' : '') + ">Prompt for user consent</div>";
|
||||
x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px;margin-top:8px"><b>Terminal</b></div>';
|
||||
x += "<div><input type=checkbox id=d20flag3 " + ((consent & 0x0002) ? 'checked' : '') + ">Notify User</div>";
|
||||
//x += "<div><input type=checkbox id=d20flag4 " + ((consent & 0x0010) ? 'checked' : '') + ">Blinking Border</div>";
|
||||
x += "<div><input type=checkbox id=d20flag3 " + ((consent & 0x0002) ? 'checked' : '') + ">Notify user</div>";
|
||||
x += "<div><input type=checkbox id=d20flag4 " + ((consent & 0x0010) ? 'checked' : '') + ">Prompt for user consent</div>";
|
||||
x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px;margin-top:8px"><b>Files</b></div>';
|
||||
x += "<div><input type=checkbox id=d20flag5 " + ((consent & 0x0004) ? 'checked' : '') + ">Notify User</div>";
|
||||
//x += "<div><input type=checkbox id=d20flag6 " + ((consent & 0x0020) ? 'checked' : '') + ">Blinking Border</div>";
|
||||
x += "<div><input type=checkbox id=d20flag5 " + ((consent & 0x0004) ? 'checked' : '') + ">Notify user</div>";
|
||||
x += "<div><input type=checkbox id=d20flag6 " + ((consent & 0x0020) ? 'checked' : '') + ">Prompt for user consent</div>";
|
||||
setDialogMode(2, "Edit Device Group User Consent", 3, p20editmeshconsentEx, x);
|
||||
if (serverinfo.consent) {
|
||||
if (serverinfo.consent & 1) { Q('d20flag1').checked = true; }
|
||||
if (serverinfo.consent & 2) { Q('d20flag3').checked = true; }
|
||||
if (serverinfo.consent & 4) { Q('d20flag5').checked = true; }
|
||||
QE('d20flag1', !(serverinfo.consent & 1));
|
||||
QE('d20flag3', !(serverinfo.consent & 2));
|
||||
QE('d20flag5', !(serverinfo.consent & 4));
|
||||
if (serverinfo.consent & 0x0001) { Q('d20flag1').checked = true; }
|
||||
if (serverinfo.consent & 0x0008) { Q('d20flag2').checked = true; }
|
||||
if (serverinfo.consent & 0x0002) { Q('d20flag3').checked = true; }
|
||||
if (serverinfo.consent & 0x0010) { Q('d20flag4').checked = true; }
|
||||
if (serverinfo.consent & 0x0004) { Q('d20flag5').checked = true; }
|
||||
if (serverinfo.consent & 0x0020) { Q('d20flag6').checked = true; }
|
||||
QE('d20flag1', !(serverinfo.consent & 0x0001));
|
||||
QE('d20flag2', !(serverinfo.consent & 0x0008));
|
||||
QE('d20flag3', !(serverinfo.consent & 0x0002));
|
||||
QE('d20flag4', !(serverinfo.consent & 0x0010));
|
||||
QE('d20flag5', !(serverinfo.consent & 0x0004));
|
||||
QE('d20flag6', !(serverinfo.consent & 0x0020));
|
||||
}
|
||||
}
|
||||
|
||||
function p20editmeshconsentEx() {
|
||||
var consent = 0;
|
||||
if (Q('d20flag1').checked) { consent += 0x0001; }
|
||||
//if (Q('d20flag2').checked) { consent += 0x0008; }
|
||||
if (Q('d20flag2').checked) { consent += 0x0008; }
|
||||
if (Q('d20flag3').checked) { consent += 0x0002; }
|
||||
//if (Q('d20flag4').checked) { consent += 0x0010; }
|
||||
if (Q('d20flag4').checked) { consent += 0x0010; }
|
||||
if (Q('d20flag5').checked) { consent += 0x0004; }
|
||||
//if (Q('d20flag6').checked) { consent += 0x0020; }
|
||||
if (Q('d20flag6').checked) { consent += 0x0020; }
|
||||
meshserver.send({ action: 'editmesh', meshid: currentMesh._id, consent: consent });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user