fix(auth, pwa): restore api.auth.me, bump PWA cache to v5.3, and fix CEFR CSS styling

This commit is contained in:
Antigravity committed 2026-10-06 16:04:58 +03:00
1 parent a2eb26ced5
commit 15d4987977
4 files changed
+57 -6

No files matched your search

+48
View File
@@ -4227,6 +4227,54 @@ body {
width: 100%;
}
.cefr-overview-container,
.cefr-quiz-container,
.cefr-summary-container {
width: 100%;
}
.level-code {
font-weight: 800;
}
.badge-pos {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
background: var(--bg-hover);
color: var(--text-muted);
padding: 3px 8px;
border-radius: var(--radius-sm);
border: 1px solid var(--border-color);
}
.clue-icon {
font-size: 16px;
}
.clue-label {
font-size: 13px;
color: var(--text-muted);
font-weight: 500;
}
.cefr-feedback-box .fb-term {
font-size: 16px;
color: var(--text-main);
font-weight: 700;
}
.cefr-feedback-box .fb-trans {
font-size: 14.5px;
color: var(--text-main);
font-weight: 500;
}
.progress-labels-row .counts-text {
font-size: 12px;
color: var(--text-muted);
}
.cefr-header {
margin-bottom: 28px;
}
+2 -2
View File
@@ -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=3.9">
<link rel="stylesheet" href="/static/css/style.css?v=5.3">
<!-- 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.2"></script>
<script type="module" src="/static/js/app.js?v=5.3"></script>
</body>
</html>
+4 -1
View File
@@ -28,8 +28,11 @@ window.fetch = function(url, options = {}) {
export const api = {
// Auth endpoints
auth: {
async me() {
return await fetch('/api/me');
},
async check() {
const resp = await fetch('/api/me');
const resp = await this.me();
if (resp.ok) {
return await resp.json();
}
+3 -3
View File
@@ -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.2';
const CACHE_NAME = 'notes-v5.3';
const OFFLINE_URL = '/';
const PRECACHE_URLS = [
@@ -67,14 +67,14 @@ self.addEventListener('fetch', (event) => {
return;
}
// Static assets (CSS, JS, icons) → Cache-first
// Static assets (CSS, JS, icons) → Cache-first (with ignoreSearch)
if (
url.pathname.startsWith('/static/') ||
url.pathname === '/manifest.json' ||
url.pathname === '/sw.js'
) {
event.respondWith(
caches.match(request).then((cached) => {
caches.match(request, { ignoreSearch: true }).then((cached) => {
return cached || fetch(request).then((response) => {
if (response.ok) {
const clone = response.clone();