mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-22 15:39:34 +00:00
refactor(konsole) create spawn: on auth always -> on auth, only when auth enabled
This commit is contained in:
parent
8c1f3ad99e
commit
e9f5d257f1
1 changed files with 6 additions and 5 deletions
|
|
@ -51,16 +51,17 @@
|
|||
var prefix = getPrefix();
|
||||
|
||||
Console(Element, prefix, function(spawn) {
|
||||
spawn.on('auth', function() {
|
||||
Dialog.alert(TITLE, 'Wrong credentials!');
|
||||
});
|
||||
|
||||
DOM.Files.get('config', function(error, config) {
|
||||
if (error)
|
||||
return Dialog.alert(TITLE, error);
|
||||
|
||||
if (config.auth)
|
||||
if (config.auth) {
|
||||
spawn.emit('auth', config.username, config.password);
|
||||
|
||||
spawn.on('auth', function() {
|
||||
Dialog.alert(TITLE, 'Wrong credentials!');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Util.exec(callback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue