fix(cefr): fix ReferenceError q is not defined in handleOptionTap, bump PWA to v5.4
This commit is contained in:
1 parent
15d4987977
commit
332286b641
3 files changed
+8
-5
No files matched your search
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>Notes — Персональный тренажер и словарь английского языка</title>
|
||||
<meta name="description" content="Защищённый персональный тренажёр и словарь английского языка с интервальными повторениями SRS SM-2, контекстным поиском и озвучкой">
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=5.3">
|
||||
<link rel="stylesheet" href="/static/css/style.css?v=5.4">
|
||||
|
||||
<!-- PWA meta and icons -->
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
@@ -1383,7 +1383,7 @@
|
||||
<!-- Audio Element for native streaming -->
|
||||
<audio id="global-audio-player" preload="none"></audio>
|
||||
|
||||
<script type="module" src="/static/js/app.js?v=5.3"></script>
|
||||
<script type="module" src="/static/js/app.js?v=5.4"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -352,6 +352,9 @@ async function handleOptionTap(questionId, selectedOption, clickedBtn) {
|
||||
if (isAnswered) return;
|
||||
isAnswered = true;
|
||||
|
||||
const q = currentQuiz[currentQuestionIdx];
|
||||
const sentence = q ? q.sentence : '';
|
||||
|
||||
// Disable all options
|
||||
document.querySelectorAll('.cefr-opt-btn').forEach(b => {
|
||||
b.disabled = true;
|
||||
@@ -384,7 +387,7 @@ async function handleOptionTap(questionId, selectedOption, clickedBtn) {
|
||||
${renderOptionsBreakdown(res.options_breakdown)}
|
||||
`;
|
||||
feedbackBox.classList.remove('hidden');
|
||||
attachBreakdownListeners(feedbackBox, q.sentence);
|
||||
attachBreakdownListeners(feedbackBox, sentence);
|
||||
}
|
||||
} else {
|
||||
sessionStats.mistakes++;
|
||||
@@ -433,7 +436,7 @@ async function handleOptionTap(questionId, selectedOption, clickedBtn) {
|
||||
${renderOptionsBreakdown(res.options_breakdown)}
|
||||
`;
|
||||
feedbackBox.classList.remove('hidden');
|
||||
attachBreakdownListeners(feedbackBox, q.sentence);
|
||||
attachBreakdownListeners(feedbackBox, sentence);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Service Worker for Notes English PWA (Stage 2)
|
||||
// Strategy: Cache-first for static assets, Network-first for API calls.
|
||||
|
||||
const CACHE_NAME = 'notes-v5.3';
|
||||
const CACHE_NAME = 'notes-v5.4';
|
||||
const OFFLINE_URL = '/';
|
||||
|
||||
const PRECACHE_URLS = [
|
||||
|
||||
Reference in new issue
Block a user