Merge branch 'update-keygen-step' into 'main'
Remove copy button of key-gen-step Closes #1754 See merge request soapbox-pub/soapbox!3157
This commit is contained in:
commit
7130c51ae8
|
@ -5,9 +5,8 @@ import { FormattedMessage } from 'react-intl';
|
||||||
import { fetchAccount } from 'soapbox/actions/accounts';
|
import { fetchAccount } from 'soapbox/actions/accounts';
|
||||||
import { logInNostr } from 'soapbox/actions/nostr';
|
import { logInNostr } from 'soapbox/actions/nostr';
|
||||||
import { closeSidebar } from 'soapbox/actions/sidebar';
|
import { closeSidebar } from 'soapbox/actions/sidebar';
|
||||||
import CopyableInput from 'soapbox/components/copyable-input';
|
|
||||||
import EmojiGraphic from 'soapbox/components/emoji-graphic';
|
import EmojiGraphic from 'soapbox/components/emoji-graphic';
|
||||||
import { Button, Stack, Modal, FormGroup, Text, Tooltip, HStack } from 'soapbox/components/ui';
|
import { Button, Stack, Modal, FormGroup, Text, Tooltip, HStack, Input } from 'soapbox/components/ui';
|
||||||
import { useNostr } from 'soapbox/contexts/nostr-context';
|
import { useNostr } from 'soapbox/contexts/nostr-context';
|
||||||
import { NKeys } from 'soapbox/features/nostr/keys';
|
import { NKeys } from 'soapbox/features/nostr/keys';
|
||||||
import { useAppDispatch, useInstance } from 'soapbox/hooks';
|
import { useAppDispatch, useInstance } from 'soapbox/hooks';
|
||||||
|
@ -43,8 +42,6 @@ const KeygenStep: React.FC<IKeygenStep> = ({ onClose }) => {
|
||||||
setDownloaded(true);
|
setDownloaded(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCopy = () => setDownloaded(true);
|
|
||||||
|
|
||||||
const handleNext = async () => {
|
const handleNext = async () => {
|
||||||
const signer = NKeys.add(secretKey);
|
const signer = NKeys.add(secretKey);
|
||||||
const pubkey = await signer.getPublicKey();
|
const pubkey = await signer.getPublicKey();
|
||||||
|
@ -79,7 +76,13 @@ const KeygenStep: React.FC<IKeygenStep> = ({ onClose }) => {
|
||||||
<EmojiGraphic emoji='🔑' />
|
<EmojiGraphic emoji='🔑' />
|
||||||
|
|
||||||
<FormGroup labelText={<FormattedMessage id='nostr_signup.keygen.label_text' defaultMessage='Secret Key' />}>
|
<FormGroup labelText={<FormattedMessage id='nostr_signup.keygen.label_text' defaultMessage='Secret Key' />}>
|
||||||
<CopyableInput value={nsec} type='password' onCopy={handleCopy} />
|
<Input
|
||||||
|
type={'password'}
|
||||||
|
value={nsec}
|
||||||
|
className='rounded-lg'
|
||||||
|
outerClassName='grow'
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<Stack className='rounded-xl bg-gray-100 p-4 dark:bg-gray-800'>
|
<Stack className='rounded-xl bg-gray-100 p-4 dark:bg-gray-800'>
|
||||||
|
|
Loading…
Reference in New Issue