Browse Source

fix: 🐛

imwald
codytseng 9 months ago
parent
commit
2489e8098d
  1. 6
      src/components/AccountManager/GenerateNewAccount.tsx
  2. 10
      src/components/AccountManager/PrivateKeyLogin.tsx

6
src/components/AccountManager/GenerateNewAccount.tsx

@ -38,7 +38,7 @@ export default function GenerateNewAccount({
'This is a private key. Do not share it with anyone. Keep it safe and secure. You will not be able to recover it if you lose it.' 'This is a private key. Do not share it with anyone. Keep it safe and secure. You will not be able to recover it if you lose it.'
)} )}
</div> </div>
<div className="space-y-1"> <div className="grid gap-2">
<Label>nsec</Label> <Label>nsec</Label>
<div className="flex gap-2"> <div className="flex gap-2">
<Input value={nsec} /> <Input value={nsec} />
@ -56,7 +56,7 @@ export default function GenerateNewAccount({
</Button> </Button>
</div> </div>
</div> </div>
<div className="space-y-1"> <div className="grid gap-2">
<Label htmlFor="password-input">{t('password')}</Label> <Label htmlFor="password-input">{t('password')}</Label>
<Input <Input
id="password-input" id="password-input"
@ -67,7 +67,7 @@ export default function GenerateNewAccount({
/> />
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<Button className="w-fit px-8" variant="secondary" onClick={back}> <Button className="w-fit px-8" variant="secondary" type="button" onClick={back}>
{t('Back')} {t('Back')}
</Button> </Button>
<Button className="flex-1" type="submit"> <Button className="flex-1" type="submit">

10
src/components/AccountManager/PrivateKeyLogin.tsx

@ -64,7 +64,7 @@ function NsecLogin({ back, onLoginSuccess }: { back: () => void; onLoginSuccess:
'Using private key login is insecure. It is recommended to use a browser extension for login, such as alby, nostr-keyx or nos2x. If you must use a private key, please set a password for encryption at minimum.' 'Using private key login is insecure. It is recommended to use a browser extension for login, such as alby, nostr-keyx or nos2x. If you must use a private key, please set a password for encryption at minimum.'
)} )}
</div> </div>
<div className="space-y-1"> <div className="grid gap-2">
<Label htmlFor="nsec-input">nsec or hex</Label> <Label htmlFor="nsec-input">nsec or hex</Label>
<Input <Input
id="nsec-input" id="nsec-input"
@ -76,7 +76,7 @@ function NsecLogin({ back, onLoginSuccess }: { back: () => void; onLoginSuccess:
/> />
{errMsg && <div className="text-xs text-destructive">{errMsg}</div>} {errMsg && <div className="text-xs text-destructive">{errMsg}</div>}
</div> </div>
<div className="space-y-1"> <div className="grid gap-2">
<Label htmlFor="password-input">{t('password')}</Label> <Label htmlFor="password-input">{t('password')}</Label>
<Input <Input
id="password-input" id="password-input"
@ -87,7 +87,7 @@ function NsecLogin({ back, onLoginSuccess }: { back: () => void; onLoginSuccess:
/> />
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<Button className="w-fit px-8" variant="secondary" onClick={back}> <Button className="w-fit px-8" variant="secondary" type="button" onClick={back}>
{t('Back')} {t('Back')}
</Button> </Button>
<Button className="flex-1" type="submit"> <Button className="flex-1" type="submit">
@ -133,7 +133,7 @@ function NcryptsecLogin({
handleLogin() handleLogin()
}} }}
> >
<div className="space-y-1"> <div className="grid gap-2">
<Label htmlFor="ncryptsec-input">ncryptsec</Label> <Label htmlFor="ncryptsec-input">ncryptsec</Label>
<Input <Input
id="ncryptsec-input" id="ncryptsec-input"
@ -146,7 +146,7 @@ function NcryptsecLogin({
{errMsg && <div className="text-xs text-destructive">{errMsg}</div>} {errMsg && <div className="text-xs text-destructive">{errMsg}</div>}
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<Button className="w-fit px-8" variant="secondary" onClick={back}> <Button className="w-fit px-8" variant="secondary" type="button" onClick={back}>
{t('Back')} {t('Back')}
</Button> </Button>
<Button className="flex-1" type="submit"> <Button className="flex-1" type="submit">

Loading…
Cancel
Save