diff --git a/src/components/ui/column/column.tsx b/src/components/ui/column/column.tsx index e94b1a3f5..3d7a738be 100644 --- a/src/components/ui/column/column.tsx +++ b/src/components/ui/column/column.tsx @@ -59,15 +59,13 @@ export interface IColumn { children?: React.ReactNode; /** Action for the ColumnHeader, displayed at the end. */ action?: React.ReactNode; - /** Determines if the action for the ColumnHeader is displayed on the right. */ - actionRightPosition?: boolean; /** Column size, inherited from Card. */ size?: CardSizes; } /** A backdrop for the main section of the UI. */ const Column = React.forwardRef((props, ref): JSX.Element => { - const { backHref, children, label, transparent = false, withHeader = true, className, bodyClassName, action, actionRightPosition, size } = props; + const { backHref, children, label, transparent = false, withHeader = true, className, bodyClassName, action, size } = props; const soapboxConfig = useSoapboxConfig(); const [isScrolled, setIsScrolled] = useState(false); @@ -108,7 +106,6 @@ const Column = React.forwardRef((props, ref): JSX.Eleme 'p-4 sm:p-0 sm:pb-4 black:p-4': transparent, '-mt-4 p-4': size !== 'lg' && !transparent, '-mt-4 p-4 sm:-mt-6 sm:-mx-6 sm:p-6': size === 'lg' && !transparent, - 'w-full': actionRightPosition, })} action={action} /> diff --git a/src/components/ui/divider/divider.tsx b/src/components/ui/divider/divider.tsx index 691525bb5..821f55fd6 100644 --- a/src/components/ui/divider/divider.tsx +++ b/src/components/ui/divider/divider.tsx @@ -18,7 +18,7 @@ const Divider = ({ text, textSize = 'md' }: IDivider) => ( {text && (
- + {text}
diff --git a/src/components/ui/language-dropdown/language-dropdown.tsx b/src/components/ui/language-dropdown/language-dropdown.tsx index cc6f8ac3b..826dd984d 100644 --- a/src/components/ui/language-dropdown/language-dropdown.tsx +++ b/src/components/ui/language-dropdown/language-dropdown.tsx @@ -58,7 +58,7 @@ const LanguageDropdown = () => { return ( { languageIcon === '' ? - + : - + + {isLogin && + + + + + + + + } + diff --git a/src/features/ui/components/modals/nostr-login-modal/steps/key-add-step.tsx b/src/features/ui/components/modals/nostr-login-modal/steps/key-add-step.tsx index d53008b86..a9fbec91a 100644 --- a/src/features/ui/components/modals/nostr-login-modal/steps/key-add-step.tsx +++ b/src/features/ui/components/modals/nostr-login-modal/steps/key-add-step.tsx @@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl'; import { logInNostr } from 'soapbox/actions/nostr'; import EmojiGraphic from 'soapbox/components/emoji-graphic'; -import { Button, Stack, Modal, Input, FormGroup, Form } from 'soapbox/components/ui'; +import { Button, Stack, Modal, Input, FormGroup, Form, Divider } from 'soapbox/components/ui'; import { NKeys } from 'soapbox/features/nostr/keys'; import { useAppDispatch } from 'soapbox/hooks'; @@ -43,9 +43,8 @@ const KeyAddStep: React.FC = ({ onClose }) => { }; return ( - } onClose={onClose}> + } width='sm' onClose={onClose}> - @@ -60,11 +59,20 @@ const KeyAddStep: React.FC = ({ onClose }) => { /> - + + + + + + + + + + ); diff --git a/src/features/ui/components/modals/nostr-signup-modal/nostr-signup-modal.tsx b/src/features/ui/components/modals/nostr-signup-modal/nostr-signup-modal.tsx index a5d47acce..dcbd516f7 100644 --- a/src/features/ui/components/modals/nostr-signup-modal/nostr-signup-modal.tsx +++ b/src/features/ui/components/modals/nostr-signup-modal/nostr-signup-modal.tsx @@ -11,7 +11,7 @@ interface INostrSignupModal { onClose: (type?: string) => void; } -const NostrSigninModal: React.FC = ({ onClose }) => { +const NostrSignUpModal: React.FC = ({ onClose }) => { const [step, setStep] = useState(window.nostr ? 'extension' : 'key'); const handleClose = () => onClose('NOSTR_SIGNUP'); @@ -28,6 +28,6 @@ const NostrSigninModal: React.FC = ({ onClose }) => { } }; -export default NostrSigninModal; +export default NostrSignUpModal; export type { Step }; diff --git a/src/features/ui/components/modals/nostr-signup-modal/steps/key-step.tsx b/src/features/ui/components/modals/nostr-signup-modal/steps/key-step.tsx index 9e203ced0..272992fc9 100644 --- a/src/features/ui/components/modals/nostr-signup-modal/steps/key-step.tsx +++ b/src/features/ui/components/modals/nostr-signup-modal/steps/key-step.tsx @@ -3,7 +3,7 @@ import { FormattedMessage } from 'react-intl'; import { openModal } from 'soapbox/actions/modals'; import EmojiGraphic from 'soapbox/components/emoji-graphic'; -import { Button, Stack, Modal } from 'soapbox/components/ui'; +import { Button, Stack, Modal, Text, Divider } from 'soapbox/components/ui'; import { useAppDispatch } from 'soapbox/hooks'; import NostrExtensionIndicator from '../../nostr-login-modal/components/nostr-extension-indicator'; @@ -23,9 +23,12 @@ const KeyStep: React.FC = ({ setStep, onClose }) => { }; return ( - } onClose={onClose}> - - + } width='sm' onClose={onClose}> + + + + + @@ -38,6 +41,13 @@ const KeyStep: React.FC = ({ setStep, onClose }) => { + + + + + + + ); diff --git a/src/features/ui/components/modals/nostr-signup-modal/steps/keygen-step.tsx b/src/features/ui/components/modals/nostr-signup-modal/steps/keygen-step.tsx index 364ad11cd..f4692f05b 100644 --- a/src/features/ui/components/modals/nostr-signup-modal/steps/keygen-step.tsx +++ b/src/features/ui/components/modals/nostr-signup-modal/steps/keygen-step.tsx @@ -7,7 +7,7 @@ import { logInNostr } from 'soapbox/actions/nostr'; import { startOnboarding } from 'soapbox/actions/onboarding'; import CopyableInput from 'soapbox/components/copyable-input'; import EmojiGraphic from 'soapbox/components/emoji-graphic'; -import { Button, Stack, Modal, FormGroup, Text, Tooltip } from 'soapbox/components/ui'; +import { Button, Stack, Modal, FormGroup, Text, Tooltip, HStack } from 'soapbox/components/ui'; import { useNostr } from 'soapbox/contexts/nostr-context'; import { NKeys } from 'soapbox/features/nostr/keys'; import { useAppDispatch, useInstance } from 'soapbox/hooks'; @@ -68,33 +68,33 @@ const KeygenStep: React.FC = ({ onClose }) => { }; return ( - } onClose={onClose}> + } width='sm' onClose={onClose}> - - - - }> - + - + + + + - + + ); diff --git a/src/locales/en.json b/src/locales/en.json index 731aa929b..b8de11393 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1165,12 +1165,17 @@ "new_group_panel.title": "Create Group", "nostr_extension.found": "Sign in with browser extension.", "nostr_extension.not_found": "Browser extension not found.", + "nostr_login.siwe.action": "Log in with extension", + "nostr_login.siwe.alt": "Log in with key", + "nostr_login.siwe.sign_up": "Sign Up", + "nostr_login.siwe.title": "Log in", "nostr_panel.message": "Connect with any Nostr client.", "nostr_panel.title": "Nostr Relay", "nostr_relays.read_only": "Read-only", "nostr_relays.read_write": "Read & write", "nostr_relays.title": "Relays", "nostr_relays.write_only": "Write-only", + "nostr_signin.siwe.welcome": "Welcome to {site_title}", "nostr_signup.has_key": "I already have a key", "nostr_signup.key-add.key_button": "Add Key", "nostr_signup.key-add.title": "Import Key", @@ -1181,9 +1186,10 @@ "nostr_signup.keygen.next": "Next", "nostr_signup.keygen.text": "Back up your secret key in a secure place. If lost, your account cannot be recovered. Never share your secret key with anyone.", "nostr_signup.keygen.title": "Your new key", - "nostr_signup.siwe.action": "Sign in with extension", - "nostr_signup.siwe.alt": "Sign in with key", - "nostr_signup.siwe.title": "Sign in", + "nostr_signup.siwe.action": "Sign up with extension", + "nostr_signup.siwe.alt": "Don't have an extension?", + "nostr_signup.siwe.new_user": "New on {site_title}?", + "nostr_signup.siwe.title": "Sign up", "notification.ditto:name_grant": "You were granted the name {acct}", "notification.ditto:zap": "{name} zapped you {amount} sats", "notification.favourite": "{name} liked your post", diff --git a/src/locales/pt-BR.json b/src/locales/pt-BR.json index 150f2ddd9..7b0df0296 100644 --- a/src/locales/pt-BR.json +++ b/src/locales/pt-BR.json @@ -1153,7 +1153,7 @@ "new_group_panel.action": "Criar Grupo", "new_group_panel.subtitle": "Não encontrou o que procura? Crie seu próprio grupo privado ou público.", "new_group_panel.title": "Criar Grupo", - "nostr_extension.found": "Faça login com a extensão do navegador.", + "nostr_extension.found": "Faça login com a extensão do navegador.", "nostr_extension.not_found": "Extensão do navegador não encontrada.", "nostr_panel.message": "Conecte-se com qualquer cliente Nostr.", "nostr_panel.title": "Relay Nostr", @@ -1161,19 +1161,25 @@ "nostr_relays.read_write": "Leitura e escrita", "nostr_relays.title": "Relays", "nostr_relays.write_only": "Somente escrita", + "nostr_login.siwe.action": "Entrar com uma extensão", + "nostr_login.siwe.alt": "Entrar com uma chave", + "nostr_login.siwe.title": "Entrar", + "nostr_login.siwe.sign_up": "Cadastrar", "nostr_signup.has_key": "Eu já tenho uma chave", "nostr_signup.key-add.key_button": "Adicionar chave", "nostr_signup.key-add.title": "Importar Chave", "nostr_signup.key.title": "Você precisa de uma chave para continuar", "nostr_signup.key_generate": "Gerar chave", - "nostr_signup.keygen.title": "Sua nova chave", "nostr_signup.keygen.download_key_button": "Baixar chave", "nostr_signup.keygen.label_text": "Chave secreta", - "nostr_signup.keygen.text": "Faça backup da sua chave secreta em um lugar seguro. Se for perdida, sua conta não poderá ser recuperada. Nunca compartilhe sua chave secreta com ninguém.", "nostr_signup.keygen.next": "Proximo", - "nostr_signup.siwe.action": "Faça login com a extensão", - "nostr_signup.siwe.alt": "Faça login com a chave", - "nostr_signup.siwe.title": "Entrar", + "nostr_signup.keygen.text": "Faça backup da sua chave secreta em um lugar seguro. Se for perdida, sua conta não poderá ser recuperada. Nunca compartilhe sua chave secreta com ninguém.", + "nostr_signup.keygen.title": "Sua nova chave", + "nostr_signup.siwe.alt": "Não tem uma extensão?", + "nostr_signup.siwe.action": "Cadastre-se com uma extensão", + "nostr_signup.siwe.new_user": "Novo no {site_title}?", + "nostr_signup.siwe.title": "Cadastrar", + "nostr_signin.siwe.welcome": "Bem-vindo ao {site_title}", "notification.ditto:name_grant": "Você recebeu o nome {acct}", "notification.favourite": "{name} curtiu a sua postagem", "notification.follow": "{name} te seguiu", diff --git a/src/utils/features.ts b/src/utils/features.ts index b411de57c..ac757dd1b 100644 --- a/src/utils/features.ts +++ b/src/utils/features.ts @@ -900,6 +900,9 @@ const getInstanceFeatures = (instance: Instance) => { v.software === DITTO, ]), + /** Ability to filter the public timeline by language. */ + publicTimelineLanguage: v.software === DITTO, + /** * Ability to quote posts in statuses. * @see POST /api/v1/statuses