Als App installierbar (Web-Manifest, Vollbild) und Vollbild-Rückholung im Lesemodus

- Manifest mit Icons, display fullscreen; Backend liefert statische Dateien
  des Frontends direkt aus.
- Nach dem Sperren des Handys holt das nächste Umblättern das Vollbild zurück.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
team3
2026-10-09 18:29:38 +02:00
parent 48cf53db9c
commit 2067f0615f
6 changed files with 32 additions and 2 deletions

View File

@@ -46,13 +46,19 @@ function html(s) {
return cache.get(key)
}
function vor() { if (pos.value < screens.value.length - 1) pos.value++ }
// Nach dem Sperren des Handys ist das Vollbild weg; ein Tippen darf es wieder anfordern. Als installierte App unnötig.
function vollbildHolen() {
if (document.fullscreenElement || !document.documentElement.requestFullscreen) return
if (matchMedia('(display-mode: fullscreen), (display-mode: standalone)').matches) return
document.documentElement.requestFullscreen().catch(() => {})
}
function vor() { vollbildHolen(); if (pos.value < screens.value.length - 1) pos.value++ }
// Von vorn: auch die Buchansicht zurücksetzen, sonst zöge sie den Lesemodus wieder nach hinten
async function vonVorn() {
await api.positionSetzen(props.slug, props.version, { abschnitt: 'vorwort', lesemodus: 'vorwort', zuletzt: 'lesen' }).catch(() => {})
pos.value = 0
}
function zurueck() { if (pos.value > 0) pos.value-- }
function zurueck() { vollbildHolen(); if (pos.value > 0) pos.value-- }
let merkTimer = null
watch(pos, (p) => {
buehne.value?.scrollTo({ top: 0 })