File tree 4 files changed +34
-16
lines changed
4 files changed +34
-16
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import GLForm from './gl_form';
23
23
import Shortcuts from './shortcuts' ;
24
24
import ShortcutsNavigation from './shortcuts_navigation' ;
25
25
import ShortcutsIssuable from './shortcuts_issuable' ;
26
- import U2FAuthenticate from './u2f/authenticate' ;
27
26
import Diff from './diff' ;
28
27
import SearchAutocomplete from './search_autocomplete' ;
29
28
import Activities from './activities' ;
@@ -537,18 +536,15 @@ import Activities from './activities';
537
536
}
538
537
switch ( path [ 0 ] ) {
539
538
case 'sessions' :
539
+ import ( './pages/sessions' )
540
+ . then ( callDefault )
541
+ . catch ( fail ) ;
542
+ break ;
540
543
case 'omniauth_callbacks' :
541
- if ( ! gon . u2f ) break ;
542
- const u2fAuthenticate = new U2FAuthenticate (
543
- $ ( '#js-authenticate-u2f' ) ,
544
- '#js-login-u2f-form' ,
545
- gon . u2f ,
546
- document . querySelector ( '#js-login-2fa-device' ) ,
547
- document . querySelector ( '.js-2fa-form' ) ,
548
- ) ;
549
- u2fAuthenticate . start ( ) ;
550
- // needed in rspec
551
- gl . u2fAuthenticate = u2fAuthenticate ;
544
+ import ( './pages/omniauth_callbacks' )
545
+ . then ( callDefault )
546
+ . catch ( fail ) ;
547
+ break ;
552
548
case 'admin' :
553
549
import ( './pages/admin' )
554
550
. then ( callDefault )
@@ -598,10 +594,6 @@ import Activities from './activities';
598
594
break ;
599
595
}
600
596
break ;
601
- case 'dashboard' :
602
- case 'root' :
603
- new UserCallout ( ) ;
604
- break ;
605
597
case 'profiles' :
606
598
import ( './pages/profiles/index/' )
607
599
. then ( callDefault )
Original file line number Diff line number Diff line change
1
+ import initU2F from '../../shared/sessions/u2f' ;
2
+
3
+ export default ( ) => {
4
+ initU2F ( ) ;
5
+ } ;
Original file line number Diff line number Diff line change
1
+ import initU2F from '../../shared/sessions/u2f' ;
2
+
3
+ export default ( ) => {
4
+ initU2F ( ) ;
5
+ } ;
Original file line number Diff line number Diff line change
1
+ import U2FAuthenticate from '../../u2f/authenticate' ;
2
+
3
+ export default ( ) => {
4
+ if ( ! gon . u2f ) return ;
5
+
6
+ const u2fAuthenticate = new U2FAuthenticate (
7
+ $ ( '#js-authenticate-u2f' ) ,
8
+ '#js-login-u2f-form' ,
9
+ gon . u2f ,
10
+ document . querySelector ( '#js-login-2fa-device' ) ,
11
+ document . querySelector ( '.js-2fa-form' ) ,
12
+ ) ;
13
+ u2fAuthenticate . start ( ) ;
14
+ // needed in rspec
15
+ gl . u2fAuthenticate = u2fAuthenticate ;
16
+ } ;
You can’t perform that action at this time.
0 commit comments