feat(client): add cookie-backed authentication UI
- Add session-aware login, logout and protected navigation. - Send cookie credentials for API and run-event requests with localized UI stories.
This commit is contained in:
1 parent
9e4b692444
commit
92141a25fb
26 files changed
+1191
-12
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, ThemeSwitcher } from '../../ui';
|
||||
import { usePageTitle } from '../../hooks/usePageTitle';
|
||||
import liqaLogo from '../../assets/liqa.svg';
|
||||
import styles from './AuthStatusPage.module.css';
|
||||
|
||||
export function AuthStatusPage({
|
||||
failed = false,
|
||||
onRetry,
|
||||
}: {
|
||||
failed?: boolean;
|
||||
onRetry?: () => void;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
usePageTitle(t('auth.page_title'));
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<header className={styles.header}>
|
||||
<img src={liqaLogo} alt="Liqa" className={styles.logo} />
|
||||
<ThemeSwitcher />
|
||||
</header>
|
||||
<main className={styles.main} aria-live="polite">
|
||||
{failed ? (
|
||||
<section className={styles.message}>
|
||||
<p role="alert">{t('auth.session_check_failed')}</p>
|
||||
<Button type="button" size="lg" onClick={onRetry}>
|
||||
{t('auth.retry')}
|
||||
</Button>
|
||||
</section>
|
||||
) : (
|
||||
<p className={styles.message} role="status">
|
||||
{t('auth.checking_session')}
|
||||
</p>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user