([]);
const [loaded, setLoaded] = useState(false);
@@ -117,14 +127,14 @@ export function Library({ onOpen }: { onOpen: (book: Book) => void }) {
{loaded && books.length === 0 && (
)}
{books.map((b) =>
b.corrupt ? (
- {b.title}
+
Couldn't be read; a .bak backup may sit beside it.
setPendingDelete(b)} />
@@ -142,7 +152,7 @@ export function Library({ onOpen }: { onOpen: (book: Book) => void }) {
}
}}
>
- {b.title || "Untitled"}
+
{b.author && {b.author}}
{b.updatedAt > 0 && Edited {relativeTime(b.updatedAt, now)}}
setPendingDelete(b)} />
diff --git a/src/styles/app.css b/src/styles/app.css
index f2dc279..007e157 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -1599,14 +1599,22 @@ body.resizing .sidebar {
.card-title {
max-width: 100%;
- overflow-wrap: anywhere;
font-family: var(--font-book);
- font-size: 20px;
+ font-size: 18px;
font-weight: 500;
- line-height: 1.18;
+ line-height: 1.35;
color: var(--ink);
}
+.card-title > span {
+ display: inline-block;
+ max-width: 100%;
+ overflow-wrap: break-word;
+ hyphens: auto;
+ -webkit-hyphens: auto;
+ vertical-align: bottom;
+}
+
.card-author {
max-width: 100%;
overflow-wrap: anywhere;