diff --git a/apps/web/src/features/auth/LoginPage.test.tsx b/apps/web/src/features/auth/LoginPage.test.tsx index 7a01ad8..b931ebe 100644 --- a/apps/web/src/features/auth/LoginPage.test.tsx +++ b/apps/web/src/features/auth/LoginPage.test.tsx @@ -22,8 +22,14 @@ describe('LoginPage', () => { expect(link.getAttribute('href')).toContain('github.com/mariuspruvot/helprs') }) - test('renders tagline', () => { + test('renders tagline explaining interactive skills', () => { const { container } = render() + expect(container.textContent).toContain('Interactive skills') expect(container.textContent).toContain('Self-hosted') }) + + test('renders enter-to-continue hint', () => { + const { container } = render() + expect(container.textContent?.toLowerCase()).toContain('enter') + }) }) diff --git a/apps/web/src/features/auth/LoginPage.tsx b/apps/web/src/features/auth/LoginPage.tsx index 2af3d54..9d7f352 100644 --- a/apps/web/src/features/auth/LoginPage.tsx +++ b/apps/web/src/features/auth/LoginPage.tsx @@ -1,28 +1,69 @@ +import { useEffect } from 'react' import { Button, GrainOverlay } from '../../shared/components' const API_BASE = import.meta.env.VITE_API_URL ?? 'http://localhost:8000' const GITHUB_URL = 'https://github.com/mariuspruvot/helprs' +const SIGN_IN_URL = `${API_BASE}/api/v1/auth/github` + +function GitHubIcon() { + return ( + + ) +} export default function LoginPage() { + useEffect(() => { + const handler = (e: KeyboardEvent) => { + if (e.key !== 'Enter' || e.defaultPrevented) return + const tag = (e.target as HTMLElement | null)?.tagName + if (tag === 'A' || tag === 'BUTTON' || tag === 'INPUT' || tag === 'TEXTAREA') return + window.location.href = SIGN_IN_URL + } + window.addEventListener('keydown', handler) + return () => window.removeEventListener('keydown', handler) + }, []) + return (
- helPRs +

+ helPRs +

- Claude Code on your PRs. Self-hosted. + Interactive skills for your pull requests. +

+

+ Review, challenge, quiz {'\u2014'} powered by Claude Code. Self-hosted.

- - + + +

+ press{' '} + + {'\u21B5'} enter + {' '} + to continue +

+ View on GitHub {'\u2192'} diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 9c4dad7..147644d 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -153,6 +153,14 @@ html, body, #root { 50% { opacity: 0.3; } } +/* Terminal cursor blink */ +@keyframes cursor-blink { + 50% { opacity: 0; } +} +.animate-cursor { + animation: cursor-blink 1.1s steps(2, end) infinite; +} + /* Overline letter-spacing */ .overline { font-family: var(--font-family-mono);