add lookup to ownership page
This commit is contained in:
parent
15f636f4b1
commit
b1e6242972
|
@ -75,46 +75,39 @@ const DisplayBox = ({ displayType, pubKey }) => (
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime, defaultAccount, isOwner, edit, onSubmit }) => (
|
const MobileAddressDisplay = ({ domainName, address, statusAccount, releaseTime, defaultAccount, isOwner, edit, onSubmit, handleChange, values, handleSubmit }) => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MobileSearch
|
<LookupForm {...{ handleSubmit, values, handleChange }} justSearch />
|
||||||
search
|
<Info background={isOwner ? '#44D058' : '#000000'} style={{ margin: '0.4em', boxShadow: '0px 6px 10px rgba(0, 0, 0, 0.2)' }}>
|
||||||
name="domainName"
|
<Typography variant="title" style={
|
||||||
placeholder='Search for available name'
|
{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'space-evenly', height: '4em', color: '#ffffff', textAlign: 'center', margin: '10%' }
|
||||||
// value={values.domainName}
|
}>
|
||||||
// onChange={handleChange}
|
{isOwner ? <Face style={{ marginBottom: '0.5em', fontSize: '2em' }} /> : <NotInterested style={{ marginBottom: '0.5em', fontSize: '2em' }}/>}
|
||||||
required
|
<b>{formatName(domainName)}</b>
|
||||||
wide />
|
|
||||||
<Info background={isOwner ? '#44D058' : '#000000'} style={{ margin: '0.4em', boxShadow: '0px 6px 10px rgba(0, 0, 0, 0.2)' }}>
|
|
||||||
<Typography variant="title" style={
|
|
||||||
{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'space-evenly', height: '4em', color: '#ffffff', textAlign: 'center', margin: '10%' }
|
|
||||||
}>
|
|
||||||
{isOwner ? <Face style={{ marginBottom: '0.5em', fontSize: '2em' }} /> : <NotInterested style={{ marginBottom: '0.5em', fontSize: '2em' }}/>}
|
|
||||||
<b>{formatName(domainName)}</b>
|
|
||||||
<div style={{ fontWeight: 300 }}>
|
<div style={{ fontWeight: 300 }}>
|
||||||
{validTimestamp(releaseTime) && <i>Locked until {generatePrettyDate(releaseTime)}</i>}
|
{validTimestamp(releaseTime) && <i>Locked until {generatePrettyDate(releaseTime)}</i>}
|
||||||
</div>
|
</div>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Info>
|
</Info>
|
||||||
<Typography type='subheading' style={{ textAlign: 'center', fontSize: '17px', fontWeight: '500', margin: '1.5em 0 0.3em 0' }}>
|
<Typography type='subheading' style={{ textAlign: 'center', fontSize: '17px', fontWeight: '500', margin: '1.5em 0 0.3em 0' }}>
|
||||||
Registered {validTimestamp(expirationTime)}
|
Registered {validTimestamp(expirationTime)}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography type='body2' style={{ textAlign: 'center', margin: 10 }}>
|
<Typography type='body2' style={{ textAlign: 'center', margin: 10 }}>
|
||||||
{edit
|
{edit
|
||||||
? 'The contact code connects the domain with a unique Status account'
|
? 'The contact code connects the domain with a unique Status account'
|
||||||
: validAddress(address) ? 'to the addresses below' : 'Click \'Edit\' to add a valid address and contact code'}
|
: validAddress(address) ? 'to the addresses below' : 'Click \'Edit\' to add a valid address and contact code'}
|
||||||
</Typography>
|
</Typography>
|
||||||
{edit && <RegisterSubDomain
|
{edit && <RegisterSubDomain
|
||||||
subDomain={domainName}
|
subDomain={domainName}
|
||||||
domainName="stateofus.eth"
|
domainName="stateofus.eth"
|
||||||
domainPrice="DO NOT SHOW"
|
domainPrice="DO NOT SHOW"
|
||||||
editAccount={true}
|
editAccount={true}
|
||||||
preRegisteredCallback={onSubmit}
|
preRegisteredCallback={onSubmit}
|
||||||
registeredCallbackFn={console.log} />}
|
registeredCallbackFn={console.log} />}
|
||||||
{!edit && <DisplayBox displayType='Your wallet address' pubKey={address} />}
|
{!edit && <DisplayBox displayType='Your wallet address' pubKey={address} />}
|
||||||
{!edit && validStatusAddress(statusAccount) && <DisplayBox displayType='Your contact code' pubKey={statusAccount} />}
|
{!edit && validStatusAddress(statusAccount) && <DisplayBox displayType='Your contact code' pubKey={statusAccount} />}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|
|
||||||
class RenderAddresses extends PureComponent {
|
class RenderAddresses extends PureComponent {
|
||||||
state = { copied: false, editMenu: false, editAction: false }
|
state = { copied: false, editMenu: false, editAction: false }
|
||||||
|
@ -340,6 +333,7 @@ const InnerForm = ({
|
||||||
? <LookupForm {...{ handleSubmit, values, handleChange }} />
|
? <LookupForm {...{ handleSubmit, values, handleChange }} />
|
||||||
: validAddress(status.address) || defaultAccount === status.ownerAddress ?
|
: validAddress(status.address) || defaultAccount === status.ownerAddress ?
|
||||||
<DisplayAddress
|
<DisplayAddress
|
||||||
|
{...{ handleSubmit, values, handleChange }}
|
||||||
domainName={values.domainName}
|
domainName={values.domainName}
|
||||||
address={status.address}
|
address={status.address}
|
||||||
statusAccount={status.statusAccount}
|
statusAccount={status.statusAccount}
|
||||||
|
@ -347,15 +341,15 @@ const InnerForm = ({
|
||||||
ownerAddress={status.ownerAddress}
|
ownerAddress={status.ownerAddress}
|
||||||
registryOwnsDomain={status.registryOwnsDomain}
|
registryOwnsDomain={status.registryOwnsDomain}
|
||||||
setStatus={setStatus} /> :
|
setStatus={setStatus} /> :
|
||||||
<div>
|
<div>
|
||||||
<LookupForm {...{ handleSubmit, values, handleChange }} justSearch />
|
<LookupForm {...{ handleSubmit, values, handleChange }} justSearch />
|
||||||
<ConnectedRegister
|
<ConnectedRegister
|
||||||
style={{ position: 'relative' }}
|
style={{ position: 'relative' }}
|
||||||
setStatus={setStatus}
|
setStatus={setStatus}
|
||||||
registryOwnsDomain={status.registryOwnsDomain}
|
registryOwnsDomain={status.registryOwnsDomain}
|
||||||
ownerAddress={status.ownerAddress}
|
ownerAddress={status.ownerAddress}
|
||||||
domainName={values.domainName} />
|
domainName={values.domainName} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue