Add config button to launcher

This commit is contained in:
Andrew Gutekanst
2020-02-26 00:40:04 -05:00
parent 1d49e279e3
commit 29482521e2
2 changed files with 10 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ function checkAuthResult() {
var loginResult = window.external.getLastAuthResult();
console.log('|' + loginResult + '|');
if(loginResult == "AUTH_PROGRESS") {
setTimeout(checkAuthResult, 1500);
setTimeout(checkAuthResult, 500);
} else if (loginResult == "AUTH_SUCCESS") {
window.location.href = 'charsel.html'
} else {
@@ -18,7 +18,6 @@ function checkAuthResult() {
}
$(function() {
// Login form submission.
$("#loginform").submit(function(e){
e.preventDefault();
@@ -35,4 +34,12 @@ $(function() {
checkAuthResult();
});
// Config button.
$("#configButton").click(function(){
try{
window.external.openMhlConfig();
} catch(e){
createErrorAlert("Error on openMhlConfig: " + e);
}
});
});

View File

@@ -57,6 +57,7 @@
<input type="password" class="form-control" id="password" placeholder="Password">
</div>
<button id="submitButton" type="submit" class="btn btn-primary">Submit</button>
<button id="configButton" class="btn btn-secondary">Config</button>
</form>
</div>
</div>