@@ -14,103 +14,6 @@ import angular from 'angular'
1414 abstract : true ,
1515 data : {
1616 authRequired : false
17- } ,
18- onEnter : [ '$state' , '$location' , '$stateParams' , 'TcAuthService' , 'logger' ,
19- function ( $state , $location , $stateParams , TcAuthService , logger ) {
20- logger . debug ( 'Checking for authentication...' )
21- if ( TcAuthService . isAuthenticated ( ) ) {
22- // redirect to next if exists else dashboard
23- if ( $stateParams . next ) {
24- logger . debug ( 'Redirecting: ' + $stateParams . next )
25- window . location . href = decodeURIComponent ( $stateParams . next )
26- } else {
27- $state . go ( 'dashboard' )
28- }
29- }
30- } ]
31- } ,
32- 'login' : {
33- parent : 'auth' ,
34- url : '/login/?next&code&state&status&userJWTToken&utm_source&utm_medium&utm_campaign' ,
35- params : { 'notifyReset' : false } ,
36- data : {
37- title : 'Login'
38- } ,
39- views : {
40- 'header@' : {
41- template : require ( '../layout/header/account-header' ) ( )
42- } ,
43- 'container@' : {
44- template : require ( './login/login' ) ( ) ,
45- controller : 'LoginController' ,
46- controllerAs : 'vm'
47- } ,
48- 'footer@' : {
49- controller : 'FooterController as vm' ,
50- template : require ( '../layout/footer/account-footer' ) ( )
51- }
52- } ,
53- controller : 'LoginController'
54- } ,
55- 'register' : {
56- parent : 'auth' ,
57- url : '/register/?next&utm_source&utm_medium&utm_campaign' ,
58- data : {
59- title : 'Join'
60- } ,
61- views : {
62- 'header@' : {
63- template : require ( '../layout/header/account-header' ) ( )
64- } ,
65- 'container@' : {
66- template : require ( './register/register' ) ( ) ,
67- controller : 'RegisterController' ,
68- controllerAs : 'vm'
69- } ,
70- 'footer@' : {
71- controller : 'FooterController as vm' ,
72- template : require ( '../layout/footer/account-footer' ) ( )
73- }
74- }
75- } ,
76- 'registeredSuccessfully' : {
77- url : '/registered-successfully/' ,
78- data : {
79- title : 'Registered' ,
80- authRequired : false
81- } ,
82- views : {
83- 'header@' : {
84- template : require ( '../layout/header/account-header' ) ( )
85- } ,
86- 'container@' : {
87- template : require ( './register/registered-successfully' ) ( )
88- } ,
89- 'footer@' : {
90- controller : 'FooterController as vm' ,
91- template : require ( '../layout/footer/account-footer' ) ( )
92- }
93- }
94- } ,
95- 'resetPassword' : {
96- parent : 'auth' ,
97- url : '/reset-password/?token&handle' ,
98- data : {
99- title : 'Reset Password'
100- } ,
101- views : {
102- 'header@' : {
103- template : require ( '../layout/header/account-header' ) ( )
104- } ,
105- 'container@' : {
106- template : require ( './reset-password/reset-password' ) ( ) ,
107- controller : 'ResetPasswordController' ,
108- controllerAs : 'vm'
109- } ,
110- 'footer@' : {
111- controller : 'FooterController as vm' ,
112- template : require ( '../layout/footer/account-footer' ) ( )
113- }
11417 }
11518 } ,
11619 logout : {
0 commit comments