From d9707a14ba642a5dbee4f8905aa154ee7a17c469 Mon Sep 17 00:00:00 2001 From: Roni Laukkarinen Date: Sun, 1 Feb 2026 17:05:35 +0200 Subject: [PATCH] Improve book info readability, simplify to reading time only --- CHANGELOG.md | 3 ++- src/App.jsx | 24 ++++++++---------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc11b0..95e8f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 2026-02-01: 1.0.2 -* Add reading time and page info to book metadata display +* Add reading time to book metadata display +* Improve book info readability ### 2026-02-01: 1.0.1 diff --git a/src/App.jsx b/src/App.jsx index 7cb2148..864fb5e 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -233,9 +233,6 @@ function formatReadingTime(minutes) { return `${hours}h ${mins}m`; } -// Words per page (standard estimate) -const WORDS_PER_PAGE = 250; - function App() { // Load settings only once on mount const [savedSettings] = useState(() => loadSettings()); @@ -676,13 +673,7 @@ function App() {
{bookMetadata.author}
)}
- {(() => { - const currentPage = Math.floor(currentIndex / WORDS_PER_PAGE) + 1; - const totalPages = Math.max(1, Math.ceil(words.length / WORDS_PER_PAGE)); - const remainingWords = words.length - currentIndex; - const remainingMinutes = remainingWords / wpm; - return `Page ${currentPage}/${totalPages} ยท ${formatReadingTime(remainingMinutes)} left`; - })()} + {formatReadingTime((words.length - currentIndex) / wpm)} left
@@ -1325,23 +1316,24 @@ const styles = { minWidth: 0, }, bookTitle: { - fontSize: "0.75rem", + fontSize: "0.8rem", fontWeight: "500", - color: "#888", + color: "#999", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", + marginBottom: "2px", }, bookAuthor: { - fontSize: "0.7rem", - color: "#555", + fontSize: "0.75rem", + color: "#666", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", }, bookStats: { - fontSize: "0.65rem", - color: "#444", + fontSize: "0.7rem", + color: "#555", marginTop: "2px", }, };