Features: - Hybrid semantic + keyword quiz search (pgvector HNSW + PostgreSQL ILIKE) - AWS Bedrock Titan Embed V2 embeddings via LiteLLM proxy (0.71 cosine sim) - Multi-provider TTS: OpenAI, AWS Polly (neural), ElevenLabs, Google Cloud TTS - Unified Settings page (profile, theme, Nextcloud integration, admin shortcuts) - Good morning/afternoon greeting on dashboard - manage.py CLI: reset-password, list-users, reembed - Email verification enforced: register no longer returns JWT for unverified users - Quiz search with debounced input, semantic/keyword/title modes, highlighted snippets - TTS button: loading/playing states, voice selector locked during playback - TTS auto-stops when navigating between questions - Footer added; mobile quiz nav overflow fixed; markdown theme body selector fixed - OpenAI Alloy as default TTS voice; favicon added - SMTP configured via smtp2go; password reset rate limiting (3/hour) - PostgreSQL upgraded to pgvector/pgvector:pg16 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
24 lines
741 B
JavaScript
24 lines
741 B
JavaScript
import { Link } from 'react-router-dom'
|
|
import { useAuth } from '../context/AuthContext'
|
|
|
|
export default function Navbar() {
|
|
const { user, logout } = useAuth()
|
|
const isModerator = user?.role === 'admin' || user?.role === 'moderator'
|
|
|
|
return (
|
|
<div className="navbar">
|
|
<div className="container">
|
|
<Link to="/" className="logo">🩺 PedQuiz</Link>
|
|
{user && (
|
|
<nav>
|
|
<Link to="/">Dashboard</Link>
|
|
<Link to="/quizzes">Quizzes</Link>
|
|
{isModerator && <Link to="/upload">Upload PDF</Link>}
|
|
<Link to="/settings" title="Settings">⚙ Settings</Link>
|
|
<button onClick={logout}>Logout</button>
|
|
</nav>
|
|
)}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|