mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:36:38 +02:00
make sure button disabling is consistent on refresh
This commit is contained in:
parent
cf4b6cb2cf
commit
807fb2bee1
2 changed files with 10 additions and 11 deletions
|
@ -35,22 +35,20 @@ $(function() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (sendingProcess.name == "domain-server") {
|
||||
toggleManageButton(settingsButton,
|
||||
sendingProcess.state == HFProcess.ProcessStates.STARTED);
|
||||
}
|
||||
|
||||
switch (sendingProcess.state) {
|
||||
case HFProcess.ProcessStates.STOPPED:
|
||||
processCircle.attr('class', 'circle stopped');
|
||||
break;
|
||||
case HFProcess.ProcessStates.STOPPING:
|
||||
if (sendingProcess.name == "domain-server") {
|
||||
console.log("STOPPING DS");
|
||||
toggleManageButton(settingsButton, false);
|
||||
}
|
||||
|
||||
processCircle.attr('class', 'circle stopping');
|
||||
break;
|
||||
case HFProcess.ProcessStates.STARTED:
|
||||
if (sendingProcess.name == "domain-server") {
|
||||
toggleManageButton(settingsButton, true);
|
||||
}
|
||||
|
||||
|
||||
processCircle.attr('class', 'circle started');
|
||||
break;
|
||||
|
@ -63,7 +61,6 @@ $(function() {
|
|||
|
||||
switch (sendingGroup.state) {
|
||||
case HFProcess.ProcessGroupStates.STOPPED:
|
||||
break;
|
||||
case HFProcess.ProcessGroupStates.STOPPING:
|
||||
// if the process group is stopping, the stop button should be disabled
|
||||
toggleManageButton(stopButton, false);
|
||||
|
|
|
@ -136,9 +136,9 @@ app.on('ready', function() {
|
|||
}
|
||||
};
|
||||
|
||||
function sendProcessGroupUpdate(process) {
|
||||
function sendProcessGroupUpdate(processGroup) {
|
||||
if (mainWindow) {
|
||||
mainWindow.webContents.send('process-group-update', process);
|
||||
mainWindow.webContents.send('process-group-update', processGroup);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,6 +175,8 @@ app.on('ready', function() {
|
|||
for (let process of homeServer.processes) {
|
||||
sendProcessUpdate(process);
|
||||
}
|
||||
|
||||
sendProcessGroupUpdate(homeServer);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue