Skip to content

Commit

Permalink
fix: add message about disabled eosc sign in
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst committed Jul 4, 2024
1 parent b517a02 commit 33a12ec
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/components/auth/SignInForm.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
width: 100%;
height: 100%;
}

&:disabled {
opacity: 50%;
cursor: not-allowed;
pointer-events: none;
}
}

.form-fields {
Expand Down Expand Up @@ -78,3 +84,16 @@
font-weight: var(--font-weight-medium);
line-height: var(--line-height-none);
}

.disabled-note {
display: flex;
gap: 0.75rem;
color: var(--color-negative-600);

& > svg {
flex-shrink: 0;
width: 1.25rem;
height: 1.25rem;
margin-block: 4px;
}
}
11 changes: 11 additions & 0 deletions src/components/auth/SignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { useI18n } from '@/lib/core/i18n/useI18n'
import { routes } from '@/lib/core/navigation/routes'
import { isNonEmptyString } from '@/lib/utils'
import EoscLogo from '~/public/assets/images/eosc.svg?symbol-icon'
import { Icon } from '@/lib/core/ui/Icon/Icon'
import AlertIcon from '@/lib/core/ui/icons/alert.svg?symbol-icon'

export type SignInFormValues = SignInInput

Expand All @@ -23,6 +25,7 @@ export function SignInForm(): JSX.Element {
const buttonRef = useRef<HTMLButtonElement>(null)
const { buttonProps } = useButton(
{
isDisabled: true,
onPress() {
signInWithOAuth()
},
Expand Down Expand Up @@ -66,6 +69,14 @@ export function SignInForm(): JSX.Element {
<EoscLogo aria-hidden />
Sign in with EOSC
</button>
<div className={css['disabled-note']}>
<Icon icon={AlertIcon} />
<span>
We are currently experiencing a technical issue with the EOSC-login that we are working
diligently to resolve. Please bear with us as we work to restore access as soon as
possible. Thank you for your patience and understanding.
</span>
</div>
<div role="separator" className={css['separator']}>
<span>{t(['common', 'auth', 'sign-in-alternative'])}</span>
<div className={css['line']} />
Expand Down

0 comments on commit 33a12ec

Please sign in to comment.