Skip to content

Commit

Permalink
changed indicator behavior in advanced view
Browse files Browse the repository at this point in the history
  • Loading branch information
ReStartQ committed Feb 17, 2024
1 parent b0296df commit e06c999
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
18 changes: 7 additions & 11 deletions src/renderer/components/app/etc/NextAiringEpisodeIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Tooltip, Typography } from '@mui/joy';
import { Tooltip } from '@mui/joy';
import InfoIcon from '@mui/icons-material/Info';
import NewReleasesIcon from '@mui/icons-material/NewReleases';
import React, { useEffect, useState } from 'react';
import { Box, IconButton } from '@mui/material';
import { Box, IconButton, Typography } from '@mui/material';
import MediaProgress from './MediaProgress';

const NextAiringEpisodeIndicator = ({ props }: any) => {
const NextAiringEpisodeIndicator = ({ props, progress }: any) => {
const normalise = (value: number) =>
((value - 0) * 100) /
(props.episodes !== null ? props.episodes - 0 : 26 - 0);
Expand All @@ -30,21 +30,17 @@ const NextAiringEpisodeIndicator = ({ props }: any) => {
size="small"
sx={{
padding: 0,
ml:
props.nextAiringEpisode.episode - 1 <=
props.mediaListEntry.progress
? 0.5
: 0.6,
ml: props.nextAiringEpisode.episode - 1 <= progress ? 0.6 : 0.8,
my: '1px',
border:
props.nextAiringEpisode.episode - 1 <=
props.mediaListEntry.progress
props.nextAiringEpisode.episode - 1 <= progress
? '2px solid deepskyblue'
: null,
}}
>
<InfoIcon
sx={{
fontSize: '14px',
fontSize: '10px',
}}
/>
</IconButton>
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/components/app/etc/ProgressStepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ export default function ProgressStepper({
{props.nextAiringEpisode !== null ? (
<Typography fontSize={12} fontWeight="bold">
{props.type === 'ANIME' ? 'Episodes' : 'Chapters'}
{/* <NextAiringEpisodeIndicator props={props} /> */}
{/* <NextAiringEpisodeIndicator
props={props}
progress={advancedInput.progress}
/> */}
</Typography>
) : (
<Typography fontSize={12} fontWeight="bold">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function ProgressInput() {
ml: 0.5,
border:
myAdvancedMedia.advancedMedia.nextAiringEpisode.episode - 1 <=
myAdvancedMedia.advancedMedia.mediaListEntry.progress
myAdvancedInput.advancedInput.progress
? '2px solid deepskyblue'
: null,
}}
Expand Down

0 comments on commit e06c999

Please sign in to comment.