Fix for #2662
Ylian Saint-Hilaire committed
May 19, 2021 at 20:31 UTC
1d227a0c825f566f4e86859364a03feba88f239f
2 files changed
+11
-11
public/scripts/common-0.0.1.js
+2
-2
@@ -9,8 +9,8 @@ if (!String.prototype.startsWith) { String.prototype.startsWith = function (str)
9
if (!String.prototype.endsWith) { String.prototype.endsWith = function (str) { return this.indexOf(str, this.length - str.length) !== -1; }; }
10
11
// Quick UI functions, a bit of a replacement for jQuery
12
-//function Q(x) { if (document.getElementById(x) == null) { console.log('Invalid element: ' + x); } return document.getElementById(x); } // "Q"
13
-function Q(x) { return document.getElementById(x); } // "Q"
12
+function Q(x) { if (document.getElementById(x) == null) { console.log('Invalid element: ' + x); } return document.getElementById(x); } // "Q"
13
+//function Q(x) { return document.getElementById(x); } // "Q"
14
function QS(x) { try { return Q(x).style; } catch (x) { } } // "Q" style
15
function QE(x, y) { try { Q(x).disabled = !y; } catch (x) { } } // "Q" enable
16
function QV(x, y) { try { QS(x).display = (y ? '' : 'none'); } catch (x) { } } // "Q" visible
views/default.handlebars
+9
-9
@@ -6915,12 +6915,12 @@
6915
if ((rights != 0xFFFFFFFF) && ((rights & 0x700) != 0)) { allFeatures = ''; }
6916
6917
var y = '';
6918
- if (currentNode.agent.caps & 1) { y += (deskFull + '<option value=3>' + "Desktop, View only" + '</option>'); } // Agent is desktop capable
6919
- if (currentNode.agent.caps & 2) { y += fullTerm; } // Agent is terminal capable
6920
- if (currentNode.agent.caps & 4) { y += fullFiles; } // Agent is files capable
6921
- if (currentNode.agent.caps & 5) { y += deskFiles; } // Agent is desktop + files capable
6922
- if (currentNode.agent.caps & 6) { y += termFiles; } // Agent is terminal + files capable
6923
- if (currentNode.agent.caps & 7) { y += allFeatures; } // Agent is desktop + terminal + files capable
6918
+ if ((currentNode.agent.caps & 1) == 1) { y += (deskFull + '<option value=3>' + "Desktop, View only" + '</option>'); } // Agent is desktop capable
6919
+ if ((currentNode.agent.caps & 2) == 2) { y += fullTerm; } // Agent is terminal capable
6920
+ if ((currentNode.agent.caps & 4) == 4) { y += fullFiles; } // Agent is files capable
6921
+ if ((currentNode.agent.caps & 5) == 5) { y += deskFiles; } // Agent is desktop + files capable
6922
+ if ((currentNode.agent.caps & 6) == 6) { y += termFiles; } // Agent is terminal + files capable
6923
+ if ((currentNode.agent.caps & 7) == 7) { y += allFeatures; } // Agent is desktop + terminal + files capable
6924
6925
x += addHtmlValue("Type", '<select id=d2shareType style=float:right;width:250px onchange=showShareDeviceValidate()>' + y + '</select>');
6926
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 @@
6956
6957
if (q & 1) {
6958
consent |= 0x0002; // Terminal notify
6959
- if (Q('d2userConsent').value == 1) { consent |= 0x0010; } // Terminal prompt for user consent
6959
+ if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0010; } // Terminal prompt for user consent
6960
}
6961
if (q & 2) {
6962
consent |= 0x0041; // Desktop connection toolbar + Desktop notify
6963
- if (Q('d2userConsent').value == 1) { consent |= 0x0008; } // Desktop prompt for user consent
6963
+ if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0008; } // Desktop prompt for user consent
6964
}
6965
if (q & 4) {
6966
consent |= 0x0004; // Files notify
6967
- if (Q('d2userConsent').value == 1) { consent |= 0x0020; } // Files prompt for user consent
6967
+ if ((currentNode.agent.caps & 1) && (Q('d2userConsent').value == 1)) { consent |= 0x0020; } // Files prompt for user consent
6968
}
6969
6970
if (Q('d2timeRange').value == 0) {