Sprint 14: Multi-Fix-Batch — SW by-v428, APP_VER 407
KI/Symptom-Check: JSON-Code-Fence stripping in ki.py, Dringlichkeit-Map mit Phosphor-Icons
Gewicht-Sync: health.js aktualisiert appState.activeDog.gewicht_kg auch bei Bearbeitung
Giftköder: icon:'check-circle' → UI.icon('check-circle') in emptyState-Call
Forum-Pills: overflow:hidden + text-overflow:ellipsis auf Desktop und Mobile
Moderation: Admins für Moderatoren unsichtbar, keine Aktions-Buttons auf Admins
Notizblock: Filter-Chips wrap 2-zeilig auf Desktop (min-width:1024px)
Tagebuch: Datenschutz-Hinweis "nur du kannst sie sehen", Sitter sieht keine bestehenden Einträge
diary.py: Sitter-Zugriff gibt leere Liste zurück (GET), Erstellen bleibt erlaubt
This commit is contained in:
parent
02120bb532
commit
016eb52d83
12 changed files with 111 additions and 33 deletions
|
|
@ -736,6 +736,19 @@ window.Page_diary = (() => {
|
|||
const listEl = _container.querySelector('#diary-list');
|
||||
if (!listEl) return;
|
||||
|
||||
const dog = _appState.activeDog;
|
||||
const isSitter = dog?.is_guest === true;
|
||||
|
||||
// Sitter: Einträge grundsätzlich ausgeblendet — nur Hinweis + FAB bleibt aktiv
|
||||
if (isSitter) {
|
||||
listEl.innerHTML = UI.emptyState({
|
||||
icon: UI.icon('lock-simple'),
|
||||
title: 'Einträge nicht sichtbar',
|
||||
text: 'Du kannst neue Einträge hinzufügen, aber keine bestehenden Einträge sehen.',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (_entries.length === 0) {
|
||||
listEl.innerHTML = UI.emptyState({
|
||||
icon: UI.icon('book-open'),
|
||||
|
|
@ -748,6 +761,16 @@ window.Page_diary = (() => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Datenschutz-Hinweis: Einträge sind privat
|
||||
const privacyNotice = `
|
||||
<div style="font-size:var(--text-xs);color:var(--c-text-muted);background:var(--c-surface-2);
|
||||
border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);
|
||||
display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3)">
|
||||
<svg class="ph-icon" aria-hidden="true" style="width:14px;height:14px;flex-shrink:0">
|
||||
<use href="/icons/phosphor.svg#lock-simple"></use></svg>
|
||||
Deine Tagebucheinträge sind privat — nur du kannst sie sehen.
|
||||
</div>`;
|
||||
|
||||
// Gruppieren nach Jahr-Monat (Anzeigereihenfolge: chronologisch absteigend)
|
||||
const groups = new Map();
|
||||
_entries.forEach(e => {
|
||||
|
|
@ -756,7 +779,7 @@ window.Page_diary = (() => {
|
|||
groups.get(key).push(e);
|
||||
});
|
||||
|
||||
let html = '';
|
||||
let html = privacyNotice;
|
||||
groups.forEach((items, key) => {
|
||||
const monthLabel = key === 'unbekannt' ? 'Datum unbekannt' : _formatMonth(key);
|
||||
html += `<div class="diary-month-header">${monthLabel}</div>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue