Skip to content

Commit f5a0351

Browse files
committed
changes
1 parent 987325a commit f5a0351

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

  • services/language_translation

services/language_translation/v2.html

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -340,28 +340,23 @@
340340
$.getJSON('watson-translate/vcap/')
341341
.done(function (sids) {
342342
$('.credentials').toggle(!sids);
343-
logon = true;
343+
if ((first_launch || !models) && logon) {
344+
$('#credentials-not-found').hide();
345+
getModels();
346+
first_launch = false;
347+
} else if (models) {
348+
$('#credentials-not-found').hide();
349+
handlersUI();
350+
selectAction();
351+
} else {
352+
$('#credentials-not-found').show();
353+
}
344354
})
345355
.fail(function () {
346356
$('.credentials').show();
347357
}).always(function () {
348358
$('#credentials-check').hide();
349359
})
350-
351-
console.log(first_launch);
352-
console.log(models);
353-
console.log(logon);
354-
if ((first_launch || !models) && logon) {
355-
$('#credentials-not-found').hide();
356-
getModels();
357-
first_launch = false;
358-
} else if (models) {
359-
$('#credentials-not-found').hide();
360-
handlersUI();
361-
selectAction();
362-
} else {
363-
$('#credentials-not-found').show();
364-
}
365360
}
366361

367362
RED.nodes.registerType('watson-translate', {

0 commit comments

Comments
 (0)