Ignore:
Timestamp:
07/16/22 21:31:18 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
e903234
Parents:
55701f0
Message:

Now you need to activate your account via email & also added mail sending after server crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/RegisterScreen.jsx

    r55701f0 re007fcd  
    2828        }
    2929    }, 10);
     30
     31    function onChangeEmail(e) {
     32        dispatch(setStyle({
     33            ...styleState.style,
     34            registerScreenInfo: {
     35                ...styleState.style.registerScreenInfo,
     36                email: e.target.value,
     37            }
     38        }))
     39    }
    3040
    3141    function onChangeUsername(e) {
     
    8696        axios.post('/api/postgre', {
    8797            action: 'register',
     98            email: styleState.style.registerScreenInfo.email,
    8899            username: styleState.style.registerScreenInfo.username,
    89100            displayName: styleState.style.registerScreenInfo.displayName,
     
    109120                        notification: {
    110121                            show: true,
    111                             text: 'Successfully registered! Please Log In now.',
     122                            text: 'Successfully registered! Please check your email and activate your account.',
    112123                            status: 'success',
    113124                        },
     
    130141                {styleState.style.inlineAlertText.length > 0 && <span className="inlineAlert">{styleState.style.inlineAlertText}</span>}
    131142                <div>
     143                    <span>Email:</span>
     144                    <input ref={ref} type="text" onChange={(e) => {onChangeEmail(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.email} placeholder="john.doe@gmail.com"/>
    132145                    <span>Username:</span>
    133                     <input ref={ref} type="text" onChange={(e) => {onChangeUsername(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.username} placeholder="your username..."/>
     146                    <input type="text" onChange={(e) => {onChangeUsername(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.username} placeholder="johndoe"/>
    134147                    <span>Display Name:</span>
    135                     <input type="text" onChange={(e) => {onChangeDisplayName(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.displayName} placeholder="your display name..."/>
     148                    <input type="text" onChange={(e) => {onChangeDisplayName(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.displayName} placeholder="John Doe"/>
    136149                    <span>Password:</span>
    137                     <input type="password" onChange={(e) => {onChangePassword(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.password} placeholder="your password..."/>
     150                    <input type="password" onChange={(e) => {onChangePassword(e)}} onKeyUp={(e) => keyUp(e)} value={styleState.style.registerScreenInfo.password} placeholder="***************"/>
    138151                    <div style={{width: '100%', display: 'flex', flexDirection: 'row', justifyContent: 'space-between'}}>
    139152                        <button className="primaryButton" onClick={() => closeForm()}>Close Form</button>
Note: See TracChangeset for help on using the changeset viewer.