Skip to content

Commit

Permalink
feat: added thumbs down on book cover
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed Feb 24, 2024
1 parent 18ef9af commit 89bd2fd
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions packages/web/src/books/bookList/BookListCoverContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
CloudDownloadRounded,
ErrorRounded,
LoopRounded,
NoEncryptionRounded
NoEncryptionRounded,
ThumbDownOutlined
} from "@mui/icons-material"
import { Cover } from "../Cover"
import { useBook, useIsBookProtected } from "../states"
Expand Down Expand Up @@ -51,7 +52,6 @@ export const BookListCoverContainer: FC<{
style={{ ...classes.coverContainer, ...style }}
className={className}
>
{}
{item && <Cover bookId={item?._id} />}
{bookDownloadState?.downloadState !== DownloadState.Downloaded && (
<Box
Expand Down Expand Up @@ -82,7 +82,19 @@ export const BookListCoverContainer: FC<{
<CheckCircleRounded style={classes.finishIcon} fontSize={size} />
</div>
)}
<div style={classes.bodyContainer}>
<Box style={classes.bodyContainer}>
{item?.isNotInterested && (
<ThumbDownOutlined
style={{
position: "absolute",
right: 0,
top: 0,
transform: "translate(-20%, 20%)"
}}
color="action"
fontSize={size}
/>
)}
{withMetadaStatus && item?.metadataUpdateStatus === "fetching" && (
<div style={classes.itemCoverCenterInfo}>
<Chip
Expand All @@ -106,17 +118,24 @@ export const BookListCoverContainer: FC<{
</div>
)}
{bookDownloadState?.downloadState === DownloadState.None && (
<div style={classes.pauseButton}>
<Box
position="absolute"
left="50%"
top="50%"
style={{
transform: "translate(-50%, -50%)"
}}
>
<CloudDownloadRounded color="action" fontSize={size} />
</div>
</Box>
)}
{withDownloadStatus &&
bookDownloadState?.downloadState === DownloadState.Downloading && (
<div style={classes.pauseButton}>
<Chip color="primary" size="small" label="downloading..." />
</div>
)}
</div>
</Box>
{withReadingProgressStatus && (
<>
{item?.readingStateCurrentState === ReadingStateState.Reading && (
Expand Down

0 comments on commit 89bd2fd

Please sign in to comment.