1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Web application with updated CSS.

This commit is contained in:
Ylian Saint-Hilaire 2019-04-22 15:38:47 -07:00
parent fcb78cd90e
commit 56c91bea2e
9 changed files with 1874 additions and 1165 deletions

View file

@ -11,18 +11,23 @@
<script keeplink=1 type="text/javascript" src="scripts/u2f-api.js"></script>
<title>{{{title}}} - Login</title>
</head>
<body id="body" onload="if (typeof(startup) !== 'undefined') startup();" class="arg_hide">
<body id="body" onload="if (typeof(startup) !== 'undefined') startup();" class="arg_hide login">
<div id=container>
<div id=mastheadx></div>
<div id=masthead>
<div class="title">{{{title}}}</div>
<div class="title2">{{{title2}}}</div>
</div>
<div id=page_content>
<div id=topbar class="noselect style3">
<div id=toggle title="Toggle full width" onclick="toggleFullScreen(1)">&harr;</div>
<div id=topbar class="noselect style3" style="height:24px">
<div id=uiMenuButton title="User interface selection" onclick="showUserInterfaceSelectMenu()">
&diams;
<div id=uiMenu style="display:none">
<div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class="uiSelector1"></div></div>
<div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class="uiSelector2"></div></div>
<div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class="uiSelector3"></div></div>
</div>
</div>
</div>
<div id=column_l style="height:calc(100vh - 111px)">
<div id=column_l>
<h1>Welcome</h1>
<div id="welcomeText" style="display:none">Connect to your home or office devices from anywhere in the world using <a href="http://www.meshcommander.com/meshcentral2">MeshCentral</a>, the real time, open source remote monitoring and management web site. You will need to download and install a management agent on your computers. Once installed, computers will show up in the &quot;My Devices&quot; section of this web site and you will be able to monitor them and take control of them.</div>
<table id="centralTable" style="">
@ -216,7 +221,7 @@
&nbsp;<a href=terms>Terms &amp; Privacy</a>
</div>
</div>
</div>
</div>
<div id=dialog style="display:none">
<div id=dialogHeader>
@ -247,12 +252,14 @@
if (passRequirements != "") { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); } else { passRequirements = {}; }
var passRequirementsEx = ((passRequirements.min != null) || (passRequirements.max != null) || (passRequirements.upper != null) || (passRequirements.lower != null) || (passRequirements.numeric != null) || (passRequirements.nonalpha != null));
var features = parseInt('{{{features}}}');
var webPageFullScreen = getstore('webPageFullScreen', true);
if (webPageFullScreen == 'false') { webPageFullScreen = false; }
if (webPageFullScreen == 'true') { webPageFullScreen = true; }
var welcomeText = decodeURIComponent("{{{welcometext}}}");
var currentpanel = 0;
toggleFullScreen();
var uiMode = parseInt(getstore('uiMode', 1));
var webPageFullScreen = true;
//var webPageFullScreen = getstore('webPageFullScreen', true);
//if (webPageFullScreen == 'false') { webPageFullScreen = false; }
//if (webPageFullScreen == 'true') { webPageFullScreen = true; }
//toggleFullScreen();
function startup() {
if ((features & 32) == 0) {
@ -360,6 +367,9 @@
}, hardwareKeyChallenge.timeoutSeconds);
}
}
// Setup the user interface in the right mode
userInterfaceSelectMenu();
}
function showPassHint() {
@ -616,7 +626,7 @@
// Toggle the web page to full screen
function toggleFullScreen(toggle) {
if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
//if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
if (webPageFullScreen == false) {
// By adding body class, it will change a style of all ellements using CSS selector
// No need for JS anymore and it will be consistent style for all the templates.
@ -628,6 +638,23 @@
center();
}
// Toggle user interface menu
function showUserInterfaceSelectMenu() {
Q('uiViewButton1').classList.remove('uiSelectorSel');
Q('uiViewButton2').classList.remove('uiSelectorSel');
Q('uiViewButton3').classList.remove('uiSelectorSel');
try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
QV('uiMenu', (QS('uiMenu').display == 'none'));
}
function userInterfaceSelectMenu(s) {
if (s) { uiMode = s; putstore('uiMode', uiMode); }
webPageFullScreen = (uiMode < 3);
//webPageStackMenu = (uiMode > 1);
toggleFullScreen(0);
//toggleStackMenu(0);
}
function center() {
/* Now we use CSS media to achive the same effect as deleted JS */