NostrSigninModal: add EmojiGraphic, use an emoji on each step
This commit is contained in:
parent
20328961fd
commit
407b19321d
4 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import Emoji from 'soapbox/components/ui/emoji/emoji';
|
||||||
|
|
||||||
|
interface IEmojiGraphic {
|
||||||
|
emoji: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Large emoji with a background for display purposes (eg breaking up a page). */
|
||||||
|
const EmojiGraphic: React.FC<IEmojiGraphic> = ({ emoji }) => {
|
||||||
|
return (
|
||||||
|
<div className='flex items-center justify-center'>
|
||||||
|
<div className='my-6 rounded-full bg-gray-100 p-8 dark:bg-gray-800'>
|
||||||
|
<Emoji className='h-24 w-24' emoji={emoji} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default EmojiGraphic;
|
|
@ -6,6 +6,8 @@ import Button from 'soapbox/components/ui/button/button';
|
||||||
import Stack from 'soapbox/components/ui/stack/stack';
|
import Stack from 'soapbox/components/ui/stack/stack';
|
||||||
import { useAppDispatch } from 'soapbox/hooks';
|
import { useAppDispatch } from 'soapbox/hooks';
|
||||||
|
|
||||||
|
import EmojiGraphic from '../components/emoji-graphic';
|
||||||
|
|
||||||
interface IExtensionStep {
|
interface IExtensionStep {
|
||||||
setStep: (step: number) => void;
|
setStep: (step: number) => void;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +20,8 @@ const ExtensionStep: React.FC<IExtensionStep> = ({ setStep }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className='my-6' space={3}>
|
<Stack className='my-6' space={3}>
|
||||||
|
<EmojiGraphic emoji='🔐' />
|
||||||
|
|
||||||
<Button theme='accent' size='lg' onClick={onClick}>
|
<Button theme='accent' size='lg' onClick={onClick}>
|
||||||
<FormattedMessage id='nostr_signin.siwe.action' defaultMessage='Sign in with extension' />
|
<FormattedMessage id='nostr_signin.siwe.action' defaultMessage='Sign in with extension' />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import HStack from 'soapbox/components/ui/hstack/hstack';
|
||||||
import Input from 'soapbox/components/ui/input/input';
|
import Input from 'soapbox/components/ui/input/input';
|
||||||
import Stack from 'soapbox/components/ui/stack/stack';
|
import Stack from 'soapbox/components/ui/stack/stack';
|
||||||
|
|
||||||
|
import EmojiGraphic from '../components/emoji-graphic';
|
||||||
import NostrExtensionIndicator from '../nostr-extension-indicator';
|
import NostrExtensionIndicator from '../nostr-extension-indicator';
|
||||||
|
|
||||||
interface IIdentityStep {
|
interface IIdentityStep {
|
||||||
|
@ -19,6 +20,8 @@ const IdentityStep: React.FC<IIdentityStep> = ({ username, setUsername, setStep
|
||||||
<Stack className='mt-3' space={3}>
|
<Stack className='mt-3' space={3}>
|
||||||
<NostrExtensionIndicator />
|
<NostrExtensionIndicator />
|
||||||
|
|
||||||
|
<EmojiGraphic emoji='🕵️' />
|
||||||
|
|
||||||
<FormGroup labelText='Username'>
|
<FormGroup labelText='Username'>
|
||||||
<Input
|
<Input
|
||||||
icon={require('@tabler/icons/at.svg')}
|
icon={require('@tabler/icons/at.svg')}
|
||||||
|
|
|
@ -3,6 +3,7 @@ import React from 'react';
|
||||||
import Button from 'soapbox/components/ui/button/button';
|
import Button from 'soapbox/components/ui/button/button';
|
||||||
import Stack from 'soapbox/components/ui/stack/stack';
|
import Stack from 'soapbox/components/ui/stack/stack';
|
||||||
|
|
||||||
|
import EmojiGraphic from '../components/emoji-graphic';
|
||||||
import NostrExtensionIndicator from '../nostr-extension-indicator';
|
import NostrExtensionIndicator from '../nostr-extension-indicator';
|
||||||
|
|
||||||
interface IKeyStep {
|
interface IKeyStep {
|
||||||
|
@ -14,6 +15,8 @@ const KeyStep: React.FC<IKeyStep> = ({ setStep }) => {
|
||||||
<Stack className='my-3' space={6} justifyContent='center'>
|
<Stack className='my-3' space={6} justifyContent='center'>
|
||||||
<NostrExtensionIndicator />
|
<NostrExtensionIndicator />
|
||||||
|
|
||||||
|
<EmojiGraphic emoji='🔑' />
|
||||||
|
|
||||||
<Stack space={3} alignItems='center'>
|
<Stack space={3} alignItems='center'>
|
||||||
<Button theme='accent' size='lg'>
|
<Button theme='accent' size='lg'>
|
||||||
Generate key
|
Generate key
|
||||||
|
|
Loading…
Reference in a new issue