Revert cute greeting

merge-requests/3338/head
Alex Gleason 2025-03-02 13:28:48 -06:00
rodzic a68df6fd1a
commit a1972c8a76
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 10 dodań i 13 usunięć

Wyświetl plik

@ -7,36 +7,36 @@ import Stack from 'soapbox/components/ui/stack.tsx';
import Text from 'soapbox/components/ui/text.tsx';
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts';
import { useFeatures } from 'soapbox/hooks/useFeatures.ts';
import { useInstance } from 'soapbox/hooks/useInstance.ts';
import { useRegistrationStatus } from 'soapbox/hooks/useRegistrationStatus.ts';
const SignUpPanel = () => {
const { instance } = useInstance();
const { nostrSignup } = useFeatures();
const { isOpen } = useRegistrationStatus();
const me = useAppSelector((state) => state.me);
const dispatch = useAppDispatch();
if (me || !isOpen) return null;
function getGreeting() {
const hours = new Date().getHours();
return hours < 12 ? <FormattedMessage id='signup_panel.greeting.gm' defaultMessage='GM' /> : <FormattedMessage id='signup_panel.greeting.hey' defaultMessage='Hey there' />;
}
return (
<Stack space={2} data-testid='sign-up-panel'>
<Stack>
<Text size='lg' weight='bold'>
<FormattedMessage id='signup_panel.greeting_title' defaultMessage='{greeting}! Welcome aboard!' values={{ greeting: getGreeting() }} />
<FormattedMessage id='signup_panel.title' defaultMessage='New to {site_title}?' values={{ site_title: instance.title }} />
</Text>
<Text size='sm' theme='muted'>
<FormattedMessage id='login_panel.subtitle' defaultMessage='Dive into the best of social media!' />
<FormattedMessage id='signup_panel.subtitle' defaultMessage="Sign up now to discuss what's happening." />
</Text>
</Stack>
<HStack space={2}>
<Button
theme='tertiary'
onClick={() => dispatch(openModal('NOSTR_LOGIN'))}
onClick={nostrSignup ? () => dispatch(openModal('NOSTR_LOGIN')) : undefined}
to={nostrSignup ? undefined : '/login'}
block
>
<FormattedMessage id='account.login' defaultMessage='Log in' />
@ -44,7 +44,8 @@ const SignUpPanel = () => {
<Button
theme='primary'
onClick={() => dispatch(openModal('NOSTR_SIGNUP'))}
onClick={nostrSignup ? () => dispatch(openModal('NOSTR_SIGNUP')) : undefined}
to={nostrSignup ? undefined : '/signup'}
block
>
<FormattedMessage id='account.register' defaultMessage='Sign up' />

Wyświetl plik

@ -1028,7 +1028,6 @@
"login_external.errors.instance_fail": "The instance returned an error.",
"login_external.errors.network_fail": "Connection failed. Is a browser extension blocking it?",
"login_form.header": "Sign In",
"login_panel.subtitle": "Dive into the best of social media!",
"manage.zap_split.add": "Add",
"manage.zap_split.add_new_account": "Add New Account",
"manage.zap_split.fail_request": "Failed to update fees.",
@ -1467,9 +1466,6 @@
"settings.sessions": "Active sessions",
"settings.settings": "Settings",
"shared.tos": "Terms of Service",
"signup_panel.greeting.gm": "GM",
"signup_panel.greeting.hey": "Hey there",
"signup_panel.greeting_title": "{greeting}! Welcome aboard!",
"signup_panel.subtitle": "Sign up now to discuss what's happening.",
"signup_panel.title": "New to {site_title}?",
"site_preview.preview": "Preview",