member file rename
This commit is contained in:
parent
64c2067526
commit
898afc43fe
|
@ -1,9 +1,9 @@
|
|||
import { Action, combineReducers } from 'redux';
|
||||
import State from '../state';
|
||||
|
||||
import { reducer as signinReducer} from '@overflow/member/redux/reducer/signin';
|
||||
import { reducer as signoutReducer} from '@overflow/member/redux/reducer/signout';
|
||||
import { reducer as signupReducer} from '@overflow/member/redux/reducer/signup';
|
||||
import { reducer as signinReducer} from '@overflow/member/redux/reducer/signIn';
|
||||
import { reducer as signoutReducer} from '@overflow/member/redux/reducer/signOut';
|
||||
import { reducer as signupReducer} from '@overflow/member/redux/reducer/signUp';
|
||||
|
||||
import { ConnectedRouter } from 'react-router-redux';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { SagaIterator } from 'redux-saga';
|
||||
import { fork } from 'redux-saga/effects';
|
||||
|
||||
import { watchSignin as memberWatchSignin } from '@overflow/member/redux/saga/signin';
|
||||
import { watchSignin as memberWatchSignin } from '@overflow/member/redux/saga/signIn';
|
||||
|
||||
export default function* sagas(): SagaIterator {
|
||||
yield fork(memberWatchSignin);
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
import * as React from 'react';
|
||||
import { RouteComponentProps } from 'react-router';
|
||||
import SignInContainer from '@overflow/member/react/SignIn';
|
||||
import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC';
|
||||
import AppContext from '@overflow/commons/context';
|
||||
import inject from '@overflow/commons/context/decorator/inject';
|
||||
|
||||
class SignOut extends React.Component<RouteComponentProps<object>, object> {
|
||||
@inject()
|
||||
private client: WebSocketRPC;
|
||||
|
||||
public constructor(props?: RouteComponentProps<object>, context?: object) {
|
||||
super(props, context);
|
||||
|
||||
let con = AppContext.get<WebSocketRPC>();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<SignInContainer />
|
||||
);
|
||||
}
|
||||
|
||||
private test(@inject() c: WebSocketRPC): void {
|
||||
console.log('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default SignOut;
|
|
@ -0,0 +1,30 @@
|
|||
import * as React from 'react';
|
||||
import { RouteComponentProps } from 'react-router';
|
||||
import SignUpContainer from '@overflow/member/react/SignUp';
|
||||
import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC';
|
||||
import AppContext from '@overflow/commons/context';
|
||||
import inject from '@overflow/commons/context/decorator/inject';
|
||||
|
||||
class SignIUp extends React.Component<RouteComponentProps<object>, object> {
|
||||
@inject()
|
||||
private client: WebSocketRPC;
|
||||
|
||||
public constructor(props?: RouteComponentProps<object>, context?: object) {
|
||||
super(props, context);
|
||||
|
||||
let con = AppContext.get<WebSocketRPC>();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<SignUpContainer />
|
||||
);
|
||||
}
|
||||
|
||||
private test(@inject() c: WebSocketRPC): void {
|
||||
console.log('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default SignIUp;
|
|
@ -0,0 +1,98 @@
|
|||
import * as React from 'react';
|
||||
import {
|
||||
Button,
|
||||
Modal,
|
||||
Checkbox,
|
||||
Header,
|
||||
Container,
|
||||
} from 'semantic-ui-react';
|
||||
import { DiscoveryProbe } from './DiscoveryProbe';
|
||||
import { DiscoveryTable } from './DiscoveryTable';
|
||||
|
||||
export interface Props {
|
||||
|
||||
}
|
||||
|
||||
export interface State {
|
||||
startPopup:boolean;
|
||||
probeTemp: any;
|
||||
}
|
||||
|
||||
const probeTemp:Object = {
|
||||
'id': '11',
|
||||
'metaProbeStatus': {
|
||||
'name': 'STARTED',
|
||||
},
|
||||
'domain': {
|
||||
'name': 'overFlow\'s domain111',
|
||||
},
|
||||
'host': {
|
||||
'ip': '192.168.1.103',
|
||||
'mac': '44:8a:5b:44:8c:e8',
|
||||
'os': 'Ubuntu 17.04',
|
||||
'name': '?????',
|
||||
},
|
||||
'createAt': '2017-07-12',
|
||||
'probeKey': 'AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
'description': 'description1111111111',
|
||||
'lastPollingAt': '2017-07-12 14:20',
|
||||
'nextPollingAt': '2017-07-12 14:30',
|
||||
};
|
||||
|
||||
export class Discovery extends React.Component<Props, State> {
|
||||
|
||||
private submitData: any;
|
||||
|
||||
public constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
this.handleProbeChange.bind(this);
|
||||
this.state = {
|
||||
startPopup:false,
|
||||
probeTemp:probeTemp,
|
||||
};
|
||||
}
|
||||
|
||||
public componentWillMount():void {
|
||||
super.componentWillMount();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public handleProbeChange(obj: Object): void {
|
||||
console.log(obj);
|
||||
this.setState({ startPopup:true });
|
||||
this.submitData = obj;
|
||||
}
|
||||
|
||||
public handleSubmit(): void {
|
||||
console.log(this.submitData);
|
||||
}
|
||||
|
||||
public handleCancel= () => this.setState({ startPopup: false });
|
||||
|
||||
public handlePopupClose = () => this.setState({ startPopup: false });
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Header as='h3' dividing> Discovery Details</Header>
|
||||
<DiscoveryProbe probe={this.state.probeTemp}/>
|
||||
<br />
|
||||
<DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} />
|
||||
|
||||
<Modal size='small' open={this.state.startPopup} onClose={this.handlePopupClose}>
|
||||
<Modal.Header>Change your password Enter email address.</Modal.Header>
|
||||
<Modal.Content >
|
||||
<Checkbox label='IP' />
|
||||
</Modal.Content>
|
||||
<Modal.Actions>
|
||||
<Button onClick={this.handleSubmit.bind(this)} basic color='blue' > Submit </Button>
|
||||
<Button onClick={this.handleCancel}> Cancel </Button>
|
||||
</Modal.Actions>
|
||||
</Modal>
|
||||
|
||||
</Container>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
|
@ -4,18 +4,18 @@ import {
|
|||
Props as SignInProps,
|
||||
State as SignInState,
|
||||
} from './components/SignIn';
|
||||
import State from '../redux/state/Signin';
|
||||
import State from '../redux/state/SignIn';
|
||||
|
||||
import * as signinActions from '../redux/action/signin';
|
||||
import * as signinActions from '../redux/action/signIn';
|
||||
|
||||
|
||||
export function mapStateToProps(state: any): SignInProps {
|
||||
export function mapStateToProps(state: SignInState): SignInProps {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
export function mapDispatchToProps(dispatch: Dispatch<any>): SignInProps {
|
||||
export function mapDispatchToProps(dispatch: Dispatch<SignInState>): SignInProps {
|
||||
return {
|
||||
onSignin: (signinId: string, signinPw: string) => {
|
||||
dispatch(signinActions.request(signinId, signinPw));
|
||||
|
|
34
src/ts/@overflow/member/react/SignUp.tsx
Normal file
34
src/ts/@overflow/member/react/SignUp.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
import { connect, Dispatch } from 'react-redux';
|
||||
import Member from '../api/model/Member';
|
||||
|
||||
import {
|
||||
SignUp,
|
||||
Props as SignUpProps,
|
||||
State as SignUpState,
|
||||
} from './components/SignUp';
|
||||
import State from '../redux/state/SignUp';
|
||||
|
||||
import * as signupActions from '../redux/action/signUp';
|
||||
|
||||
|
||||
export function mapStateToProps(state: SignUpState): SignUpProps {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
export function mapDispatchToProps(dispatch: Dispatch<SignUpState>): SignUpProps {
|
||||
return {
|
||||
onSignin: () => {
|
||||
return;
|
||||
},
|
||||
onSignup: (member: Member) => {
|
||||
dispatch(signupActions.request(member));
|
||||
},
|
||||
onResetPassword: () => {
|
||||
return;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(SignUp);
|
|
@ -1,7 +1,7 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import SigninPayload from '../payload/SigninPayload';
|
||||
import SigninPayload from '../payload/SignInPayload';
|
||||
|
||||
// Action Type
|
||||
export type REQUEST = '@overflow/member/signin/REQUEST';
|
|
@ -1,7 +1,7 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import SigninPayload from '../payload/SigninPayload';
|
||||
import SigninPayload from '../payload/SignInPayload';
|
||||
|
||||
// Action Type
|
||||
export type REQUEST = '@overflow/member/signup/REQUEST';
|
|
@ -1,8 +1,8 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import * as SigninActionTypes from '../action/signin';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/Signin';
|
||||
import * as SigninActionTypes from '../action/signIn';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/SignIn';
|
||||
|
||||
export type reducer = (state: SigninState, action: Action<Member | Error>) => SigninState;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import * as SignoutActionTypes from '../action/signout';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/Signin';
|
||||
import * as SignoutActionTypes from '../action/signOut';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/SignIn';
|
||||
|
||||
export type reducer = (state: SigninState, action: Action) => SigninState;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import * as SignupActionTypes from '../action/signup';
|
||||
import SignupState, { defaultState as signupDefaultState } from '../state/Signup';
|
||||
import * as SignupActionTypes from '../action/signUp';
|
||||
import SignupState, { defaultState as signupDefaultState } from '../state/SignUp';
|
||||
|
||||
export type reducer = (state: SignupState, action: Action<Member | Error>) => SignupState;
|
||||
|
|
@ -7,8 +7,8 @@ import Action from '@overflow/commons/redux/Action';
|
|||
|
||||
import Member from '../../api/model/Member';
|
||||
import MemberService from '../../api/service/MemberService';
|
||||
import * as SigninActions from '../action/signin';
|
||||
import SigninPayload from '../payload/SigninPayload';
|
||||
import * as SigninActions from '../action/signIn';
|
||||
import SigninPayload from '../payload/SignInPayload';
|
||||
|
||||
function* signin(action: Action<SigninPayload>): SagaIterator {
|
||||
try {
|
|
@ -1,8 +1,8 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import SignoutActionTypes from '../action/signout';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/Signin';
|
||||
import SignoutActionTypes from '../action/signOut';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/SignIn';
|
||||
|
||||
export type reducer = (state: SigninState, action: Action) => SigninState;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import SignupActionTypes from '../action/signup';
|
||||
import SignupState, { defaultState as signupDefaultState } from '../state/Signup';
|
||||
import SignupActionTypes from '../action/signUp';
|
||||
import SignupState, { defaultState as signupDefaultState } from '../state/SignUp';
|
||||
|
||||
export type reducer = (state: SignupState, action: Action<Member | Error>) => SignupState;
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import {
|
||||
Button,
|
||||
Modal,
|
||||
Checkbox,
|
||||
Header,
|
||||
Container,
|
||||
} from 'semantic-ui-react';
|
||||
import { DiscoveryProbe } from './DiscoveryProbe';
|
||||
import { DiscoveryTable } from './DiscoveryTable';
|
||||
|
||||
export interface Props {
|
||||
|
||||
}
|
||||
|
||||
export interface State {
|
||||
startPopup:boolean;
|
||||
probeTemp: any;
|
||||
}
|
||||
|
||||
const probeTemp:Object = {
|
||||
'id': '11',
|
||||
'metaProbeStatus': {
|
||||
'name': 'STARTED',
|
||||
},
|
||||
'domain': {
|
||||
'name': 'overFlow\'s domain111',
|
||||
},
|
||||
'host': {
|
||||
'ip': '192.168.1.103',
|
||||
'mac': '44:8a:5b:44:8c:e8',
|
||||
'os': 'Ubuntu 17.04',
|
||||
'name': '?????',
|
||||
},
|
||||
'createAt': '2017-07-12',
|
||||
'probeKey': 'AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||
'description': 'description1111111111',
|
||||
'lastPollingAt': '2017-07-12 14:20',
|
||||
'nextPollingAt': '2017-07-12 14:30',
|
||||
};
|
||||
|
||||
export class DiscoveryDetails extends React.Component<Props, State> {
|
||||
|
||||
private submitData: any;
|
||||
|
||||
public constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
this.handleProbeChange.bind(this);
|
||||
this.state = {
|
||||
startPopup:false,
|
||||
probeTemp:probeTemp,
|
||||
};
|
||||
}
|
||||
|
||||
public componentWillMount():void {
|
||||
super.componentWillMount();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public handleProbeChange(obj: Object): void {
|
||||
console.log(obj);
|
||||
this.setState({ startPopup:true });
|
||||
this.submitData = obj;
|
||||
}
|
||||
|
||||
public handleSubmit(): void {
|
||||
console.log(this.submitData);
|
||||
}
|
||||
|
||||
public handleCancel= () => this.setState({ startPopup: false });
|
||||
|
||||
public handlePopupClose = () => this.setState({ startPopup: false });
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Header as='h3' dividing> Discovery Details</Header>
|
||||
<DiscoveryProbe probe={this.state.probeTemp}/>
|
||||
<br />
|
||||
<DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} />
|
||||
|
||||
<Modal size='small' open={this.state.startPopup} onClose={this.handlePopupClose}>
|
||||
<Modal.Header>Change your password Enter email address.</Modal.Header>
|
||||
<Modal.Content >
|
||||
<Checkbox label='IP' />
|
||||
</Modal.Content>
|
||||
<Modal.Actions>
|
||||
<Button onClick={this.handleSubmit.bind(this)} basic color='blue' > Submit </Button>
|
||||
<Button onClick={this.handleCancel}> Cancel </Button>
|
||||
</Modal.Actions>
|
||||
</Modal>
|
||||
|
||||
</Container>
|
||||
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user