mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
feat(auth): auth pages added
This commit is contained in:
parent
210c6f2355
commit
75dd743244
6 changed files with 73 additions and 4 deletions
|
|
@ -24,7 +24,8 @@
|
|||
"testTsconfig": "tsconfig.spec.json",
|
||||
"styles": [
|
||||
"../node_modules/ionicons/scss/ionicons.scss",
|
||||
"../node_modules/font-awesome/scss/font-awesome.scss"
|
||||
"../node_modules/font-awesome/scss/font-awesome.scss",
|
||||
"./app/@theme/styles/styles.scss"
|
||||
],
|
||||
"scripts": [
|
||||
"../node_modules/tinymce/tinymce.js",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
// @nebular our of the box themes
|
||||
@import '~@nebular/theme/styles/themes';
|
||||
|
||||
// TODO: rename into themes
|
||||
|
||||
// which themes you what to enable (empty to enable all - not recommended)
|
||||
$nb-enabled-themes: (default, light, cosmic);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,46 @@
|
|||
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import {
|
||||
NgaAuthComponent,
|
||||
NgaLoginComponent,
|
||||
NgaLogoutComponent,
|
||||
NgaRegisterComponent,
|
||||
NgaRequestPasswordComponent,
|
||||
NgaResetPasswordComponent
|
||||
} from '@akveo/nga-auth';
|
||||
|
||||
const routes: Routes = [
|
||||
// {path: 'admin'}
|
||||
{ path: 'pages', loadChildren: 'app/pages/pages.module#PagesModule' },
|
||||
{
|
||||
path: 'auth',
|
||||
component: NgaAuthComponent,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: NgaLoginComponent,
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: NgaLoginComponent,
|
||||
},
|
||||
{
|
||||
path: 'register',
|
||||
component: NgaRegisterComponent,
|
||||
},
|
||||
{
|
||||
path: 'logout',
|
||||
component: NgaLogoutComponent,
|
||||
},
|
||||
{
|
||||
path: 'request-password',
|
||||
component: NgaRequestPasswordComponent,
|
||||
},
|
||||
{
|
||||
path: 'reset-password',
|
||||
component: NgaResetPasswordComponent,
|
||||
},
|
||||
],
|
||||
},
|
||||
{ path: '', redirectTo: 'pages', pathMatch: 'full' },
|
||||
{ path: '**', redirectTo: 'pages' },
|
||||
];
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { HttpModule } from '@angular/http';
|
||||
|
||||
import { NgaAuthModule, NgaDummyAuthProvider } from '@akveo/nga-auth';
|
||||
import { CoreModule } from './@core/core.module';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
|
@ -25,6 +25,20 @@ import { ThemeModule } from './@theme/theme.module';
|
|||
CoreModule,
|
||||
ThemeModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
NgaAuthModule,
|
||||
NgaAuthModule.forRoot({
|
||||
providers: {
|
||||
email: {
|
||||
service: NgaDummyAuthProvider,
|
||||
config: {
|
||||
delay: 1000,
|
||||
login: {
|
||||
rememberMe: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}),
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
providers: [
|
||||
|
|
|
|||
|
|
@ -99,4 +99,20 @@ export const MENU_ITEMS: List<NbMenuItem> = List([{
|
|||
title: 'Smart Table',
|
||||
link: '/pages/tables/smart-table',
|
||||
}]),
|
||||
}, {
|
||||
title: 'Auth',
|
||||
icon: 'ion-unlocked',
|
||||
children: List<NgaMenuItem>([{
|
||||
title: 'Login',
|
||||
link: '/auth/login',
|
||||
}, {
|
||||
title: 'Register',
|
||||
link: '/auth/register',
|
||||
}, {
|
||||
title: 'Request Password',
|
||||
link: '/auth/request-password',
|
||||
}, {
|
||||
title: 'Reset Password',
|
||||
link: '/auth/reset-password',
|
||||
}]),
|
||||
}]);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
import 'style-loader!../@theme/styles/styles.scss';
|
||||
import { MENU_ITEMS } from './pages-menu';
|
||||
|
||||
@Component({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue