fix: Empty-State-Hinweis nur wenn wirklich keine Seite existiert
All checks were successful
Deploy bericht / deploy (push) Successful in 1s
All checks were successful
Deploy bericht / deploy (push) Successful in 1s
Vorher blieb 'Seite wählen oder Fotos hinzufügen' auch sichtbar wenn eine Seite geladen wurde — die .empty-Klasse wurde nur beim Seiten- wechsel per loadPage() entfernt, nicht beim initialen Load. Resultat: bei einem Bericht mit bestehender Seite erschien der Text mitten im weißen Canvas. Fix: beim init() wird die Klasse nur gesetzt wenn überhaupt keine Page-Thumbs existieren (Bericht wirklich leer). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> [deploy]
This commit is contained in:
parent
195942a2f9
commit
f55da13234
1 changed files with 3 additions and 2 deletions
|
|
@ -63,9 +63,10 @@
|
|||
|
||||
/* ---------- Init ---------- */
|
||||
function init() {
|
||||
// Leer-Zustand: Canvas-Wrap als A4-Hochformat-Platzhalter markieren
|
||||
// Leer-Zustand nur wenn GAR keine Seite existiert
|
||||
const wrapEmpty = document.querySelector('.bericht-canvas-wrap');
|
||||
if (wrapEmpty) wrapEmpty.classList.add('empty');
|
||||
const hasAnyThumb = !!document.querySelector('#bericht-page-list .page-thumb');
|
||||
if (wrapEmpty && !hasAnyThumb) wrapEmpty.classList.add('empty');
|
||||
|
||||
// Gespeicherte Einstellungen anwenden — VOR Fabric-Init
|
||||
const s = loadSettings();
|
||||
|
|
|
|||
Loading…
Reference in a new issue