This commit is contained in:
crusader
2018-05-28 14:41:56 +09:00
parent 2cce12ea37
commit 869fcf4e72
95 changed files with 2224 additions and 78 deletions

View File

@@ -3,7 +3,8 @@ import {
CanActivate,
CanActivateChild,
ActivatedRouteSnapshot,
RouterStateSnapshot
RouterStateSnapshot,
Router,
} from '@angular/router';
import { Store } from '@ngrx/store';
@@ -20,6 +21,7 @@ import { AuthSelector } from '@overflow/member/store';
export class AuthGuard implements CanActivate, CanActivateChild {
constructor(
private store: Store<AuthStore.State>,
private router: Router,
private cookieService: CookieService,
) { }
@@ -31,7 +33,8 @@ export class AuthGuard implements CanActivate, CanActivateChild {
if (this.cookieService.check('authToken')) {
this.store.dispatch(new AuthStore.SigninCookie({authToken: this.cookieService.get('authToken'), returnURL: state.url}));
} else {
this.store.dispatch(new AuthStore.SigninRedirect(state.url));
// this.store.dispatch(new AuthStore.SigninRedirect(state.url));
this.router.navigateByUrl(state.url);
}
return false;
}

View File

@@ -1 +1,8 @@
<of-member-signin></of-member-signin>
<div class="ui-g">
<div class="ui-g-12 ui-md-9 ui-lg-7">
<of-member-signin-container></of-member-signin-container>
</div>
<div class="ui-g-12 ui-md-3 ui-lg-5 login-descript">
<of-site-banner-container></of-site-banner-container>
</div>
</div>

View File

@@ -1 +1 @@
<of-noauth-list-container></of-noauth-list-container>
<of-noauth-probe-list-container></of-noauth-probe-list-container>