Remove logos from signup modals, move signup hints to the top of modals, fix signup hints
This commit is contained in:
parent
b98339e177
commit
6d4a8b4f64
@ -6,7 +6,6 @@ import { Input } from '@/shared/Input/Input'
|
|||||||
import { Modal } from '@/shared/Modal/Modal'
|
import { Modal } from '@/shared/Modal/Modal'
|
||||||
import { MODAL_PARAMS_KEYS } from '@/types/modal'
|
import { MODAL_PARAMS_KEYS } from '@/types/modal'
|
||||||
import { Stack, Typography, useTheme } from '@mui/material'
|
import { Stack, Typography, useTheme } from '@mui/material'
|
||||||
import { StyledAppLogo } from './styled'
|
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { useForm } from 'react-hook-form'
|
import { useForm } from 'react-hook-form'
|
||||||
import { FormInputType, schema } from './const'
|
import { FormInputType, schema } from './const'
|
||||||
@ -149,13 +148,15 @@ export const ModalImportKeys = () => {
|
|||||||
const nsecHelperText = getNsecHelperText()
|
const nsecHelperText = getNsecHelperText()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open={isModalOpened} onClose={handleCloseModal}>
|
<Modal open={isModalOpened} onClose={handleCloseModal} withCloseButton={false}>
|
||||||
<Stack gap={'1rem'} component={'form'} onSubmit={handleSubmit(submitHandler)}>
|
<Stack paddingTop={'1rem'} gap={'1rem'} component={'form'} onSubmit={handleSubmit(submitHandler)}>
|
||||||
<Stack direction={'row'} gap={'1rem'} alignItems={'center'} alignSelf={'flex-start'}>
|
<Stack gap={'0.2rem'} padding={'0 1rem'} alignSelf={'flex-start'}>
|
||||||
<StyledAppLogo />
|
|
||||||
<Typography fontWeight={600} variant="h5">
|
<Typography fontWeight={600} variant="h5">
|
||||||
Import key
|
Import key
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Typography noWrap variant="body2" color={'GrayText'}>
|
||||||
|
Bring your existing Nostr keys to Nsec.app
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Input
|
<Input
|
||||||
label="Choose a username"
|
label="Choose a username"
|
||||||
|
@ -5,7 +5,6 @@ import { swicCall } from '@/modules/swic'
|
|||||||
import { Modal } from '@/shared/Modal/Modal'
|
import { Modal } from '@/shared/Modal/Modal'
|
||||||
import { MODAL_PARAMS_KEYS } from '@/types/modal'
|
import { MODAL_PARAMS_KEYS } from '@/types/modal'
|
||||||
import { Stack, Typography } from '@mui/material'
|
import { Stack, Typography } from '@mui/material'
|
||||||
import { StyledAppLogo } from './styled'
|
|
||||||
import { Input } from '@/shared/Input/Input'
|
import { Input } from '@/shared/Input/Input'
|
||||||
import { Button } from '@/shared/Button/Button'
|
import { Button } from '@/shared/Button/Button'
|
||||||
import { useNavigate, useSearchParams } from 'react-router-dom'
|
import { useNavigate, useSearchParams } from 'react-router-dom'
|
||||||
@ -119,13 +118,15 @@ export const ModalLogin = () => {
|
|||||||
}, [isModalOpened, cleanUpStates])
|
}, [isModalOpened, cleanUpStates])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open={isModalOpened} onClose={handleCloseModal}>
|
<Modal open={isModalOpened} onClose={handleCloseModal} withCloseButton={false}>
|
||||||
<Stack gap={'1rem'} component={'form'} onSubmit={handleSubmit(submitHandler)}>
|
<Stack paddingTop={'1rem'} gap={'1rem'} component={'form'} onSubmit={handleSubmit(submitHandler)}>
|
||||||
<Stack direction={'row'} gap={'1rem'} alignItems={'center'} alignSelf={'flex-start'}>
|
<Stack gap={'0.2rem'} padding={'0 1rem'} alignSelf={'flex-start'}>
|
||||||
<StyledAppLogo />
|
|
||||||
<Typography fontWeight={600} variant="h5">
|
<Typography fontWeight={600} variant="h5">
|
||||||
Login
|
Login
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Typography noWrap variant="body2" color={'GrayText'}>
|
||||||
|
Sync keys from the cloud to this device
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Input
|
<Input
|
||||||
label="Username or nip05 or npub"
|
label="Username or nip05 or npub"
|
||||||
@ -148,9 +149,6 @@ export const ModalLogin = () => {
|
|||||||
<Button type="submit" fullWidth disabled={isLoading}>
|
<Button type="submit" fullWidth disabled={isLoading}>
|
||||||
Add account {isLoading && <LoadingSpinner />}
|
Add account {isLoading && <LoadingSpinner />}
|
||||||
</Button>
|
</Button>
|
||||||
<Typography padding={'0 0.5rem'} noWrap variant="body2" color={'GrayText'}>
|
|
||||||
Import your keys from another nsec.app instance
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -4,7 +4,6 @@ import { Modal } from '@/shared/Modal/Modal'
|
|||||||
import { MODAL_PARAMS_KEYS } from '@/types/modal'
|
import { MODAL_PARAMS_KEYS } from '@/types/modal'
|
||||||
import { Stack, Typography, useTheme } from '@mui/material'
|
import { Stack, Typography, useTheme } from '@mui/material'
|
||||||
import React, { ChangeEvent, useEffect, useState } from 'react'
|
import React, { ChangeEvent, useEffect, useState } from 'react'
|
||||||
import { StyledAppLogo } from './styled'
|
|
||||||
import { Input } from '@/shared/Input/Input'
|
import { Input } from '@/shared/Input/Input'
|
||||||
import { Button } from '@/shared/Button/Button'
|
import { Button } from '@/shared/Button/Button'
|
||||||
import { CheckmarkIcon } from '@/assets'
|
import { CheckmarkIcon } from '@/assets'
|
||||||
@ -84,13 +83,15 @@ export const ModalSignUp = () => {
|
|||||||
}, [isModalOpened])
|
}, [isModalOpened])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open={isModalOpened} onClose={handleCloseModal}>
|
<Modal open={isModalOpened} onClose={handleCloseModal} withCloseButton={false}>
|
||||||
<Stack paddingTop={'1rem'} gap={'1rem'} component={'form'} onSubmit={handleSubmit}>
|
<Stack paddingTop={'1rem'} gap={'1rem'} component={'form'} onSubmit={handleSubmit}>
|
||||||
<Stack direction={'row'} gap={'1rem'} alignItems={'center'} alignSelf={'flex-start'}>
|
<Stack gap={'0.2rem'} padding={'0 1rem'} alignSelf={'flex-start'}>
|
||||||
<StyledAppLogo />
|
|
||||||
<Typography fontWeight={600} variant="h5">
|
<Typography fontWeight={600} variant="h5">
|
||||||
Sign up
|
Sign up
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Typography noWrap variant="body2" color={'GrayText'}>
|
||||||
|
Generate new Nostr keys
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Input
|
<Input
|
||||||
label="Username"
|
label="Username"
|
||||||
@ -117,9 +118,6 @@ export const ModalSignUp = () => {
|
|||||||
<Button fullWidth type="submit" disabled={isLoading}>
|
<Button fullWidth type="submit" disabled={isLoading}>
|
||||||
Create account {isLoading && <LoadingSpinner />}
|
Create account {isLoading && <LoadingSpinner />}
|
||||||
</Button>
|
</Button>
|
||||||
<Typography padding={'0 0.5rem'} noWrap variant="body2" color={'GrayText'}>
|
|
||||||
New keys will be generated for you
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user