519423cb0d
- landing/app/mira/wiki: tag=mira-wiki list now shows all wiki paragraphs (depends on KBDB tag filter exposed in matrix/kbdb commit, separate repo) - landing: app/mira hub + feed split + various WIP from prior sessions - registry/components: claude_api / kbdb_create_block / kbdb_get / km_writer / platform_crypto / auth_oauth2 contracts + main.go (accumulated) - .component-builds: pkg-lock updates + index.ts adjustments (WIP) - .agents/specs/arcrun/frontend-redesign: design notes - docs/test_credentials, docs/user_requirements/arcrun-landing-page: WIP docs - cypher-executor: auth-dispatcher / wasi-shim adjustments (WIP) Includes accumulated work from prior sessions plus the wiki UI tag-filter update that surfaces the AI-generated wiki paragraphs at /mira/wiki. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
91 lines
4.0 KiB
React
91 lines
4.0 KiB
React
const Auth = ({ onNav }) => {
|
|
const [mode, setMode] = React.useState('signin');
|
|
const [email, setEmail] = React.useState('');
|
|
const [pw, setPw] = React.useState('');
|
|
const [remember, setRemember] = React.useState(true);
|
|
|
|
const submit = (e) => { e.preventDefault(); onNav('dashboard'); };
|
|
|
|
return (
|
|
<div className="auth-wrap">
|
|
<div className="hero-bg" />
|
|
<div className="hero-bg-grid" />
|
|
|
|
<div style={{position: 'absolute', top: 24, left: 24, zIndex: 2}}>
|
|
<Logo onClick={() => onNav('landing')} />
|
|
</div>
|
|
|
|
<div className="auth-card">
|
|
<h2 className="auth-h1">{mode === 'signin' ? 'Welcome back' : 'Create your account'}</h2>
|
|
<p className="auth-sub">{mode === 'signin' ? 'Sign in to your Arcrun workspace.' : 'Start building AI workflows in minutes.'}</p>
|
|
|
|
<div className="tabs">
|
|
<button className={mode === 'signin' ? 'active' : ''} onClick={() => setMode('signin')}>Sign in</button>
|
|
<button className={mode === 'signup' ? 'active' : ''} onClick={() => setMode('signup')}>Sign up</button>
|
|
</div>
|
|
|
|
<div className="oauth-row">
|
|
<button className="oauth-btn github" onClick={() => onNav('dashboard')}>
|
|
<Icon name="github" size={17} stroke={0} /> Continue with GitHub
|
|
</button>
|
|
<button className="oauth-btn google" onClick={() => onNav('dashboard')}>
|
|
<Icon name="google" size={15} stroke={0} /> Continue with Google
|
|
</button>
|
|
</div>
|
|
|
|
<div className="divider">or continue with email</div>
|
|
|
|
<form onSubmit={submit}>
|
|
{mode === 'signup' && (
|
|
<div className="field">
|
|
<label>Full name</label>
|
|
<input className="input" type="text" placeholder="Maya Rivera" />
|
|
</div>
|
|
)}
|
|
<div className="field">
|
|
<label>Work email</label>
|
|
<input className="input" type="email" placeholder="you@company.com" value={email} onChange={e => setEmail(e.target.value)} />
|
|
</div>
|
|
<div className="field">
|
|
<div className="field-row">
|
|
<label>Password</label>
|
|
{mode === 'signin' && <span className="link">Forgot password?</span>}
|
|
</div>
|
|
<input className="input" type="password" placeholder="••••••••••" value={pw} onChange={e => setPw(e.target.value)} />
|
|
</div>
|
|
|
|
{mode === 'signin' && (
|
|
<div style={{display: 'flex', alignItems: 'center', gap: 8, fontSize: 12.5, color: 'var(--text-dim)', marginBottom: 14}}>
|
|
<div onClick={() => setRemember(!remember)}
|
|
style={{width: 15, height: 15, borderRadius: 4, border: '1px solid var(--line-2)',
|
|
background: remember ? 'var(--primary)' : 'transparent',
|
|
display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer'}}>
|
|
{remember && <Icon name="check" size={11} />}
|
|
</div>
|
|
<span onClick={() => setRemember(!remember)} style={{cursor: 'pointer'}}>Keep me signed in for 30 days</span>
|
|
</div>
|
|
)}
|
|
|
|
<button className="btn btn-primary auth-submit btn-lg" type="submit">
|
|
{mode === 'signin' ? 'Sign in' : 'Create account'} <Icon name="arrow_right" size={14} />
|
|
</button>
|
|
</form>
|
|
|
|
{mode === 'signup' && (
|
|
<p style={{fontSize: 11.5, color: 'var(--text-mute)', textAlign: 'center', marginTop: 14, lineHeight: 1.5}}>
|
|
By signing up, you agree to our <span className="link" style={{fontSize: 11.5}}>Terms</span> and <span className="link" style={{fontSize: 11.5}}>Privacy Policy</span>.
|
|
</p>
|
|
)}
|
|
|
|
<div className="auth-foot">
|
|
{mode === 'signin'
|
|
? <>New to Arcrun? <span className="link" onClick={() => setMode('signup')}>Create an account</span></>
|
|
: <>Already have an account? <span className="link" onClick={() => setMode('signin')}>Sign in</span></>}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
window.Auth = Auth;
|