Fixed web application ?hide=x feature.

Ylian Saint-Hilaire committed Apr 16, 2020 at 16:10 UTC d5092f0c814bd3e8483155915d8d5de9c7fe0655
2 files changed +13 -1
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.5.1-z",
3 + "version": "0.5.2",
4 "keywords": [
5 "Remote Management",
6 "Intel AMT",
views/default.handlebars
+12
@@ -1385,6 +1385,18 @@
1385 //if (hide & 16) { QV('page_leftbar', false); QS('page_content').left = '0px'; }
1386 if (!footerBar) { QC('body').add('nofooter'); } else { QC('body').remove('nofooter'); }
1387
1388 + console.log('args.hide', args.hide);
1389 + if (args.hide != 0) {
1390 + // Fix the main grid to zero-height elements we want to hide.
1391 + if (uiMode == 2) {
1392 + QS('container')['grid-template-rows'] = ((hide & 1) ? '0' : '66') + 'px fit-content(48px) auto ' + ((hide & 4) ? '0' : '45') + 'px';
1393 + QS('container')['-ms-grid-rows'] = ((hide & 1) ? '0' : '66') + 'px fit-content(48px) auto ' + ((hide & 4) ? '0' : '45') + 'px';
1394 + } else {
1395 + QS('container')['grid-template-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
1396 + QS('container')['-ms-grid-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
1397 + }
1398 + }
1399 +
1400 // Adjust height of remote desktop, files and Intel AMT
1401 // 1 = Top bar, 2 = Tool Bar, 4 = Bottom Bar, 8 = Tab Title
1402 var xh = (((hide & 1) ? 0 : 66) + ((hide & 2) ? 0 : 24) + ((hide & 4) ? 0 : 45) + ((hide & 8) ? 0 : 60)); // 0 to 195