Skip to content

Commit

Permalink
Hide File Info is Item is Missing. (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElementalCrisis authored Nov 20, 2023
1 parent 4b8d210 commit 1c695cc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
34 changes: 19 additions & 15 deletions src/components/Collection/Series/SeriesEpisode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,26 @@ const SeriesEpisode = ({ animeId, episode }: Props) => {
</BackgroundImagePlaceholderDiv>
<EpisodeDetails episode={episode} />
</div>
<div
className="flex cursor-pointer justify-center gap-x-4 border-t-2 border-panel-border py-4 font-semibold"
onClick={handleExpand}
>
File Info
<Icon
path={episodeFilesResult.isFetching ? mdiLoading : mdiChevronDown}
size={1}
rotate={isOpen ? 180 : 0}
className="transition-transform"
spin={episodeFilesResult.isFetching}
/>
{episode.Size !== 0 && (
<div
className="flex cursor-pointer justify-center gap-x-4 border-t-2 border-panel-border py-4 font-semibold"
onClick={handleExpand}
>
File Info
<Icon
path={episodeFilesResult.isFetching ? mdiLoading : mdiChevronDown}
size={1}
rotate={isOpen ? 180 : 0}
className="transition-transform"
spin={episodeFilesResult.isFetching}
/>
</div>
)}
<div>
<AnimateHeight height={isOpen ? 'auto' : 0}>
<EpisodeFiles animeId={animeId} episodeFiles={episodeFilesResult.data ?? []} />
</AnimateHeight>
</div>
<AnimateHeight height={isOpen ? 'auto' : 0}>
<EpisodeFiles animeId={animeId} episodeFiles={episodeFilesResult.data ?? []} />
</AnimateHeight>
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/FiltersModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function FiltersModal({ onClose, show }: Props) {
/>
</div>
<div className="box-border flex h-full flex-col items-center rounded-md border border-panel-border bg-panel-background-alt p-4">
<div className="shoko-scrollbar flex max-h-[18rem] w-full flex-col gap-y-1 overflow-y-auto bg-panel-background-alt pr-4">
<div className="shoko-scrollbar flex max-h-[18rem] w-full flex-col gap-y-1 overflow-y-auto bg-panel-background-alt pr-4">
{filteredList.length !== 0
? filteredList.filter(item => !item.IsDirectory).map(item => renderItem(item))
: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function AvDumpSeriesSelectModal({ getLinks, onClose, show }: Props) {
titleLeft
noPadding
>
<div className="flex flex-col gap-y-4 p-5">
<div className="flex flex-col gap-y-4 p-8">
{activeStep === 1 && (
<>
<StepDescription>
Expand All @@ -167,10 +167,12 @@ function AvDumpSeriesSelectModal({ getLinks, onClose, show }: Props) {
'Click the blue button below to copy the ED2K hashes for use in the next step.'
)}
</StepDescription>
<div className="shoko-scrollbar flex h-[14.5rem] flex-col gap-y-1 overflow-y-scroll break-all rounded-md bg-panel-input p-4 text-sm">
{links.length
? links.map(link => <div key={`link-${link.split('|')[4]}`}>{link}</div>)
: <div>No files selected.</div>}
<div className="flex grow rounded-md border border-panel-border bg-panel-input p-4">
<div className="shoko-scrollbar flex h-[14.5rem] flex-col gap-y-1 overflow-y-auto break-all rounded-md bg-panel-input pr-4">
{links.length
? links.map(link => <div key={`link-${link.split('|')[4]}`}>{link}</div>)
: <div>No files selected.</div>}
</div>
</div>
<div className="flex justify-end gap-x-2.5">
<Button
Expand Down

0 comments on commit 1c695cc

Please sign in to comment.