Merge branch 'nip44-required' into 'main'
nip44 browser extension is required for Ditto See merge request soapbox-pub/soapbox!3195
This commit is contained in:
commit
38bc1641c5
|
@ -15,10 +15,9 @@ const NostrExtensionIndicator: React.FC = () => {
|
|||
dispatch(closeModal());
|
||||
};
|
||||
|
||||
function renderBody(): React.ReactNode {
|
||||
if (window.nostr && window.nostr.nip44) {
|
||||
return (
|
||||
<Stack space={2} className='flex items-center rounded-lg bg-gray-100 p-2 dark:bg-gray-800'>
|
||||
<Text size='xs'>
|
||||
{window.nostr ? (
|
||||
<FormattedMessage
|
||||
id='nostr_extension.found'
|
||||
defaultMessage='<link>Sign in</link> with browser extension.'
|
||||
|
@ -26,9 +25,28 @@ const NostrExtensionIndicator: React.FC = () => {
|
|||
link: (node) => <button type='button' className='underline' onClick={onClick}>{node}</button>,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage id='nostr_extension.not_found' defaultMessage='Browser extension not found.' />
|
||||
)}
|
||||
);
|
||||
} else if (window.nostr) {
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='nostr_extension.not_supported'
|
||||
defaultMessage='Browser extension not supported. Please upgrade to the latest version.'
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='nostr_extension.not_found'
|
||||
defaultMessage='Browser extension not found.'
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack space={2} className='flex items-center rounded-lg bg-gray-100 p-2 dark:bg-gray-800'>
|
||||
<Text size='xs'>
|
||||
{renderBody()}
|
||||
</Text>
|
||||
</Stack>
|
||||
);
|
||||
|
|
|
@ -1167,6 +1167,7 @@
|
|||
"new_group_panel.title": "Create Group",
|
||||
"nostr_extension.found": "<link>Sign in</link> with browser extension.",
|
||||
"nostr_extension.not_found": "Browser extension not found.",
|
||||
"nostr_extension.not_supported": "Browser extension not supported. Please upgrade to the latest version.",
|
||||
"nostr_login.siwe.action": "Log in with extension",
|
||||
"nostr_login.siwe.alt": "Log in with key",
|
||||
"nostr_login.siwe.sign_up": "Sign Up",
|
||||
|
|
Loading…
Reference in New Issue