Fixed web application ?hide=x feature.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-16 16:10:48 -07:00
parent 98ebbd1b63
commit e70346af04
2 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.5.1-z",
"version": "0.5.2",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -1385,6 +1385,18 @@
//if (hide & 16) { QV('page_leftbar', false); QS('page_content').left = '0px'; }
if (!footerBar) { QC('body').add('nofooter'); } else { QC('body').remove('nofooter'); }
console.log('args.hide', args.hide);
if (args.hide != 0) {
// Fix the main grid to zero-height elements we want to hide.
if (uiMode == 2) {
QS('container')['grid-template-rows'] = ((hide & 1) ? '0' : '66') + 'px fit-content(48px) auto ' + ((hide & 4) ? '0' : '45') + 'px';
QS('container')['-ms-grid-rows'] = ((hide & 1) ? '0' : '66') + 'px fit-content(48px) auto ' + ((hide & 4) ? '0' : '45') + 'px';
} else {
QS('container')['grid-template-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
QS('container')['-ms-grid-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
}
}
// Adjust height of remote desktop, files and Intel AMT
// 1 = Top bar, 2 = Tool Bar, 4 = Bottom Bar, 8 = Tab Title
var xh = (((hide & 1) ? 0 : 66) + ((hide & 2) ? 0 : 24) + ((hide & 4) ? 0 : 45) + ((hide & 8) ? 0 : 60)); // 0 to 195