member totp component added & qrcode print
This commit is contained in:
parent
0fcda0b58d
commit
ec1160b87c
|
@ -42,6 +42,7 @@
|
|||
"ngx-perfect-scrollbar": "^5.3.1",
|
||||
"rxjs": "^5.5.6",
|
||||
"zone.js": "^0.8.20",
|
||||
"angularx-qrcode": "^1.0.1",
|
||||
"angular-l10n": "^4.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -9,7 +9,6 @@ import { Language } from 'angular-l10n';
|
|||
styleUrls: ['./sub-menubar.component.scss']
|
||||
})
|
||||
export class SubMenubarComponent implements OnInit {
|
||||
@Language() lang: string;
|
||||
@Input() tabs: any;
|
||||
|
||||
constructor(public router: Router) { }
|
||||
|
|
|
@ -18,6 +18,7 @@ const routes: Routes = [
|
|||
{ path: 'target', loadChildren: './target/target-page.module#TargetPageModule' },
|
||||
{ path: 'overview', loadChildren: './overview/overview-page.module#OverviewPageModule' },
|
||||
{ path: 'dashboard', loadChildren: './dashboard/dashboard-page.module#DashboardPageModule' },
|
||||
{ path: 'settings/member', loadChildren: './settings/member/member-page.module#MemberPageModule' },
|
||||
]
|
||||
}
|
||||
];
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { NgModule, APP_INITIALIZER} from '@angular/core';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { PagesComponent } from './pages.component';
|
||||
import { PagesRoutingModule } from './pages-routing.module';
|
||||
|
@ -15,28 +14,10 @@ import {
|
|||
PerfectScrollbarConfigInterface
|
||||
} from 'ngx-perfect-scrollbar';
|
||||
import { NotificationModule } from 'packages/notification/notification.module';
|
||||
|
||||
// import {
|
||||
// L10nConfig,
|
||||
// L10nLoader,
|
||||
// LocalizationModule,
|
||||
// ProviderType
|
||||
// } from 'angular-l10n';
|
||||
|
||||
import {
|
||||
LocalizationModule,
|
||||
} from 'angular-l10n';
|
||||
|
||||
// const l10nConfig: L10nConfig = {
|
||||
// translation: {
|
||||
// providers: [
|
||||
// { type: ProviderType.Static, prefix: './assets/translations/of-' }
|
||||
// ],
|
||||
// composedKeySeparator: '.',
|
||||
// missingValue: 'No key'
|
||||
// }
|
||||
// };
|
||||
|
||||
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
||||
suppressScrollX: true
|
||||
};
|
||||
|
@ -51,7 +32,6 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
|||
PerfectScrollbarModule,
|
||||
NotificationModule,
|
||||
LocalizationModule,
|
||||
// LocalizationModule.forChild(l10nConfig)
|
||||
],
|
||||
declarations: [
|
||||
PagesComponent,
|
||||
|
@ -67,8 +47,4 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
|||
}
|
||||
],
|
||||
})
|
||||
export class PagesModule {
|
||||
// constructor(public l10nLoader: L10nLoader) {
|
||||
// this.l10nLoader.load();
|
||||
// }
|
||||
}
|
||||
export class PagesModule { }
|
||||
|
|
22
src/app/pages/settings/member/member-page-routing.module.ts
Normal file
22
src/app/pages/settings/member/member-page-routing.module.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import {MemberPageComponent} from './member-page.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MemberPageComponent,
|
||||
// children: [
|
||||
// { path: '', component: ProbeListComponent },
|
||||
// { path: 'noauth', component: NoauthListComponent },
|
||||
// { path: 'download', component: DownloadComponent },
|
||||
// ]
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class MemberPageRoutingModule { }
|
||||
|
5
src/app/pages/settings/member/member-page.component.html
Normal file
5
src/app/pages/settings/member/member-page.component.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div>
|
||||
<div style="padding: 15px">
|
||||
<of-totp></of-totp>
|
||||
</div>
|
||||
</div>
|
25
src/app/pages/settings/member/member-page.component.spec.ts
Normal file
25
src/app/pages/settings/member/member-page.component.spec.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MemberComponent } from './member-page.component';
|
||||
|
||||
describe('MemberComponent', () => {
|
||||
let component: MemberComponent;
|
||||
let fixture: ComponentFixture<MemberComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MemberComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MemberComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
src/app/pages/settings/member/member-page.component.ts
Normal file
15
src/app/pages/settings/member/member-page.component.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member',
|
||||
templateUrl: './member-page.component.html',
|
||||
styleUrls: ['./member-page.component.scss']
|
||||
})
|
||||
export class MemberPageComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
19
src/app/pages/settings/member/member-page.module.ts
Normal file
19
src/app/pages/settings/member/member-page.module.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||
import { MemberPageComponent } from './member-page.component';
|
||||
import { MemberPageRoutingModule } from './member-page-routing.module';
|
||||
import { MemberModule } from 'packages/settings/member/member.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
MemberPageRoutingModule,
|
||||
MemberModule,
|
||||
],
|
||||
declarations: [
|
||||
MemberPageComponent
|
||||
]
|
||||
})
|
||||
export class MemberPageModule { }
|
5
src/packages/settings/member/component/index.ts
Normal file
5
src/packages/settings/member/component/index.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { TotpComponent } from './totp/totp.component';
|
||||
|
||||
export const COMPONENTS = [
|
||||
TotpComponent
|
||||
];
|
|
@ -0,0 +1,3 @@
|
|||
<div fxLayout="row" fxLayoutWrap fxLayoutAlign="left">
|
||||
<qrcode [qrdata]="'otpauth://totp/overFlow:geekdev@naver.com?secret=X6AWAK573M5372NM'" [size]="256" [level]="'M'"></qrcode>
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TotpComponent } from './totp.component';
|
||||
|
||||
describe('TotpComponent', () => {
|
||||
let component: TotpComponent;
|
||||
let fixture: ComponentFixture<TotpComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TotpComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TotpComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-totp',
|
||||
templateUrl: './totp.component.html',
|
||||
styleUrls: ['./totp.component.scss']
|
||||
})
|
||||
export class TotpComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
23
src/packages/settings/member/member.module.ts
Normal file
23
src/packages/settings/member/member.module.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||
import { QRCodeModule } from 'angularx-qrcode';
|
||||
|
||||
import { COMPONENTS } from './component';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
MaterialModule,
|
||||
QRCodeModule
|
||||
],
|
||||
exports: [
|
||||
COMPONENTS,
|
||||
],
|
||||
declarations: [
|
||||
COMPONENTS,
|
||||
]
|
||||
})
|
||||
export class MemberModule { }
|
Loading…
Reference in New Issue
Block a user