Files

16 lines
435 B
JavaScript

// Fetch app version
fetch('/api/version').then(r => r.json()).then(d => {
var el = document.getElementById('appVersion');
if (el && d.version) el.textContent = 'v' + d.version;
}).catch(function(){});
(function(){
if(!TOKEN){
document.getElementById('app').innerHTML = '<div class="login-wrap"><div id="content"></div></div>';
page_login(document.getElementById('content'));
} else {
nav('dashboard');
}
})();