File tree Expand file tree Collapse file tree
services/language_translation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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' , {
You can’t perform that action at this time.
0 commit comments