fix: resolve design token violations and locale bug

- Add --color-warning-translucent and --color-soon tokens to tokens.css
- Replace hardcoded font-size 1.4rem with var(--text-xl) in dashboard.css
- Replace hardcoded rgba color with var(--color-warning-translucent)
- Remove duplicate .task-item__meta--overdue rule
- Fix hardcoded 'de-DE' locale: use formatTime() from i18n.js
- Fix formatDueDate: don't show time (23:59) when no due_time is set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-04-21 23:38:56 +02:00
parent d9be970e9d
commit 7b04d5a48a
3 changed files with 7 additions and 10 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ function formatDueDate(dateStr, timeStr) {
}
if (calDayDiff === 0) {
return { text: `${t('dashboard.dueToday')} ${formatTime(dueDate)}`, overdue: false, soon: true };
return { text: timeStr ? `${t('dashboard.dueToday')} ${formatTime(dueDate)}` : t('dashboard.dueToday'), overdue: false, soon: true };
}
if (calDayDiff === 1) {
@@ -195,7 +195,7 @@ function renderGreeting(user, stats = {}) {
${t('dashboard.todayMealChip', { title: esc(todayMealTitle) })}
</span>`);
let time = new Date().toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' });
const time = formatTime(new Date());
return `
<div class="widget-greeting">