diff --git a/crabfit-frontend/public/i18n/en/event.json b/crabfit-frontend/public/i18n/en/event.json index c281bed..38f1863 100644 --- a/crabfit-frontend/public/i18n/en/event.json +++ b/crabfit-frontend/public/i18n/en/event.json @@ -17,6 +17,7 @@ "name": "Your name", "password": "Password (optional)", "button": "Login", + "logout_button": "Sign out", "info": "These details are only for this event. Use a password to prevent others from changing your availability.", "timezone": "Your time zone", diff --git a/crabfit-frontend/src/components/Button/buttonStyle.ts b/crabfit-frontend/src/components/Button/buttonStyle.ts index 766769a..bc75e35 100644 --- a/crabfit-frontend/src/components/Button/buttonStyle.ts +++ b/crabfit-frontend/src/components/Button/buttonStyle.ts @@ -83,7 +83,7 @@ export const Pressable = styled.button` left: calc(50% - 12px); height: 18px; width: 18px; - border: 3px solid #FFF; + border: 3px solid ${props.primaryColor ? '#FFF' : props.theme.background}; border-left-color: transparent; border-radius: 100px; animation: load .5s linear infinite; @@ -92,7 +92,7 @@ export const Pressable = styled.button` @media (prefers-reduced-motion: reduce) { &:after { content: 'loading...'; - color: #FFF; + color: ${props.primaryColor ? '#FFF' : props.theme.background}; animation: none; width: initial; height: initial; diff --git a/crabfit-frontend/src/pages/Event/Event.tsx b/crabfit-frontend/src/pages/Event/Event.tsx index 5f4ce82..1505d6a 100644 --- a/crabfit-frontend/src/pages/Event/Event.tsx +++ b/crabfit-frontend/src/pages/Event/Event.tsx @@ -51,7 +51,7 @@ const Event = (props) => { const { t } = useTranslation(['common', 'event']); - const { register, handleSubmit, setFocus } = useForm(); + const { register, handleSubmit, setFocus, reset } = useForm(); const { id } = props.match.params; const { offline } = props; const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone); @@ -270,6 +270,7 @@ const Event = (props) => { gtag('event', 'login', { 'event_category': 'event', }); + reset(); } }; @@ -321,7 +322,14 @@ const Event = (props) => { {user ? ( -

{t('event:form.signed_in', { name: user.name })}

+
+

{t('event:form.signed_in', { name: user.name })}

+ +
) : ( <>

{t('event:form.signed_out')}