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

@ -10,7 +10,7 @@
<span class="dot-separator">&bull;</span>
<span id="syncStatus">
<% if (lastSynced) { %>
<%= t('dashboard.lastSynced') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %>
<%= t('dashboard.lastSynced') %> <%= formatTime(lastSynced) %>
<% } else { %>
<%= t('dashboard.notSynced') %>
<% } %>
@ -234,7 +234,7 @@
<div class="card-timestamps">
<% if (item.completed && item.completedAt) { %>
<span class="completed-timestamp"><%= t('dashboard.completedOn') %> <%= new Date(item.completedAt).toLocaleDateString() %></span>
<span class="completed-timestamp"><%= t('dashboard.completedOn') %> <%= formatDate(item.completedAt) %></span>
<% } %>
<span class="card-hash">#<%= item.id %></span>
</div>

View file

@ -8,7 +8,7 @@
<p class="page-subtitle">
<%= t('exams.subtitle') %>
<% if (lastSynced) { %>
• <span class="sync-time"><%= t('exams.syncedLabel') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %></span>
• <span class="sync-time"><%= t('exams.syncedLabel') %> <%= formatTime(lastSynced) %></span>
<% } %>
</p>
</div>

View file

@ -59,10 +59,10 @@
</a>
<% if (typeof studentId !== 'undefined' && studentId) { %>
<nav class="main-nav">
<a href="/dashboard" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'dashboard') || (typeof title !== 'undefined' && (title.includes('Dashboard') || title.includes('Ödev'))) ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.homework') : 'Ödevler' %></a>
<a href="/syllabus" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'syllabus') || (typeof title !== 'undefined' && (title.includes('Syllabus') || title.includes('Ders Programı'))) ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.syllabus') : 'Ders Programı' %></a>
<a href="/private-lessons" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'private-lessons') || (typeof title !== 'undefined' && (title.includes('Private Lessons') || title.includes('Özel Ders'))) ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.privateLessons') : 'Özel Ders' %></a>
<a href="/exams" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'exams') || (typeof title !== 'undefined' && (title.includes('Exam') || title.includes('Sınav'))) ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.exams') : 'Sınav Raporları' %></a>
<a href="/dashboard" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'dashboard') ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.homework') : 'Ödevler' %></a>
<a href="/syllabus" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'syllabus') ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.syllabus') : 'Ders Programı' %></a>
<a href="/private-lessons" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'private-lessons') ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.privateLessons') : 'Özel Ders' %></a>
<a href="/exams" class="nav-item <%= (typeof activePage !== 'undefined' && activePage === 'exams') ? 'active' : '' %>"><%= typeof t === 'function' ? t('nav.exams') : 'Sınav Raporları' %></a>
</nav>
<% } %>
</div>

View file

@ -8,7 +8,7 @@
<p class="page-subtitle">
<%= t('privateLessons.subtitle') %>
<% if (lastSynced) { %>
• <span class="sync-time"><%= t('privateLessons.syncedLabel') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %></span>
• <span class="sync-time"><%= t('privateLessons.syncedLabel') %> <%= formatTime(lastSynced) %></span>
<% } %>
</p>
</div>
@ -27,7 +27,7 @@
<div class="student-profile-card">
<div class="student-profile-main">
<% if (formMeta.photoUrl) { %>
<img src="<%= formMeta.photoUrl %>" alt="<%= formMeta.studentName %>" class="student-avatar" />
<img src="<%= proxyImage(formMeta.photoUrl) %>" alt="<%= formMeta.studentName %>" class="student-avatar" onerror="this.style.display='none'" />
<% } %>
<div class="student-meta">
<h3 class="student-name"><%= formMeta.studentName %></h3>
@ -148,7 +148,7 @@
</div>
<div class="lesson-card-body">
<% if (item.teacherPhoto) { %>
<img src="<%= item.teacherPhoto %>" alt="<%= item.teacherName %>" class="lesson-teacher-photo" />
<img src="<%= proxyImage(item.teacherPhoto) %>" alt="<%= item.teacherName %>" class="lesson-teacher-photo" onerror="this.style.display='none'" />
<% } else { %>
<div class="lesson-teacher-placeholder"><%= item.teacherName ? item.teacherName[0] : 'Ö' %></div>
<% } %>
@ -184,7 +184,7 @@
</div>
<div class="lesson-card-body">
<% if (item.teacherPhoto) { %>
<img src="<%= item.teacherPhoto %>" alt="<%= item.teacherName %>" class="lesson-teacher-photo" />
<img src="<%= proxyImage(item.teacherPhoto) %>" alt="<%= item.teacherName %>" class="lesson-teacher-photo" onerror="this.style.display='none'" />
<% } else { %>
<div class="lesson-teacher-placeholder"><%= item.teacherName ? item.teacherName[0] : 'Ö' %></div>
<% } %>

View file

@ -10,7 +10,7 @@
<span class="dot-separator">&bull;</span>
<span id="syllabusSyncStatus">
<% if (lastSynced) { %>
<%= t('syllabus.syncedLabel') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %>
<%= t('syllabus.syncedLabel') %> <%= formatTime(lastSynced) %>
<% } else { %>
<%= t('syllabus.notSynced') %>
<% } %>
@ -73,7 +73,7 @@
<!-- Day Tabs -->
<div class="day-tabs" id="dayTabs">
<% [1, 2, 3, 4, 5].forEach(function(d) { %>
<% const isToday = (new Date().getDay() === d); %>
<% const isToday = (istanbulDayOfWeek === d); %>
<button
type="button"
class="day-tab-btn <%= activeDay === d ? 'active' : '' %>"
@ -109,7 +109,7 @@
<div class="subject-title"><%= l.subject %></div>
<div class="teacher-info">
<% if (l.teacherPhoto) { %>
<img src="<%= l.teacherPhoto %>" class="teacher-thumb" alt="<%= l.teacher %>" onerror="this.style.display='none'">
<img src="<%= proxyImage(l.teacherPhoto) %>" class="teacher-thumb" alt="<%= l.teacher %>" onerror="this.style.display='none'">
<% } %>
<span class="teacher-name"><%= l.teacher %></span>
</div>
@ -138,7 +138,7 @@
<tr>
<th class="grid-time-th"><%= t('syllabus.periodHeader') %></th>
<% [1, 2, 3, 4, 5].forEach(function(d) { %>
<% const isToday = (new Date().getDay() === d); %>
<% const isToday = (istanbulDayOfWeek === d); %>
<th class="<%= isToday ? 'grid-today-th' : '' %>">
<%= DAY_NAMES[d] %>
<% if (isToday) { %><span class="grid-today-pill"><%= t('syllabus.todayBadge') %></span><% } %>