diff --git a/check_session.php b/check_session.php new file mode 100644 index 0000000..6d3ca5e --- /dev/null +++ b/check_session.php @@ -0,0 +1,8 @@ + diff --git a/common.js b/common.js index 5fcbf41..c326c88 100644 --- a/common.js +++ b/common.js @@ -523,8 +523,21 @@ function get_version() { }); } +function check_session() { + var url = 'check_session.php'; + jQuery.get(url, function(data) { + console.log('check_session: '+data); + if (data=="") { + document.location='signin.html'; + exit; + } + }); +} + jQuery(document).ready(function(){ + check_session(); + get_version(); get_repositories(); get_deployments(); diff --git a/install.js b/install.js index 985c812..9aa94a3 100644 --- a/install.js +++ b/install.js @@ -67,6 +67,11 @@ function redirectToManage() { window.location.href = 'manage.html?t='+Date.now(); } +function redirectToAuth() { + setProgress(100); + window.location.href = 'signin.html?t='+Date.now(); +} + function start_system() { var url = 'scan.php?op=system'; $.get(url, function(data){ @@ -94,6 +99,11 @@ function check_system() { setProgress(80); setTimeout(redirectToManage, 3000); } + else if (data=='AUTH') { + $("#info").html('Previous install has found... Please sign in.'); + setProgress(80); + setTimeout(redirectToAuth, 3000); + } else if (data=='WAIT') { setTimeout(check_system, 1000); } diff --git a/manage.html b/manage.html index 81f6eaf..d794719 100644 --- a/manage.html +++ b/manage.html @@ -89,7 +89,7 @@ document.addEventListener('DOMContentLoaded', function() { - updateActive(); + updateActive(); const myAppsBtn = document.getElementById('myAppsBtn'); const installAppsBtn = document.getElementById('installAppsBtn'); @@ -409,6 +409,6 @@ - + diff --git a/scan.html b/scan.html index 03746c6..ad6bc07 100644 --- a/scan.html +++ b/scan.html @@ -39,7 +39,7 @@ - + + + + + + diff --git a/signin.php b/signin.php new file mode 100644 index 0000000..57d5259 --- /dev/null +++ b/signin.php @@ -0,0 +1,27 @@ +