From 03fd6e2e6fa3a5a67a9210fc6c17b74ddee15e57 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Tue, 10 Feb 2026 00:56:34 +0800 Subject: [PATCH] feat(metadata): collapsible sections in book details, closes #3217 (#3243) --- .../public/locales/ar/translation.json | 3 +- .../public/locales/bn/translation.json | 3 +- .../public/locales/bo/translation.json | 3 +- .../public/locales/de/translation.json | 3 +- .../public/locales/el/translation.json | 3 +- .../public/locales/es/translation.json | 3 +- .../public/locales/fa/translation.json | 3 +- .../public/locales/fr/translation.json | 3 +- .../public/locales/he/translation.json | 47 +--- .../public/locales/hi/translation.json | 3 +- .../public/locales/id/translation.json | 3 +- .../public/locales/it/translation.json | 3 +- .../public/locales/ja/translation.json | 3 +- .../public/locales/ko/translation.json | 3 +- .../public/locales/ms/translation.json | 3 +- .../public/locales/nl/translation.json | 3 +- .../public/locales/pl/translation.json | 3 +- .../public/locales/pt/translation.json | 3 +- .../public/locales/ru/translation.json | 3 +- .../public/locales/si/translation.json | 3 +- .../public/locales/sv/translation.json | 3 +- .../public/locales/ta/translation.json | 3 +- .../public/locales/th/translation.json | 3 +- .../public/locales/tr/translation.json | 3 +- .../public/locales/uk/translation.json | 3 +- .../public/locales/vi/translation.json | 3 +- .../public/locales/zh-CN/translation.json | 3 +- .../public/locales/zh-TW/translation.json | 3 +- .../components/metadata/BookDetailView.tsx | 206 +++++++++++++----- apps/readest-app/src/services/constants.ts | 4 + apps/readest-app/src/types/settings.ts | 3 + 31 files changed, 220 insertions(+), 121 deletions(-) diff --git a/apps/readest-app/public/locales/ar/translation.json b/apps/readest-app/public/locales/ar/translation.json index 9a46e760..f354d9db 100644 --- a/apps/readest-app/public/locales/ar/translation.json +++ b/apps/readest-app/public/locales/ar/translation.json @@ -1079,5 +1079,6 @@ "Authors": "المؤلفون", "Books": "الكتب", "Groups": "المجموعات", - "Back to TTS Location": "العودة إلى موقع القراءة الآلية" + "Back to TTS Location": "العودة إلى موقع القراءة الآلية", + "Metadata": "بيانات وصفية" } diff --git a/apps/readest-app/public/locales/bn/translation.json b/apps/readest-app/public/locales/bn/translation.json index 5a1f50e9..27aba163 100644 --- a/apps/readest-app/public/locales/bn/translation.json +++ b/apps/readest-app/public/locales/bn/translation.json @@ -1031,5 +1031,6 @@ "Authors": "লেখকগণ", "Books": "বই", "Groups": "দল", - "Back to TTS Location": "টিটিএস অবস্থানে ফিরে যান" + "Back to TTS Location": "টিটিএস অবস্থানে ফিরে যান", + "Metadata": "মেটাডেটা" } diff --git a/apps/readest-app/public/locales/bo/translation.json b/apps/readest-app/public/locales/bo/translation.json index c3cc5d27..be11bfe4 100644 --- a/apps/readest-app/public/locales/bo/translation.json +++ b/apps/readest-app/public/locales/bo/translation.json @@ -1019,5 +1019,6 @@ "Authors": "རྩོམ་པ་པོ།", "Books": "དཔེ་ཆ།", "Groups": "ཚོགས་པ།", - "Back to TTS Location": "TTS གནས་སར་ཕྱིར་ལོག་པ།" + "Back to TTS Location": "TTS གནས་སར་ཕྱིར་ལོག་པ།", + "Metadata": "གནད་སྨིན་གོ་དོན།" } diff --git a/apps/readest-app/public/locales/de/translation.json b/apps/readest-app/public/locales/de/translation.json index 90f4bafb..4b766048 100644 --- a/apps/readest-app/public/locales/de/translation.json +++ b/apps/readest-app/public/locales/de/translation.json @@ -1031,5 +1031,6 @@ "Authors": "Autoren", "Books": "Bücher", "Groups": "Gruppen", - "Back to TTS Location": "Zurück zur TTS-Position" + "Back to TTS Location": "Zurück zur TTS-Position", + "Metadata": "Metadaten" } diff --git a/apps/readest-app/public/locales/el/translation.json b/apps/readest-app/public/locales/el/translation.json index f52dba8b..ab3b3118 100644 --- a/apps/readest-app/public/locales/el/translation.json +++ b/apps/readest-app/public/locales/el/translation.json @@ -1031,5 +1031,6 @@ "Authors": "Συγγραφείς", "Books": "Βιβλία", "Groups": "Ομάδες", - "Back to TTS Location": "Επιστροφή στην τοποθεσία TTS" + "Back to TTS Location": "Επιστροφή στην τοποθεσία TTS", + "Metadata": "Μεταδεδομένα" } diff --git a/apps/readest-app/public/locales/es/translation.json b/apps/readest-app/public/locales/es/translation.json index 8b0229d3..3764dfae 100644 --- a/apps/readest-app/public/locales/es/translation.json +++ b/apps/readest-app/public/locales/es/translation.json @@ -1043,5 +1043,6 @@ "Authors": "Autores", "Books": "Libros", "Groups": "Grupos", - "Back to TTS Location": "Volver a la ubicación de TTS" + "Back to TTS Location": "Volver a la ubicación de TTS", + "Metadata": "Metadatos" } diff --git a/apps/readest-app/public/locales/fa/translation.json b/apps/readest-app/public/locales/fa/translation.json index 4e435a8d..653c1586 100644 --- a/apps/readest-app/public/locales/fa/translation.json +++ b/apps/readest-app/public/locales/fa/translation.json @@ -1031,5 +1031,6 @@ "Authors": "نویسندگان", "Books": "کتاب‌ها", "Groups": "گروه‌ها", - "Back to TTS Location": "بازگشت به مکان TTS" + "Back to TTS Location": "بازگشت به مکان TTS", + "Metadata": "فراداده" } diff --git a/apps/readest-app/public/locales/fr/translation.json b/apps/readest-app/public/locales/fr/translation.json index de267c7e..756cbdd8 100644 --- a/apps/readest-app/public/locales/fr/translation.json +++ b/apps/readest-app/public/locales/fr/translation.json @@ -1043,5 +1043,6 @@ "Authors": "Auteurs", "Books": "Livres", "Groups": "Groupes", - "Back to TTS Location": "Retour à l'emplacement TTS" + "Back to TTS Location": "Retour à l'emplacement TTS", + "Metadata": "Métadonnées" } diff --git a/apps/readest-app/public/locales/he/translation.json b/apps/readest-app/public/locales/he/translation.json index 92db7993..91d43329 100644 --- a/apps/readest-app/public/locales/he/translation.json +++ b/apps/readest-app/public/locales/he/translation.json @@ -1001,50 +1001,6 @@ "Select Video": "בחר וידאו", "Select Audio": "בחר אודיו", "Select Fonts": "בחר גופנים", - "Invalid file type. Please select {{types}}.": "סוג קובץ לא תקין. אנא בחר {{types}}.", - "Add Files": "הוסף קבצים", - "Failed to download the book. Please check your internet connection and try again.": "הורדת הספר נכשלה. אנא בדוק את חיבור האינטרנט שלך ונסה שוב.", - "An unexpected error occurred. Please try again later.": "אירעה שגיאה בלתי צפויה. אנא נסה שוב מאוחר יותר.", - "Please enter a valid email address and password.": "אנא הזן כתובת אימייל וסיסמה תקינות.", - "Verification email sent. Please check your inbox.": "אימייל אימות נשלח. אנא בדוק את תיבת הדואר הנכנס שלך.", - "Verification failed. Please try again or contact support.": "האימות נכשל. אנא נסה שוב או צור קשר עם התמיכה.", - "Email updated successfully.": "האימייל עודכן בהצלחה.", - "Password reset email sent. Please check your inbox.": "אימייל לאיפוס סיסמה נשלח. אנא בדוק את תיבת הדואר הנכנס שלך.", - "Account deleted successfully.": "החשבון נמחק בהצלחה.", - "Failed to update email. Please try again.": "עדכון האימייל נכשל. אנא נסה שוב.", - "Failed to reset password. Please try again.": "איפוס הסיסמה נכשל. אנא נסה שוב.", - "Invalid name. Please enter a valid name.": "שם לא תקין. אנא הזן שם תקין.", - "Profile updated successfully.": "הפרופיל עודכן בהצלחה.", - "Failed to update profile. Please try again.": "עדכון הפרופיל נכשל. אנא נסה שוב.", - "Cloud storage is full. Please upgrade your plan for more space.": "אחסון הענן מלא. אנא שדרג את התוכנית שלך לקבלת מקום נוסף.", - "File uploaded successfully.": "הקובץ הועלה בהצלחה.", - "Failed to upload file. Please try again.": "העלאת הקובץ נכשלה. אנא נסה שוב.", - "File deleted successfully from cloud.": "הקובץ נמחק בהצלחה מהענן.", - "Cloud backup removed successfully.": "גיבוי הענן הוסר בהצלחה.", - "Failed to remove cloud backup.": "הסרת גיבוי הענן נכשלה.", - "Reading progress updated.": "התקדמות הקריאה עודכנה.", - "Failed to update reading progress.": "עדכון התקדמות הקריאה נכשל.", - "Syncing...": "מסנכרן...", - "Sync completed.": "הסנכרון הושלם.", - "Sync failed. Please check your connection.": "הסנכרון נכשל. אנא בדוק את החיבור שלך.", - "Update check failed.": "הבדיקה לעדכונים נכשלה.", - "New version {{version}} is available for download.": "גרסה חדשה {{version}} זמינה להורדה.", - "Export successful.": "הייצוא הצליח.", - "Export failed.": "הייצוא נכשל.", - "File not found.": "הקובץ לא נמצא.", - "Book re-indexed successfully.": "הספר אונדקס מחדש בהצלחה.", - "Failed to re-index book.": "אינדוקס מחדש של הספר נכשל.", - "Indexing in progress...": "אינדוקס בתהליך...", - "Please enter a valid server URL.": "אנא הזן כתובת שרת תקינה.", - "Connected to KOReader Sync server.": "מחובר לשרת סנכרון KOReader.", - "Failed to connect to KOReader Sync server.": "התחברות לשרת סנכרון KOReader נכשלה.", - "Subscription details updated.": "פרטי המנוי עודכנו.", - "Failed to load subscription details.": "טעינת פרטי המנוי נכשלה.", - "Session expired. Please sign in again.": "תוקף הפגישה פג. אנא התחבר שוב.", - "Subscription cancelled successfully.": "המנוי בוטל בהצלחה.", - "Failed to cancel subscription.": "ביטול המנוי נכשל.", - "Storage management is not available in offline mode.": "ניהול אחסון אינו זמין במצב אופליין.", - "Please enter a display name.": "אנא הזן שם לתצוגה.", "Storage": "אחסון", "{{percentage}}% of Cloud Sync Space Used.": "{{percentage}}% משטח האחסון בענן בשימוש.", "Translation Characters": "תווי תרגום", @@ -1087,5 +1043,6 @@ "Sunset": "שקיעה", "Reveal in Finder": "הצג ב-Finder", "Reveal in File Explorer": "הצג בסייר הקבצים", - "Reveal in Folder": "הצג בתיקייה" + "Reveal in Folder": "הצג בתיקייה", + "Metadata": "מטא-נתונים" } diff --git a/apps/readest-app/public/locales/hi/translation.json b/apps/readest-app/public/locales/hi/translation.json index 7fc83e73..08013c7b 100644 --- a/apps/readest-app/public/locales/hi/translation.json +++ b/apps/readest-app/public/locales/hi/translation.json @@ -1031,5 +1031,6 @@ "Authors": "लेखक", "Books": "पुस्तकें", "Groups": "समूह", - "Back to TTS Location": "टीटीएस स्थान पर वापस जाएं" + "Back to TTS Location": "टीटीएस स्थान पर वापस जाएं", + "Metadata": "मेटाडाटा" } diff --git a/apps/readest-app/public/locales/id/translation.json b/apps/readest-app/public/locales/id/translation.json index 6bdde26b..7584b944 100644 --- a/apps/readest-app/public/locales/id/translation.json +++ b/apps/readest-app/public/locales/id/translation.json @@ -1019,5 +1019,6 @@ "Authors": "Penulis", "Books": "Buku", "Groups": "Grup", - "Back to TTS Location": "Kembali ke Lokasi TTS" + "Back to TTS Location": "Kembali ke Lokasi TTS", + "Metadata": "Metadata" } diff --git a/apps/readest-app/public/locales/it/translation.json b/apps/readest-app/public/locales/it/translation.json index 6c32d964..12c685ef 100644 --- a/apps/readest-app/public/locales/it/translation.json +++ b/apps/readest-app/public/locales/it/translation.json @@ -1043,5 +1043,6 @@ "Authors": "Autori", "Books": "Libri", "Groups": "Gruppi", - "Back to TTS Location": "Torna alla posizione TTS" + "Back to TTS Location": "Torna alla posizione TTS", + "Metadata": "Metadati" } diff --git a/apps/readest-app/public/locales/ja/translation.json b/apps/readest-app/public/locales/ja/translation.json index 79aed417..7ffc1d9c 100644 --- a/apps/readest-app/public/locales/ja/translation.json +++ b/apps/readest-app/public/locales/ja/translation.json @@ -1019,5 +1019,6 @@ "Authors": "著者", "Books": "書籍", "Groups": "グループ", - "Back to TTS Location": "TTSの位置に戻る" + "Back to TTS Location": "TTSの位置に戻る", + "Metadata": "メタデータ" } diff --git a/apps/readest-app/public/locales/ko/translation.json b/apps/readest-app/public/locales/ko/translation.json index bd07d4d1..ed378062 100644 --- a/apps/readest-app/public/locales/ko/translation.json +++ b/apps/readest-app/public/locales/ko/translation.json @@ -1019,5 +1019,6 @@ "Authors": "저자", "Books": "도서", "Groups": "그룹", - "Back to TTS Location": "TTS 위치로 돌아가기" + "Back to TTS Location": "TTS 위치로 돌아가기", + "Metadata": "메타데이터" } diff --git a/apps/readest-app/public/locales/ms/translation.json b/apps/readest-app/public/locales/ms/translation.json index fcd1d4ac..81c11021 100644 --- a/apps/readest-app/public/locales/ms/translation.json +++ b/apps/readest-app/public/locales/ms/translation.json @@ -1019,5 +1019,6 @@ "Authors": "Penulis", "Books": "Buku", "Groups": "Kumpulan", - "Back to TTS Location": "Kembali ke Lokasi TTS" + "Back to TTS Location": "Kembali ke Lokasi TTS", + "Metadata": "Metadata" } diff --git a/apps/readest-app/public/locales/nl/translation.json b/apps/readest-app/public/locales/nl/translation.json index e36dc1ed..1d832c33 100644 --- a/apps/readest-app/public/locales/nl/translation.json +++ b/apps/readest-app/public/locales/nl/translation.json @@ -1031,5 +1031,6 @@ "Authors": "Auteurs", "Books": "Boeken", "Groups": "Groepen", - "Back to TTS Location": "Terug naar TTS-locatie" + "Back to TTS Location": "Terug naar TTS-locatie", + "Metadata": "Metadata" } diff --git a/apps/readest-app/public/locales/pl/translation.json b/apps/readest-app/public/locales/pl/translation.json index 5ad58dc2..53318e6f 100644 --- a/apps/readest-app/public/locales/pl/translation.json +++ b/apps/readest-app/public/locales/pl/translation.json @@ -1055,5 +1055,6 @@ "Authors": "Autorzy", "Books": "Książki", "Groups": "Grupy", - "Back to TTS Location": "Powrót do lokalizacji TTS" + "Back to TTS Location": "Powrót do lokalizacji TTS", + "Metadata": "Metadane" } diff --git a/apps/readest-app/public/locales/pt/translation.json b/apps/readest-app/public/locales/pt/translation.json index 54d75054..3c96b738 100644 --- a/apps/readest-app/public/locales/pt/translation.json +++ b/apps/readest-app/public/locales/pt/translation.json @@ -1043,5 +1043,6 @@ "Authors": "Autores", "Books": "Livros", "Groups": "Grupos", - "Back to TTS Location": "Voltar para a localização do TTS" + "Back to TTS Location": "Voltar para a localização do TTS", + "Metadata": "Metadados" } diff --git a/apps/readest-app/public/locales/ru/translation.json b/apps/readest-app/public/locales/ru/translation.json index 1d00efb8..22d32195 100644 --- a/apps/readest-app/public/locales/ru/translation.json +++ b/apps/readest-app/public/locales/ru/translation.json @@ -1055,5 +1055,6 @@ "Authors": "Авторы", "Books": "Книги", "Groups": "Группы", - "Back to TTS Location": "Вернуться к местоположению TTS" + "Back to TTS Location": "Вернуться к местоположению TTS", + "Metadata": "Метаданные" } diff --git a/apps/readest-app/public/locales/si/translation.json b/apps/readest-app/public/locales/si/translation.json index a4478d1a..4ef870f1 100644 --- a/apps/readest-app/public/locales/si/translation.json +++ b/apps/readest-app/public/locales/si/translation.json @@ -1031,5 +1031,6 @@ "Authors": "කතුවරුන්", "Books": "පොත්", "Groups": "කණ්ඩායම්", - "Back to TTS Location": "TTS ස්ථානයට ආපසු යන්න" + "Back to TTS Location": "TTS ස්ථානයට ආපසු යන්න", + "Metadata": "මෙටාඩේටා" } diff --git a/apps/readest-app/public/locales/sv/translation.json b/apps/readest-app/public/locales/sv/translation.json index 1bfcb2f6..af6f69d2 100644 --- a/apps/readest-app/public/locales/sv/translation.json +++ b/apps/readest-app/public/locales/sv/translation.json @@ -1031,5 +1031,6 @@ "Authors": "Författare", "Books": "Böcker", "Groups": "Grupper", - "Back to TTS Location": "Tillbaka till TTS-plats" + "Back to TTS Location": "Tillbaka till TTS-plats", + "Metadata": "Metadata" } diff --git a/apps/readest-app/public/locales/ta/translation.json b/apps/readest-app/public/locales/ta/translation.json index 22b7dba2..936aaea6 100644 --- a/apps/readest-app/public/locales/ta/translation.json +++ b/apps/readest-app/public/locales/ta/translation.json @@ -1031,5 +1031,6 @@ "Authors": "ஆசிரியர்கள்", "Books": "புத்தகங்கள்", "Groups": "குழுக்கள்", - "Back to TTS Location": "TTS இடத்திற்குத் திரும்பு" + "Back to TTS Location": "TTS இடத்திற்குத் திரும்பு", + "Metadata": "மெட்டாடேட்டா" } diff --git a/apps/readest-app/public/locales/th/translation.json b/apps/readest-app/public/locales/th/translation.json index e63ed060..36e0ee19 100644 --- a/apps/readest-app/public/locales/th/translation.json +++ b/apps/readest-app/public/locales/th/translation.json @@ -1019,5 +1019,6 @@ "Authors": "ผู้เขียน", "Books": "หนังสือ", "Groups": "กลุ่ม", - "Back to TTS Location": "กลับไปยังตำแหน่ง TTS" + "Back to TTS Location": "กลับไปยังตำแหน่ง TTS", + "Metadata": "เมทาดาตา" } diff --git a/apps/readest-app/public/locales/tr/translation.json b/apps/readest-app/public/locales/tr/translation.json index 855cfbb1..580ab6ee 100644 --- a/apps/readest-app/public/locales/tr/translation.json +++ b/apps/readest-app/public/locales/tr/translation.json @@ -1031,5 +1031,6 @@ "Authors": "Yazarlar", "Books": "Kitaplar", "Groups": "Gruplar", - "Back to TTS Location": "TTS Konumuna Geri Dön" + "Back to TTS Location": "TTS Konumuna Geri Dön", + "Metadata": "Meta veriler" } diff --git a/apps/readest-app/public/locales/uk/translation.json b/apps/readest-app/public/locales/uk/translation.json index c114a969..bb41cacd 100644 --- a/apps/readest-app/public/locales/uk/translation.json +++ b/apps/readest-app/public/locales/uk/translation.json @@ -1055,5 +1055,6 @@ "Authors": "Автори", "Books": "Книги", "Groups": "Групи", - "Back to TTS Location": "Повернутися до розташування TTS" + "Back to TTS Location": "Повернутися до розташування TTS", + "Metadata": "Метадані" } diff --git a/apps/readest-app/public/locales/vi/translation.json b/apps/readest-app/public/locales/vi/translation.json index 7563b3ba..fb5ee5e2 100644 --- a/apps/readest-app/public/locales/vi/translation.json +++ b/apps/readest-app/public/locales/vi/translation.json @@ -1019,5 +1019,6 @@ "Authors": "Tác giả", "Books": "Sách", "Groups": "Nhóm", - "Back to TTS Location": "Quay lại vị trí TTS" + "Back to TTS Location": "Quay lại vị trí TTS", + "Metadata": "Siêu dữ liệu" } diff --git a/apps/readest-app/public/locales/zh-CN/translation.json b/apps/readest-app/public/locales/zh-CN/translation.json index de5cb534..5cff2d00 100644 --- a/apps/readest-app/public/locales/zh-CN/translation.json +++ b/apps/readest-app/public/locales/zh-CN/translation.json @@ -1019,5 +1019,6 @@ "Authors": "作者", "Books": "书籍", "Groups": "分组", - "Back to TTS Location": "回到朗读位置" + "Back to TTS Location": "回到朗读位置", + "Metadata": "元数据" } diff --git a/apps/readest-app/public/locales/zh-TW/translation.json b/apps/readest-app/public/locales/zh-TW/translation.json index 3a9e9219..efde7a4a 100644 --- a/apps/readest-app/public/locales/zh-TW/translation.json +++ b/apps/readest-app/public/locales/zh-TW/translation.json @@ -1019,5 +1019,6 @@ "Authors": "作者", "Books": "書籍", "Groups": "分組", - "Back to TTS Location": "回到朗讀位置" + "Back to TTS Location": "回到朗讀位置", + "Metadata": "元數據" } diff --git a/apps/readest-app/src/components/metadata/BookDetailView.tsx b/apps/readest-app/src/components/metadata/BookDetailView.tsx index aff9f21c..3611c025 100644 --- a/apps/readest-app/src/components/metadata/BookDetailView.tsx +++ b/apps/readest-app/src/components/metadata/BookDetailView.tsx @@ -6,11 +6,15 @@ import { MdOutlineDelete, MdOutlineEdit, MdSaveAlt, + MdExpandMore, + MdExpandLess, } from 'react-icons/md'; import { Book } from '@/types/book'; import { BookMetadata } from '@/libs/document'; import { useTranslation } from '@/hooks/useTranslation'; +import { useSettingsStore } from '@/store/settingsStore'; +import { useEnv } from '@/context/EnvContext'; import { formatAuthors, formatDate, @@ -19,6 +23,7 @@ import { formatPublisher, formatTitle, } from '@/utils/book'; +import { saveSysSettings } from '@/helpers/settings'; import BookCover from '@/components/BookCover'; import Dropdown from '../Dropdown'; import MenuItem from '../MenuItem'; @@ -49,6 +54,24 @@ const BookDetailView: React.FC = ({ onExport, }) => { const _ = useTranslation(); + const { envConfig } = useEnv(); + const { settings } = useSettingsStore(); + + const toggleSeriesCollapse = () => { + saveSysSettings(envConfig, 'metadataSeriesCollapsed', !settings.metadataSeriesCollapsed); + }; + + const toggleOthersCollapse = () => { + saveSysSettings(envConfig, 'metadataOthersCollapsed', !settings.metadataOthersCollapsed); + }; + + const toggleDescriptionCollapse = () => { + saveSysSettings( + envConfig, + 'metadataDescriptionCollapsed', + !settings.metadataDescriptionCollapsed, + ); + }; return (
@@ -131,56 +154,141 @@ const BookDetailView: React.FC = ({
-
-
- {_('Publisher')} -

- {formatPublisher(metadata?.publisher || '') || _('Unknown')} -

-
-
- {_('Published')} -

- {formatDate(metadata?.published, true) || _('Unknown')} -

-
-
- {_('Updated')} -

{formatDate(book.updatedAt) || ''}

-
-
- {_('Added')} -

{formatDate(book.createdAt) || ''}

-
-
- {_('Language')} -

- {formatLanguage(metadata?.language) || _('Unknown')} -

-
-
- {_('Subjects')} -

- {formatAuthors(metadata?.subject || '') || _('Unknown')} -

-
-
- {_('Format')} -

{book.format || _('Unknown')}

-
-
- {_('File Size')} -

{formatBytes(fileSize) || _('Unknown')}

-
+
+ + {!settings.metadataOthersCollapsed && ( +
+
+
+ {_('Publisher')} +

+ {formatPublisher(metadata?.publisher || '') || _('Unknown')} +

+
+
+ {_('Published')} +

+ {formatDate(metadata?.published, true) || _('Unknown')} +

+
+
+ {_('Updated')} +

{formatDate(book.updatedAt) || ''}

+
+
+ {_('Added')} +

{formatDate(book.createdAt) || ''}

+
+
+ {_('Language')} +

+ {formatLanguage(metadata?.language) || _('Unknown')} +

+
+
+ {_('Subjects')} +

+ {formatAuthors(metadata?.subject || '') || _('Unknown')} +

+
+
+ {_('Format')} +

{book.format || _('Unknown')}

+
+
+ {_('File Size')} +

+ {formatBytes(fileSize) || _('Unknown')} +

+
+
+ {_('Identifier')} +

+ {metadata?.identifier || _('Unknown')} +

+
+
+
+ )}
-
- {_('Description')} -

+
+ + {!settings.metadataSeriesCollapsed && ( +
+
+
+ {_('Series')} +

{metadata?.series || _('Unknown')}

+
+
+ {_('Series Index')} +

+ {metadata?.seriesIndex || _('Unknown')} +

+
+
+
+ )} +
+
+ + {!settings.metadataDescriptionCollapsed && ( +
+

+
+ )}
diff --git a/apps/readest-app/src/services/constants.ts b/apps/readest-app/src/services/constants.ts index 50af37e3..f5a4b162 100644 --- a/apps/readest-app/src/services/constants.ts +++ b/apps/readest-app/src/services/constants.ts @@ -88,6 +88,10 @@ export const DEFAULT_SYSTEM_SETTINGS: Partial = { libraryAutoColumns: true, libraryColumns: 6, + metadataSeriesCollapsed: false, + metadataOthersCollapsed: false, + metadataDescriptionCollapsed: false, + kosync: DEFAULT_KOSYNC_SETTINGS, aiSettings: DEFAULT_AI_SETTINGS, diff --git a/apps/readest-app/src/types/settings.ts b/apps/readest-app/src/types/settings.ts index 6c07902f..8f91a3fa 100644 --- a/apps/readest-app/src/types/settings.ts +++ b/apps/readest-app/src/types/settings.ts @@ -95,6 +95,9 @@ export interface SystemSettings { customFonts: CustomFont[]; customTextures: CustomTexture[]; opdsCatalogs: OPDSCatalog[]; + metadataSeriesCollapsed: boolean; + metadataOthersCollapsed: boolean; + metadataDescriptionCollapsed: boolean; kosync: KOSyncSettings;