From c1d86ec13dc9abcd7f7f695ccf1ba9d4db4b41e4 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Wed, 9 Sep 2026 17:14:27 +0200 Subject: [PATCH] fix: return All magazines to library --- CHANGELOG.md | 12 ++++++++++++ VERSION | 2 +- static/js/magazine.js | 24 +++++++++++++++++++++--- static/sections/s-magazine.html | 2 +- static/style.css | 2 ++ 5 files changed, 37 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68a797c..97e835e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,18 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi --- +## [1.26.5] — 2026-09-09 + +### Fixed +- **“All magazines” Returned to the Wrong Place.** The contents-page button now clears the remembered active issue, + refreshes the actual magazine library, and reliably returns to it instead of only switching an internal view. + +### Added +- **Magazine First-Page Thumbnails.** Each magazine card now displays page 1 of its source PDF as a lazy-loaded, + aspect-ratio-preserving thumbnail. + +--- + ## [1.26.4] — 2026-09-09 ### Added diff --git a/VERSION b/VERSION index ea0928c..8fe00a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.26.4 +1.26.5 diff --git a/static/js/magazine.js b/static/js/magazine.js index 7fe0e16..3ffb8f1 100644 --- a/static/js/magazine.js +++ b/static/js/magazine.js @@ -142,10 +142,12 @@ function renderLibrary() { : ing.status === 'running' ? 'ingesting…' : ing.status === 'failed' ? 'failed' : 'not ingested'; + const thumbnail = 'First page of ' + esc(d.title || 'magazine') +
+      ''; return ''; + thumbnail + '' + esc(d.title || 'Untitled') + '' + + '' + esc(d.issue || '') + '' + badge + ''; }).join(''); } @@ -1469,6 +1471,21 @@ function magBackToContents() { magRefreshArticles(); } +async function magBackToLibrary() { + // This button was previously labeled "All magazines" but only switched the + // current view; after a reload magInit could immediately reopen the saved + // document. Clear that remembered document and refresh the actual library. + magPause(); + magStopQueue(); + state.driving = false; + magForgetLastDoc(); + state.doc = null; + state.article = null; + magShow('library'); + try { await magLoadLibrary(); } + catch (e) { say('Could not refresh magazines: ' + e.message, 'err'); } +} + // ── Driving mode ────────────────────────────────────────────────────────── // Large, minimal-interaction controls for listening without looking at the // screen (see Manual.md's planned driving-mode behaviour). Reuses whatever @@ -1553,6 +1570,7 @@ root.magSetPane = magSetPane; root.magPeekPage = magPeekPage; root.magShow = magShow; root.magBackToContents = magBackToContents; +root.magBackToLibrary = magBackToLibrary; root.magGeneratePodcast = magGeneratePodcast; root.magPlayPodcast = magPlayPodcast; root.magPlayAll = magPlayAll; diff --git a/static/sections/s-magazine.html b/static/sections/s-magazine.html index 5baf5cc..0245542 100644 --- a/static/sections/s-magazine.html +++ b/static/sections/s-magazine.html @@ -41,7 +41,7 @@