diff --git a/library/components/hints/PinHint.vue b/library/components/hints/PinHint.vue index 7a75329c8..a381ff256 100644 --- a/library/components/hints/PinHint.vue +++ b/library/components/hints/PinHint.vue @@ -33,15 +33,15 @@ * · ONCE PER VISIT — it appears on every page load and stays until the reader closes * it with the ×. Nothing is remembered between loads: leaving and returning (or a * reload) shows it again, because the invitation is the point. - * · SELF-DISMISSING — first pointer-down on the map (they learned it), the - * ✕ button, or a quiet 14s timeout. Never blocks the map; pointer-events - * none except on the pill itself. + * · SELF-DISMISSING — the ✕ button, or the first PIN the reader taps (the gesture + * it teaches; a pan does not count). Never blocks the map; pointer-events none + * except on the pill itself. * * OPT-OUT via profile-config `pinHint: false`; label override via * `pinHintLabel`. Styles via useShadowStyles — a child component's ' + `${esc(item.label || item.id)}`, - { autoprint: true }, + { onNeedsTap: (printNow, cancel) => { + exportState.value = { ...exportState.value, phase: 'ready', message: hud('wall.hud.readyToPrint', 'ready to print'), pct: 100, + action: () => { exportState.value = null; printNow() }, cancel } + } }, ) + // The reader now owns the next step: the Print button in the HUD. + if (how === 'needs-tap') return } else { exportState.value = { ...exportState.value, phase: 'save', message: hud('wall.hud.saving', 'saving'), pct: 80 } download(blob, `${props.downloadPrefix}-${item.id}-poster.webp`) @@ -688,7 +696,13 @@ function download(blob, name) { setTimeout(() => URL.revokeObjectURL(a.href), 4000) } -function dismissExport() { exportState.value = null } +// A 'ready' print that the reader walks away from takes its document with it, so the browser's own Print +// menu prints the page again rather than a poster nobody asked for. +function dismissExport() { + const s = exportState.value + exportState.value = null + try { if (s && typeof s.cancel === 'function') s.cancel() } catch (_) { /* already gone */ } +} useShadowStyles( // --wall-pad-top is read back by .sec-head::before to cover the scroll-padding strip @@ -1275,7 +1289,7 @@ useShadowStyles( -