feat: enforce Europe/Istanbul timezone, fix PWA image proxy, add Monday weekly login sync, and standardize English routes

This commit is contained in:
tyuXX 2026-11-09 21:45:27 +00:00
parent 56274f479b
commit 93f0bcb7a1
16 changed files with 851 additions and 175 deletions

View file

@ -435,6 +435,7 @@ document.addEventListener('DOMContentLoaded', () => {
const isWrong = q.status === 'wrong';
const studentClass = isWrong ? 'answer-student-wrong' : 'answer-student-empty';
const studentText = isWrong ? q.studentAnswer : t('exams.emptyAnswerText');
const imgSrc = toProxiedImageUrl(q.imageUrl);
html += `
<div class="question-card">
@ -453,10 +454,10 @@ document.addEventListener('DOMContentLoaded', () => {
</div>
${
q.imageUrl
imgSrc
? `
<div class="question-img-wrapper" title="${escapeHtml(t('exams.zoomHint'))}">
<img src="${escapeHtml(q.imageUrl)}" alt="Soru ${q.questionNumber}" class="question-img" loading="lazy" />
<img src="${escapeHtml(imgSrc)}" alt="Soru ${q.questionNumber}" class="question-img" loading="lazy" />
</div>
`
: `<div class="text-muted small">${escapeHtml(t('exams.noImage'))}</div>`
@ -503,8 +504,17 @@ document.addEventListener('DOMContentLoaded', () => {
}
// ----------------------------------------------------
// Utility: Escape HTML
// Utility: Proxy Portal Images & Escape HTML
// ----------------------------------------------------
function toProxiedImageUrl(rawUrl) {
if (!rawUrl) return '';
if (rawUrl.startsWith('/api/image-proxy?url=')) return rawUrl;
if (rawUrl.includes('ozelbursakulturokullari.com')) {
return `/api/image-proxy?url=${encodeURIComponent(rawUrl)}`;
}
return rawUrl;
}
function escapeHtml(str) {
if (!str) return '';
return str