ing
This commit is contained in:
parent
fada7b057a
commit
c97e50e7d1
|
@ -2,11 +2,18 @@ import { MemberSigninContainerComponent } from './member-signin-container.compon
|
|||
import { MemberSignupContainerComponent } from './member-signup-container.component';
|
||||
import { MemberTermsContainerComponent } from './member-terms-container.component';
|
||||
import { MemberTotpContainerComponent } from './member-totp-container.component';
|
||||
import { MemberResetPasswordContainerComponent } from './member-reset-password-container.component';
|
||||
import { MemberModifyPasswordContainerComponent } from './member-modify-password-container.component';
|
||||
import { MemberPolicyContainerComponent } from './member-policy-container.component';
|
||||
import { MemberProfileContainerComponent } from './member-profile-container.component';
|
||||
|
||||
export const CONTAINERS = [
|
||||
MemberSigninContainerComponent,
|
||||
MemberSignupContainerComponent,
|
||||
MemberTermsContainerComponent,
|
||||
MemberTotpContainerComponent,
|
||||
// MemberSignupContainerComponent,
|
||||
MemberResetPasswordContainerComponent,
|
||||
MemberModifyPasswordContainerComponent,
|
||||
MemberPolicyContainerComponent,
|
||||
MemberProfileContainerComponent,
|
||||
];
|
||||
|
|
|
@ -6,8 +6,8 @@ import {select, Store} from '@ngrx/store';
|
|||
import { ResetPasswordSelector } from '../../store';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-modify-password',
|
||||
templateUrl: './modify-password.component.html',
|
||||
selector: 'of-member-modify-password-container',
|
||||
templateUrl: './modify-password-container.component.html',
|
||||
})
|
||||
export class MemberModifyPasswordContainerComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-policy',
|
||||
templateUrl: './policy.component.html',
|
||||
selector: 'of-member-policy-container',
|
||||
templateUrl: './member-policy-container.component.html',
|
||||
})
|
||||
export class PolicyComponent implements OnInit, OnDestroy {
|
||||
export class MemberPolicyContainerComponent implements OnInit, OnDestroy {
|
||||
|
||||
@Input() policyDisplay;
|
||||
@Output() close = new EventEmitter();
|
|
@ -1,20 +1,20 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ProfileComponent } from './profile.component';
|
||||
import { MemberProfileContainerComponent } from './profile.component';
|
||||
|
||||
describe('ProfileComponent', () => {
|
||||
let component: ProfileComponent;
|
||||
let fixture: ComponentFixture<ProfileComponent>;
|
||||
let component: MemberProfileContainerComponent;
|
||||
let fixture: ComponentFixture<MemberProfileContainerComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ProfileComponent ]
|
||||
declarations: [ MemberProfileContainerComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ProfileComponent);
|
||||
fixture = TestBed.createComponent(MemberProfileContainerComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
|
@ -14,10 +14,10 @@ import { RPCClientError } from '@loafer/ng-rpc';
|
|||
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-profile',
|
||||
templateUrl: './profile.component.html',
|
||||
selector: 'of-member-profile-container',
|
||||
templateUrl: './member-profile-container.component.html',
|
||||
})
|
||||
export class ProfileComponent implements OnInit, OnDestroy {
|
||||
export class MemberProfileContainerComponent implements OnInit, OnDestroy {
|
||||
|
||||
member: Member;
|
||||
modifyForm: FormGroup;
|
|
@ -1,61 +1 @@
|
|||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-9 ui-lg-7">
|
||||
<form [formGroup]="resetPassword" (ngSubmit)="sendResetPassword()">
|
||||
<table class="login-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="login-panel ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<!--img src="assets/layout/images/logo-ultima.svg" -->
|
||||
<img src="assets/layout/images/overFlow_CI_blue_185.png">
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input type="email" id="email" autocomplete="off" placeholder="Please enter your email" formControlName="email" required class="ui-inputtext ui-corner-all ui-state-default ui-widget">
|
||||
</span>
|
||||
<div *ngIf="formErrors.email" class="help is-danger">
|
||||
{{ formErrors.email }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12">
|
||||
<button (click)="sendResetPassword()" type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left">
|
||||
<span class="ui-button-icon-left ui-c fa fa-fw ui-icon-cached"></span>
|
||||
<span class="ui-button-text ui-c">Reset Password</span>
|
||||
</button>
|
||||
|
||||
<a href="/auth/signin" >Sign In</a>
|
||||
|
|
||||
<a href="/auth/signup" >Sign Up</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-3 ui-lg-5 login-descript">
|
||||
<table class="login-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="login-panel ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<img src="assets/layout/images/login/login_img_01.png">
|
||||
<p><br>
|
||||
overFlow는 여러분의 서버에 발생하는<br>
|
||||
변화를 항상 지켜보고 있습니다.<br><br>
|
||||
|
||||
서버에 발생하는 모든 변화를 세분화 하여<br>
|
||||
실시간으로 알려 드립니다.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<of-member-reset-password></of-member-reset-password>
|
||||
|
|
|
@ -8,8 +8,8 @@ import {RPCClientError} from '@loafer/ng-rpc';
|
|||
import {Member} from '@overflow/commons-typescript/model/member/index';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-reset-password',
|
||||
templateUrl: './reset-password.component.html',
|
||||
selector: 'of-member-reset-password-container',
|
||||
templateUrl: './reset-password-container.component.html',
|
||||
})
|
||||
export class MemberResetPasswordContainerComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-9 ui-lg-7">
|
||||
<form [formGroup]="modifyPwForm" (ngSubmit)="modifyPw()">
|
||||
<table class="login-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="login-panel ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<img src="assets/layout/images/overFlow_CI_blue_185.png">
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input type="password"
|
||||
id="pw"
|
||||
autocomplete="off" placeholder="password"
|
||||
formControlName="pw"
|
||||
required class="ui-inputtext ui-corner-all ui-state-default ui-widget">
|
||||
</span>
|
||||
<div *ngIf="formErrors.pw" class="help is-danger">
|
||||
{{ formErrors.pw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input type="password"
|
||||
id="confirmPw"
|
||||
autocomplete="off" placeholder="confirm password"
|
||||
formControlName="confirmPw"
|
||||
required class="ui-inputtext ui-corner-all ui-state-default ui-widget">
|
||||
</span>
|
||||
<div *ngIf="formErrors.confirmPw" class="help is-danger">
|
||||
{{ formErrors.confirmPw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<button type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left">
|
||||
<span class="ui-button-icon-left ui-c fa fa-fw ui-icon-person"></span>
|
||||
<span class="ui-button-text ui-c">Confirm</span>
|
||||
</button>
|
||||
<a href="javascript:void(0)" (click)="signinBtn()">Signin</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-3 ui-lg-5 login-descript">
|
||||
<table class="login-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="login-panel ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<img src="assets/layout/images/login/login_img_01.png">
|
||||
<p><br>
|
||||
overFlow는 여러분의 서버에 발생하는<br>
|
||||
변화를 항상 지켜보고 있습니다.<br><br>
|
||||
|
||||
서버에 발생하는 모든 변화를 세분화 하여<br>
|
||||
실시간으로 알려 드립니다.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
|
@ -1,25 +0,0 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ModifyPasswordComponent } from './modify-password-page.component';
|
||||
|
||||
describe('ModifyPasswordPageComponent', () => {
|
||||
let component: ModifyPasswordComponent;
|
||||
let fixture: ComponentFixture<ModifyPasswordComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ModifyPasswordComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ModifyPasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,63 +0,0 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import * as ModifyPasswordStore from '../../store/reset-password';
|
||||
import {select, Store} from '@ngrx/store';
|
||||
import { ResetPasswordSelector } from '../../store';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-modify-password',
|
||||
templateUrl: './modify-password.component.html',
|
||||
})
|
||||
export class ModifyPasswordComponent implements OnInit {
|
||||
|
||||
modifyPwForm: FormGroup;
|
||||
tokenURL: string;
|
||||
formErrors = {
|
||||
'pw': '',
|
||||
'confirmPw': ''
|
||||
};
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private formBuilder: FormBuilder,
|
||||
private modifyPasswordStore: Store<ModifyPasswordStore.State>,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.tokenURL = this.activatedRoute.snapshot.queryParams['token'];
|
||||
console.log(this.tokenURL);
|
||||
this.initForm();
|
||||
}
|
||||
|
||||
initForm() {
|
||||
this.modifyPwForm = this.formBuilder.group({
|
||||
'pw': [
|
||||
'',
|
||||
[
|
||||
// Validators.required,
|
||||
]
|
||||
],
|
||||
'confirmPw': [
|
||||
'',
|
||||
[
|
||||
// Validators.pattern('^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$'),
|
||||
// Validators.minLength(6),
|
||||
// Validators.maxLength(25)
|
||||
]
|
||||
],
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
modifyPw() {
|
||||
const modifyPwValue = Object.assign({}, this.modifyPwForm.value);
|
||||
const m = {token: this.tokenURL, pw: modifyPwValue.pw, confirmPw: modifyPwValue.confirmPw};
|
||||
this.modifyPasswordStore.dispatch(new ModifyPasswordStore.ModifyPassword(m));
|
||||
}
|
||||
|
||||
signinBtn() {
|
||||
this.router.navigateByUrl('/auth/signin');
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-9 ui-lg-7">
|
||||
<form [formGroup]="resetPassword" (ngSubmit)="sendResetPassword()">
|
||||
<table class="login-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="login-panel ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<!--img src="assets/layout/images/logo-ultima.svg" -->
|
||||
<img src="assets/layout/images/overFlow_CI_blue_185.png">
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<span class="md-inputfield">
|
||||
<input type="email" id="email" autocomplete="off" placeholder="Please enter your email" formControlName="email" required class="ui-inputtext ui-corner-all ui-state-default ui-widget">
|
||||
</span>
|
||||
<div *ngIf="formErrors.email" class="help is-danger">
|
||||
{{ formErrors.email }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12">
|
||||
<button (click)="sendResetPassword()" type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left">
|
||||
<span class="ui-button-icon-left ui-c fa fa-fw ui-icon-cached"></span>
|
||||
<span class="ui-button-text ui-c">Reset Password</span>
|
||||
</button>
|
||||
|
||||
<a href="/auth/signin" >Sign In</a>
|
||||
|
|
||||
<a href="/auth/signup" >Sign Up</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-3 ui-lg-5 login-descript">
|
||||
<table class="login-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="login-panel ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<img src="assets/layout/images/login/login_img_01.png">
|
||||
<p><br>
|
||||
overFlow는 여러분의 서버에 발생하는<br>
|
||||
변화를 항상 지켜보고 있습니다.<br><br>
|
||||
|
||||
서버에 발생하는 모든 변화를 세분화 하여<br>
|
||||
실시간으로 알려 드립니다.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
|
@ -1,25 +0,0 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ResetPasswordComponent } from './reset-password.component';
|
||||
|
||||
describe('ResetPasswordComponent', () => {
|
||||
let component: ResetPasswordComponent;
|
||||
let fixture: ComponentFixture<ResetPasswordComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ResetPasswordComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ResetPasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,58 +0,0 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import * as ResetPasswordStore from '../../store/reset-password';
|
||||
import {select, Store} from '@ngrx/store';
|
||||
import { ResetPasswordSelector } from '../../store';
|
||||
import {RPCClientError} from '@loafer/ng-rpc';
|
||||
import {Member} from '@overflow/commons-typescript/model/member/index';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-reset-password',
|
||||
templateUrl: './reset-password.component.html',
|
||||
})
|
||||
export class ResetPasswordComponent implements OnInit {
|
||||
|
||||
resetPassword$ = this.resetPasswordStore.pipe(select(ResetPasswordSelector.select('member')));
|
||||
|
||||
resetPassword: FormGroup;
|
||||
formErrors = {
|
||||
'email': ''
|
||||
};
|
||||
|
||||
constructor(
|
||||
private resetPasswordStore: Store<ResetPasswordStore.State>,
|
||||
private router: Router,
|
||||
private formBuilder: FormBuilder) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.resetPassword = this.formBuilder.group({
|
||||
'email': ['', [
|
||||
Validators.required,
|
||||
Validators.email
|
||||
]
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
sendResetPassword() {
|
||||
const emailValue = Object.assign({}, this.resetPassword.value);
|
||||
console.log(emailValue.email);
|
||||
this.resetPasswordStore.dispatch(new ResetPasswordStore.ResetPassword(emailValue.email));
|
||||
|
||||
const resetPasswordSubscription$ = this.resetPassword$.subscribe(
|
||||
(m: Member) => {
|
||||
if (m) {
|
||||
console.log(m);
|
||||
}
|
||||
|
||||
if (resetPasswordSubscription$) {
|
||||
resetPasswordSubscription$.unsubscribe();
|
||||
}
|
||||
},
|
||||
(error: RPCClientError) => {
|
||||
console.log(error.response.message);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
<div class="ui-g-12">
|
||||
<div class="card no-margin">
|
||||
<h1>Profile</h1>
|
||||
<of-member-profile></of-member-profile>
|
||||
<of-member-profile-container></of-member-profile-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
<of-member-modify-password></of-member-modify-password>
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-9 ui-lg-7">
|
||||
<of-member-modify-password-container></of-member-modify-password-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>
|
||||
|
||||
|
|
|
@ -1 +1,8 @@
|
|||
<of-member-reset-password></of-member-reset-password>
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-9 ui-lg-7">
|
||||
<of-member-reset-password-container></of-member-reset-password-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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user