From 1d227a0c825f566f4e86859364a03feba88f239f Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 19 May 2021 20:31:25 -0700 Subject: [PATCH] Fix for #2662 --- public/scripts/common-0.0.1.js | 4 ++-- views/default.handlebars | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/public/scripts/common-0.0.1.js b/public/scripts/common-0.0.1.js index b9fc0b12..325f9bf2 100644 --- a/public/scripts/common-0.0.1.js +++ b/public/scripts/common-0.0.1.js @@ -9,8 +9,8 @@ if (!String.prototype.startsWith) { String.prototype.startsWith = function (str) if (!String.prototype.endsWith) { String.prototype.endsWith = function (str) { return this.indexOf(str, this.length - str.length) !== -1; }; } // Quick UI functions, a bit of a replacement for jQuery -//function Q(x) { if (document.getElementById(x) == null) { console.log('Invalid element: ' + x); } return document.getElementById(x); } // "Q" -function Q(x) { return document.getElementById(x); } // "Q" +function Q(x) { if (document.getElementById(x) == null) { console.log('Invalid element: ' + x); } return document.getElementById(x); } // "Q" +//function Q(x) { return document.getElementById(x); } // "Q" function QS(x) { try { return Q(x).style; } catch (x) { } } // "Q" style function QE(x, y) { try { Q(x).disabled = !y; } catch (x) { } } // "Q" enable function QV(x, y) { try { QS(x).display = (y ? '' : 'none'); } catch (x) { } } // "Q" visible diff --git a/views/default.handlebars b/views/default.handlebars index 3c954718..85c3771d 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -6915,12 +6915,12 @@ if ((rights != 0xFFFFFFFF) && ((rights & 0x700) != 0)) { allFeatures = ''; } var y = ''; - if (currentNode.agent.caps & 1) { y += (deskFull + ''); } // Agent is desktop capable - if (currentNode.agent.caps & 2) { y += fullTerm; } // Agent is terminal capable - if (currentNode.agent.caps & 4) { y += fullFiles; } // Agent is files capable - if (currentNode.agent.caps & 5) { y += deskFiles; } // Agent is desktop + files capable - if (currentNode.agent.caps & 6) { y += termFiles; } // Agent is terminal + files capable - if (currentNode.agent.caps & 7) { y += allFeatures; } // Agent is desktop + terminal + files capable + if ((currentNode.agent.caps & 1) == 1) { y += (deskFull + ''); } // Agent is desktop capable + if ((currentNode.agent.caps & 2) == 2) { y += fullTerm; } // Agent is terminal capable + if ((currentNode.agent.caps & 4) == 4) { y += fullFiles; } // Agent is files capable + if ((currentNode.agent.caps & 5) == 5) { y += deskFiles; } // Agent is desktop + files capable + if ((currentNode.agent.caps & 6) == 6) { y += termFiles; } // Agent is terminal + files capable + if ((currentNode.agent.caps & 7) == 7) { y += allFeatures; } // Agent is desktop + terminal + files capable x += addHtmlValue("Type", ''); var options = { 1 : "1 minute", 5 : "5 minutes", 10 : "10 minutes", 15 : "15 minutes", 30 : "30 minutes", 45 : "45 minutes", 60 : "60 minutes", 120 : "2 hours", 240 : "4 hours", 480 : "8 hours", 720 : "12 hours", 960 : "16 hours", 1440 : "24 hours", 2880 : "2 days", 5760 : "4 days" } @@ -6956,15 +6956,15 @@ if (q & 1) { consent |= 0x0002; // Terminal notify - if (Q('d2userConsent').value == 1) { consent |= 0x0010; } // Terminal prompt for user consent + if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0010; } // Terminal prompt for user consent } if (q & 2) { consent |= 0x0041; // Desktop connection toolbar + Desktop notify - if (Q('d2userConsent').value == 1) { consent |= 0x0008; } // Desktop prompt for user consent + if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0008; } // Desktop prompt for user consent } if (q & 4) { consent |= 0x0004; // Files notify - if (Q('d2userConsent').value == 1) { consent |= 0x0020; } // Files prompt for user consent + if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0020; } // Files prompt for user consent } if (Q('d2timeRange').value == 0) {