menu name added
This commit is contained in:
parent
5028241843
commit
c1a5179bfc
|
@ -3,7 +3,8 @@ import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
|
||||||
import { AuthGuard } from './commons/guard/auth.guard';
|
import { AuthGuard } from './commons/guard/auth.guard';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', loadChildren: './pages/pages.module#PagesModule', canActivate: [AuthGuard] },
|
// { path: '', loadChildren: './pages/pages.module#PagesModule', canActivate: [AuthGuard] },
|
||||||
|
{ path: '', loadChildren: './pages/pages.module#PagesModule' },
|
||||||
{ path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' },
|
{ path: 'auth', loadChildren: './pages/auth/auth-page.module#AuthPageModule' },
|
||||||
{ path: 'errors', loadChildren: './pages/errors/errors-page.module#ErrorsPageModule' },
|
{ path: 'errors', loadChildren: './pages/errors/errors-page.module#ErrorsPageModule' },
|
||||||
// { path: '**', redirectTo: 'errors/404' }
|
// { path: '**', redirectTo: 'errors/404' }
|
||||||
|
|
|
@ -8,8 +8,10 @@ import {
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
import 'rxjs/add/operator/catch';
|
||||||
import 'rxjs/add/operator/take';
|
import 'rxjs/add/operator/take';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
|
import { of } from 'rxjs/observable/of';
|
||||||
|
|
||||||
import * as AuthStore from 'packages/member/store/auth';
|
import * as AuthStore from 'packages/member/store/auth';
|
||||||
import { AuthSelector } from 'packages/member/store';
|
import { AuthSelector } from 'packages/member/store';
|
||||||
|
@ -45,6 +47,10 @@ export class AuthGuard implements CanActivate, CanActivateChild {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.store.dispatch(new AuthStore.SigninRedirect(state.url));
|
||||||
|
return of(false);
|
||||||
|
})
|
||||||
.take(1);
|
.take(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
import { PagesComponent } from './pages.component';
|
import { PagesComponent } from './pages.component';
|
||||||
|
import {AuthGuard} from '../commons/guard/auth.guard';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { NotificationModule } from 'packages/notification/notification.module';
|
||||||
import {
|
import {
|
||||||
LocalizationModule,
|
LocalizationModule,
|
||||||
} from 'angular-l10n';
|
} from 'angular-l10n';
|
||||||
|
import {MemberModule} from '../../packages/member/member.module';
|
||||||
|
|
||||||
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
||||||
suppressScrollX: true
|
suppressScrollX: true
|
||||||
|
@ -32,6 +33,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
||||||
PerfectScrollbarModule,
|
PerfectScrollbarModule,
|
||||||
NotificationModule,
|
NotificationModule,
|
||||||
LocalizationModule,
|
LocalizationModule,
|
||||||
|
MemberModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
PagesComponent,
|
PagesComponent,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
restBaseURL: 'http://127.0.0.1:19080',
|
restBaseURL: 'http://192.168.1.103:19080',
|
||||||
webappRPCConfig: {
|
webappRPCConfig: {
|
||||||
url: 'ws://192.168.1.101:19090/webapp',
|
url: 'ws://192.168.1.101:19090/webapp',
|
||||||
reconnectInterval: 5000,
|
reconnectInterval: 5000,
|
||||||
|
|
10
src/packages/settings/member/model/MemberTotp.ts
Normal file
10
src/packages/settings/member/model/MemberTotp.ts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import { Member } from 'packages/member/model';
|
||||||
|
|
||||||
|
export interface MemberTotp {
|
||||||
|
id?: number;
|
||||||
|
member: Member;
|
||||||
|
secretCode?: string;
|
||||||
|
createDate?: Date;
|
||||||
|
updateDate?: Date;
|
||||||
|
otpAuthUrl?: string;
|
||||||
|
}
|
0
src/packages/settings/member/model/index.ts
Normal file
0
src/packages/settings/member/model/index.ts
Normal file
0
src/packages/settings/member/service/index.ts
Normal file
0
src/packages/settings/member/service/index.ts
Normal file
Loading…
Reference in New Issue
Block a user