Özet kart tasarımı değişti.
This commit is contained in:
@@ -155,7 +155,7 @@ const EpubStep = () => {
|
||||
</Stack>
|
||||
)}
|
||||
</Box>
|
||||
<Box>
|
||||
<Box sx={{ textAlign: 'left', width: '100%' }}>
|
||||
<Typography variant="subtitle1" sx={{ fontWeight: 600 }}>
|
||||
{bookMetadata.title}
|
||||
</Typography>
|
||||
@@ -165,7 +165,27 @@ const EpubStep = () => {
|
||||
</Typography>
|
||||
)}
|
||||
<Typography variant="caption" color="text.secondary" display="block" mt={1}>
|
||||
{[bookMetadata.publisher, bookMetadata.publishedDate, bookMetadata.pageCount ? `${bookMetadata.pageCount} sayfa` : null]
|
||||
{[
|
||||
bookMetadata.publisher,
|
||||
bookMetadata.publishedDate,
|
||||
bookMetadata.pageCount ? `${bookMetadata.pageCount} sayfa` : null,
|
||||
bookMetadata.language ? bookMetadata.language.toUpperCase() : null,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' • ')}
|
||||
</Typography>
|
||||
<Typography variant="caption" color="text.secondary" display="block">
|
||||
{[
|
||||
(() => {
|
||||
const identifiers = bookMetadata.identifiers || [];
|
||||
const isbnLike =
|
||||
identifiers.find((id) => id.type?.includes('ISBN_13')) ||
|
||||
identifiers.find((id) => id.type?.includes('ISBN_10')) ||
|
||||
identifiers[0];
|
||||
return isbnLike?.identifier ? `ISBN ${isbnLike.identifier}` : null;
|
||||
})(),
|
||||
bookMetadata.averageRating ? `Puan ${bookMetadata.averageRating}/5` : null,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' • ')}
|
||||
</Typography>
|
||||
|
||||
@@ -49,7 +49,17 @@ const UploadStep = () => {
|
||||
const onDrop = useCallback(
|
||||
(acceptedFiles) => {
|
||||
if (!acceptedFiles.length) return;
|
||||
const preservedMetadata = bookMetadata;
|
||||
const preservedTitle = bookTitle;
|
||||
resetFromStep('upload');
|
||||
if (preservedMetadata) {
|
||||
skipSearchRef.current = true;
|
||||
setBookMetadata(preservedMetadata);
|
||||
setBookTitle(preservedTitle || preservedMetadata.title || '');
|
||||
} else if (preservedTitle?.trim()) {
|
||||
skipSearchRef.current = true;
|
||||
setBookTitle(preservedTitle);
|
||||
}
|
||||
const mapped = acceptedFiles.map((file, index) => ({
|
||||
id: crypto.randomUUID(),
|
||||
file,
|
||||
@@ -59,7 +69,15 @@ const UploadStep = () => {
|
||||
}));
|
||||
setUploadedImages([...uploadedImages, ...mapped]);
|
||||
},
|
||||
[uploadedImages, resetFromStep, setUploadedImages],
|
||||
[
|
||||
bookMetadata,
|
||||
bookTitle,
|
||||
resetFromStep,
|
||||
setBookMetadata,
|
||||
setBookTitle,
|
||||
setUploadedImages,
|
||||
uploadedImages,
|
||||
],
|
||||
);
|
||||
|
||||
const handleCoverToggle = (imageId) => {
|
||||
|
||||
Reference in New Issue
Block a user