Files
breakpilot-lehrer/studio-v2/app/vocab-worksheet/components/QRCodeModal.tsx
Benjamin Admin 909d0729f6
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 45s
CI / test-go-edu-search (push) Successful in 43s
CI / test-python-klausur (push) Failing after 2m51s
CI / test-python-agent-core (push) Successful in 36s
CI / test-nodejs-website (push) Successful in 37s
Add SmartSpellChecker + refactor vocab-worksheet page.tsx
SmartSpellChecker (klausur-service):
- Language-aware OCR post-correction without LLMs
- Dual-dictionary heuristic for EN/DE language detection
- Context-based a/I disambiguation via bigram lookup
- Multi-digit substitution (sch00l→school)
- Cross-language guard (don't false-correct DE words in EN column)
- Umlaut correction (Schuler→Schüler, uber→über)
- Integrated into spell_review_entries_sync() pipeline
- 31 tests, 9ms/100 corrections

Vocab-worksheet refactoring (studio-v2):
- Split 2337-line page.tsx into 14 files
- Custom hook useVocabWorksheet.ts (all state + logic)
- 9 components in components/ directory
- types.ts, constants.ts for shared definitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 12:25:01 +02:00

32 lines
999 B
TypeScript

'use client'
import React from 'react'
import { QRCodeUpload } from '@/components/QRCodeUpload'
import type { VocabWorksheetHook } from '../types'
export function QRCodeModal({ h }: { h: VocabWorksheetHook }) {
const { isDark } = h
return (
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" onClick={() => h.setShowQRModal(false)} />
<div className={`relative w-full max-w-md rounded-3xl ${
isDark ? 'bg-slate-900' : 'bg-white'
}`}>
<QRCodeUpload
sessionId={h.uploadSessionId}
onClose={() => h.setShowQRModal(false)}
onFilesChanged={(files) => {
h.setMobileUploadedFiles(files)
if (files.length > 0) {
h.setSelectedMobileFile(files[files.length - 1])
h.setDirectFile(null)
h.setSelectedDocumentId(null)
}
}}
/>
</div>
</div>
)
}