Skip to content

Commit

Permalink
prevent starting LCU connector without pushed ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmichels committed Jul 2, 2020
1 parent a9f16c2 commit afc4cbc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions electron/src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ readConfig = () => {
accept_timing=file.data.timing;
if(!id){
$('#message').html('Please set your pushed ID in the config menu');
$('#hook-btn').prop('disabled',true);
}
else{
$('#message').html('After the client instance is found, feel free to minimize this window. You will be notified when your game is ready.');
$('#hook-btn').prop('disabled',false);
}
}

Expand Down Expand Up @@ -209,9 +211,10 @@ $('#config-btn').click(function () { //show configuration options
})
win.on('closed', () => {
win = null; //cannot use main window when config window is open
main.setEnabled(true);
main.focus();
readConfig(); //update global variables when window is closed
main.setEnabled(true); //refocus main window
main.focus();

})
win.loadURL(`file://${__dirname}/config.html`);

Expand Down

0 comments on commit afc4cbc

Please sign in to comment.