diff --git a/src/App.jsx b/src/App.jsx index 2620972..3beb3a1 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -4,6 +4,7 @@ import { PRONOUNS, POSSESSIVES, POSS_ENDINGS, combinePoss, LEVELS, wechselExample, createSession, bumpStreak, currentStreak, weekDots, nounForm, ADJ_ENDINGS, ADJ_CLASS_LABEL, ADJ_CLASS_HINT, DER_ENDINGS, + CASE_VERBS, VERB_BY_NAME, VERB_CASE_LABEL, DATIVE_VERBS, } from './engine.js'; // ═══════════════════════════════════════════ @@ -56,6 +57,7 @@ const Access = { const TABS = [ {id:'prep', label:'Prepositions'}, + {id:'verb', label:'Verbs'}, {id:'article', label:'Articles'}, {id:'poss', label:'Possessives'}, {id:'pronoun', label:'Pronouns'}, @@ -345,7 +347,7 @@ export default function App() { const rc = res.filter(Boolean).length; const cur = LEVELS.find(l=>l.id===lv); - const chartSection = scr === 'menu' ? tab : (q?.type === 'wechselContext' ? 'prep' : q?.type === 'chunk' ? 'article' : (q?.type === 'adjective' || q?.type === 'adjClass') ? 'adj' : (q?.type || tab)); + const chartSection = scr === 'menu' ? tab : (q?.type === 'wechselContext' ? 'prep' : q?.type === 'chunk' ? 'article' : (q?.type === 'adjective' || q?.type === 'adjClass') ? 'adj' : (q?.type === 'verbCase' || q?.type === 'verbSentence') ? 'verb' : (q?.type || tab)); const nextInTab = nextLevelInTab(lv); const quickActive = !!cur?.daily || !!st.auto; const quickTick = quickActive && rev && ok; @@ -768,6 +770,76 @@ export default function App() { )} + {/* PRACTICE: which case does this verb take? */} + {scr === 'practice' && q?.type === 'verbCase' && ( +
+
Which case does this verb take?
+
{q.verb.de}
+
{q.verb.en}
+
+ +
+ {!rev ? ( +
+ {q.choices.map((val,i) => ( + + ))} +
+ ) : quickTick ? : ( + setRule('verb')}/> + )} +
+ )} + + {/* PRACTICE: the verb decides the case, in a sentence */} + {scr === 'practice' && q?.type === 'verbSentence' && ( +
+
+ {q.sentence.split('_____').map((part,i,a)=>( + + {part} + {i < a.length-1 && ( + {rev ? q.ans : ' '} + )} + + ))} +
+ + + + + + + +
+ The verb decides + +
+ + {!rev ? ( + + ) : quickTick ? : ( + setRule('verb')}/> + )} +
+ )} + {/* PRACTICE: adjective endings */} {scr === 'practice' && (q?.type === 'adjective' || q?.type === 'adjClass') && (
@@ -904,7 +976,9 @@ export default function App() {
{chart && setChart(false)} onRule={kind => { setChart(false); setRule(kind || true); }}/>} - {rule && (rule === 'adj' ? setRule(false)}/> : setRule(false)}/>)} + {rule && (rule === 'adj' ? setRule(false)}/> + : rule === 'verb' ? setRule(false)}/> + : setRule(false)}/>)} {nounInfo && setNounInfo(null)}/>}