show a blank state when goind directly to the page without params

This commit is contained in:
Yann Esposito (Yogsototh) 2018-02-21 17:49:20 +01:00
parent 257d130245
commit c7bbf43f10
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -78,10 +78,16 @@
if (params.error) {
authstatus = "REFUSED: " + params.error;
$('#authorization_status').addClass('refused');
$('#oncode').hide();
$('#oncode').hide();
} else {
authstatus = "AUTHORIZED" ;
$('#authorization_status').addClass('authorized');
if (params.code) {
authstatus = "AUTHORIZED" ;
$('#authorization_status').addClass('authorized');
} else {
authstatus = "UNKNOWN" ;
$('#oncode').hide();
$('#state-param').html("No state");
}
}
$('#authorization_status').html( authstatus );
$('#state-param').html(params.state);