if the client on the server is already connected skip the connection manager
This commit is contained in:
parent
0f44b06197
commit
d5b7616f98
|
@ -26,6 +26,18 @@ Deluge.Connections = {
|
|||
Deluge.Events.fire('disconnect');
|
||||
},
|
||||
|
||||
loginShow: function() {
|
||||
Deluge.Client.web.connected({
|
||||
onSuccess: function(connected) {
|
||||
if (connected) {
|
||||
Deluge.Events.fire('connect');
|
||||
} else {
|
||||
Deluge.Connections.Window.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onAdd: function(button, e) {
|
||||
//Deluge.Connections.Add.show();
|
||||
},
|
||||
|
@ -91,9 +103,10 @@ Deluge.Connections = {
|
|||
});
|
||||
},
|
||||
|
||||
runCheck: function() {
|
||||
runCheck: function(callback) {
|
||||
callback = $pick(callback, Deluge.Connections.onGetHosts);
|
||||
Deluge.Client.web.get_hosts({
|
||||
onSuccess: Deluge.Connections.onGetHosts
|
||||
onSuccess: callback
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ Deluge.Login = {
|
|||
onSuccess: function(result) {
|
||||
if (result == true) {
|
||||
Deluge.Login.Window.hide();
|
||||
Deluge.Connections.Window.show();
|
||||
Deluge.Connections.loginShow();
|
||||
passwordField.setRawValue('');
|
||||
Deluge.Events.fire('login')
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue