Datenschutz-Hinweis: wegklickbar (localStorage), Notes Mobile-sichtbar — SW by-v429
This commit is contained in:
parent
08e20ab50f
commit
679dbdd862
3 changed files with 34 additions and 13 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '407'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '408'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -761,14 +761,18 @@ window.Page_diary = (() => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Datenschutz-Hinweis: Einträge sind privat
|
// Datenschutz-Hinweis: einmalig anzeigen, per Klick wegklicken
|
||||||
const privacyNotice = `
|
const privacyNotice = localStorage.getItem('by_diary_privacy_ack') ? '' : `
|
||||||
<div style="font-size:var(--text-xs);color:var(--c-text-muted);background:var(--c-surface-2);
|
<div id="diary-privacy-notice" style="font-size:var(--text-xs);color:var(--c-text-muted);
|
||||||
border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);
|
background:var(--c-surface-2);border-radius:var(--radius-md);
|
||||||
display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3)">
|
padding:var(--space-2) var(--space-3);display:flex;align-items:center;
|
||||||
|
gap:var(--space-2);margin-bottom:var(--space-3);cursor:pointer"
|
||||||
|
title="Klicken zum Schließen">
|
||||||
<svg class="ph-icon" aria-hidden="true" style="width:14px;height:14px;flex-shrink:0">
|
<svg class="ph-icon" aria-hidden="true" style="width:14px;height:14px;flex-shrink:0">
|
||||||
<use href="/icons/phosphor.svg#lock-simple"></use></svg>
|
<use href="/icons/phosphor.svg#lock-simple"></use></svg>
|
||||||
Deine Tagebucheinträge sind privat — nur du kannst sie sehen.
|
Deine Tagebucheinträge sind privat — nur du kannst sie sehen.
|
||||||
|
<svg class="ph-icon" aria-hidden="true" style="width:12px;height:12px;margin-left:auto;flex-shrink:0;opacity:0.5">
|
||||||
|
<use href="/icons/phosphor.svg#x"></use></svg>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
// Gruppieren nach Jahr-Monat (Anzeigereihenfolge: chronologisch absteigend)
|
// Gruppieren nach Jahr-Monat (Anzeigereihenfolge: chronologisch absteigend)
|
||||||
|
|
@ -790,6 +794,12 @@ window.Page_diary = (() => {
|
||||||
|
|
||||||
listEl.innerHTML = html;
|
listEl.innerHTML = html;
|
||||||
|
|
||||||
|
// Datenschutz-Hinweis wegklicken
|
||||||
|
listEl.querySelector('#diary-privacy-notice')?.addEventListener('click', () => {
|
||||||
|
localStorage.setItem('by_diary_privacy_ack', '1');
|
||||||
|
listEl.querySelector('#diary-privacy-notice')?.remove();
|
||||||
|
});
|
||||||
|
|
||||||
// Events an Karten binden
|
// Events an Karten binden
|
||||||
listEl.querySelectorAll('[data-entry-id]').forEach(card => {
|
listEl.querySelectorAll('[data-entry-id]').forEach(card => {
|
||||||
const id = parseInt(card.dataset.entryId);
|
const id = parseInt(card.dataset.entryId);
|
||||||
|
|
|
||||||
|
|
@ -139,14 +139,19 @@ window.Page_notes = (() => {
|
||||||
<span class="notes-count">${_notes.length} Notiz${_notes.length !== 1 ? 'en' : ''}</span>
|
<span class="notes-count">${_notes.length} Notiz${_notes.length !== 1 ? 'en' : ''}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Datenschutz-Hinweis -->
|
<!-- Datenschutz-Hinweis (einmalig, wegklickbar) -->
|
||||||
<div style="font-size:var(--text-xs);color:var(--c-text-muted);background:var(--c-surface-2);
|
${localStorage.getItem('by_notes_privacy_ack') ? '' : `
|
||||||
border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);
|
<div id="notes-privacy-notice" style="font-size:var(--text-xs);color:var(--c-text-secondary);
|
||||||
display:flex;align-items:center;gap:var(--space-2)">
|
background:var(--c-surface-2);border-radius:var(--radius-md);
|
||||||
<svg class="ph-icon" aria-hidden="true" style="width:14px;height:14px;flex-shrink:0">
|
padding:var(--space-3) var(--space-3);display:flex;align-items:center;
|
||||||
|
gap:var(--space-2);cursor:pointer;border:1px solid var(--c-border-light)"
|
||||||
|
title="Klicken zum Schließen">
|
||||||
|
<svg class="ph-icon" aria-hidden="true" style="width:16px;height:16px;flex-shrink:0;color:var(--c-primary)">
|
||||||
<use href="/icons/phosphor.svg#lock-simple"></use></svg>
|
<use href="/icons/phosphor.svg#lock-simple"></use></svg>
|
||||||
Alle Notizen sind privat — nur du kannst sie lesen.
|
<span>Alle Notizen sind privat — nur du kannst sie lesen.</span>
|
||||||
</div>
|
<svg class="ph-icon" aria-hidden="true" style="width:12px;height:12px;margin-left:auto;flex-shrink:0;opacity:0.4">
|
||||||
|
<use href="/icons/phosphor.svg#x"></use></svg>
|
||||||
|
</div>`}
|
||||||
|
|
||||||
<!-- KI-Panel -->
|
<!-- KI-Panel -->
|
||||||
${kiEnabled ? _kiPanelHtml() : ''}
|
${kiEnabled ? _kiPanelHtml() : ''}
|
||||||
|
|
@ -350,6 +355,12 @@ window.Page_notes = (() => {
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
function _bindEvents() {
|
function _bindEvents() {
|
||||||
|
|
||||||
|
// Datenschutz-Hinweis wegklicken
|
||||||
|
_container.querySelector('#notes-privacy-notice')?.addEventListener('click', () => {
|
||||||
|
localStorage.setItem('by_notes_privacy_ack', '1');
|
||||||
|
_container.querySelector('#notes-privacy-notice')?.remove();
|
||||||
|
});
|
||||||
|
|
||||||
// Filter-Chips
|
// Filter-Chips
|
||||||
_container.querySelectorAll('.notes-chip').forEach(btn => {
|
_container.querySelectorAll('.notes-chip').forEach(btn => {
|
||||||
btn.addEventListener('click', () => {
|
btn.addEventListener('click', () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue