From 0e75b24a7a2968436d1dc18c26d3bc6a170ea983 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Tue, 22 Sep 2026 21:09:29 +0200 Subject: [PATCH] Release v1.45.0 --- CHANGELOG.md | 10 +++++++++- VERSION | 2 +- static/index.html | 16 ++++++++-------- static/js/magazine.js | 30 ++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8f763d..bbe8f65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi --- +## [1.45.0] — 2026-09-22 + +### Added +- **Magazine: Title/Author auto-fill from a Headline or Author region.** A newly drawn Headline or Author region, or one retyped from the picker, now fills the article's Title/Author field automatically instead of requiring "Pick from page" by hand — only when that field is still empty, so it never overwrites something already typed or picked. + +--- + ## [1.44.0] — 2026-09-22 ### Added @@ -4328,7 +4335,8 @@ Initial feature-complete release. --- -[Unreleased]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.44.0...HEAD +[Unreleased]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.45.0...HEAD +[1.45.0]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.44.0...v1.45.0 [1.44.0]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.43.1...v1.44.0 [1.43.1]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.43.0...v1.43.1 [1.26.10]: https://github.com/mARTin-B78/tts-voice-creator-clone-and-design-2/compare/v1.26.9...v1.26.10 diff --git a/VERSION b/VERSION index 372cf40..50aceaa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.44.0 +1.45.0 diff --git a/static/index.html b/static/index.html index 18588db..78aaf1c 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,12 +27,12 @@ - - - - - - + + + + + + @@ -403,7 +403,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/magazine.js b/static/js/magazine.js index d3154a7..d35385a 100644 --- a/static/js/magazine.js +++ b/static/js/magazine.js @@ -1282,6 +1282,36 @@ function renderReview() { if (state.selectMode) magSelectRefresh(); setupMagDrawing(); setupMagBoxEdit(); + magReviewAutofillTitleAuthor(); +} + +// A Headline or Author region belonging to this article is exactly what its +// own Title/Author field should say -- confirmed live, they matched +// perfectly for a headline detected at ingestion, but nothing kept them in +// sync afterward: retyping a region to Author, or drawing a new Headline +// region by hand, left the fields blank until "Pick from page" was used +// again by hand. Only fills an EMPTY field, so it never overwrites a +// value the reader already typed or picked deliberately. +function magReviewAutofillTitleAuthor() { + const article = state.article; + if (!article) return; + const titleInput = $('mag-rev-title'); + const authorInput = $('mag-rev-author'); + if ((!titleInput || titleInput.value.trim()) && (!authorInput || authorInput.value.trim())) return; + const ownIds = new Set(article.blocks || []); + const ownBlocks = (state.layout.blocks || []).filter((b) => ownIds.has(b.id)); + if (titleInput && !titleInput.value.trim()) { + const block = ownBlocks.find((b) => b.type === 'title' && (b.text || '').trim()); + if (block) { titleInput.value = block.text.trim(); article.title = titleInput.value; } + } + if (authorInput && !authorInput.value.trim()) { + const block = ownBlocks.find((b) => b.type === 'byline' && (b.text || '').trim()); + // Same "Von "/"by " credit-prefix strip the initial ingestion pass uses + // (core/magazine.py's looks_like_byline) — approximated here since this + // runs client-side without a round trip. + const name = block ? block.text.replace(/^(von|by)\s+/i, '').trim() : ''; + if (name) { authorInput.value = name; article.author = name; } + } } // Tracks every ticked block across ALL reviewed pages of this article, not