Skip to content

Commit 0565773

Browse files
committed
1.4.8
1 parent 4a5f898 commit 0565773

File tree

13 files changed

+403
-31
lines changed

13 files changed

+403
-31
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changes
22

3+
## 1.4.8
4+
5+
- Replaced the indicator tooltip with a progress bar for the grid media cards. These progress bars indicate progress towards completing the media and shows the available episodes available. Grid card's information section margin spacing has changed.
6+
- Buttons for adding or removing progress have been changed to a blue highlighted color.
7+
- Tooltips for inputting the account information have been added. These tooltips show example images of what to input in the corresponding fields.
8+
39
## 1.4.7
410

511
- Redesigned the season search menu. The year select is now an input to allow for easier entry. Moved the search bar to the bottom. Colors were changed in the season search menu for the inputs and search.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You can download the app [here](https://github.com/ReStartQ/AniCour/releases). C
4949

5050
1. Download the setup file from the latest release and install it on your computer.
5151
2. The setup file is labeled as AniCour-Setup-x.x.x.exe, where x denotes a number for the version.
52-
<br/> **Ex: AniCour-Setup-1.4.7.exe**
52+
<br/> **Ex: AniCour-Setup-1.4.8.exe**
5353
3. When you run the exe file, Windows will give a message like below because there is no code signing certificate, click on "More info" <p align="center"><a href="#"><img src="https://github.com/ReStartQ/anicour/blob/main/images/help/AniCourNoCodeSigningInitial.png" alt="Hello" /></a></p>
5454
4. A new option will appear, "Run anyway". Click on it. <p align="center"><a href="#"><img src="https://github.com/ReStartQ/anicour/blob/main/images/help/AniCourNoCodeSigning.png" alt="Hello" /></a></p>
5555
5. The installer menu will open up to allow you to install it on your computer. <p align="center"><a href="#"><img src="https://github.com/ReStartQ/anicour/blob/main/images/help/AniCourInstallationMenu2.png" alt="Hello" /></a></p>

release/app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "anicour",
3-
"version": "1.4.7",
3+
"version": "1.4.8",
44
"description": "Anime, Manga, and Light Novel Tracker Desktop Application for Windows. A fast and interactive way for AniList users to track and manage their anime/manga lists. ",
55
"license": "GPL-3.0",
66
"author": {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { styled } from '@mui/material';
2+
import Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';
3+
4+
const CustomToolTipFixedWidth = styled(
5+
({ className, ...props }: TooltipProps) => (
6+
// eslint-disable-next-line react/jsx-props-no-spreading
7+
<Tooltip {...props} classes={{ popper: className }} />
8+
),
9+
)(({ theme }) => ({
10+
[`& .${tooltipClasses.tooltip}`]: {
11+
backgroundColor: '#0b0d0e',
12+
color: '#86b9db', // #86b9db
13+
fontSize: theme.typography.pxToRem(12),
14+
border: '1px solid #4383ce', // #4383ce
15+
maxWidth: 600,
16+
},
17+
}));
18+
19+
export default CustomToolTipFixedWidth;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { LinearProgress } from '@mui/material';
2+
import React from 'react';
3+
4+
const MediaProgress = ({ progress, buffer }: any) => {
5+
// MIN = Minimum expected value
6+
// MAX = Maximum expected value
7+
// Function to normalise the values (MIN / MAX could be integrated)
8+
// const normalise = (value) => ((value - MIN) * 100) / (MAX - MIN);
9+
10+
return (
11+
<LinearProgress
12+
variant="buffer"
13+
value={progress}
14+
valueBuffer={buffer}
15+
color="info"
16+
sx={{
17+
border: '1px solid deepskyblue',
18+
width: '75%',
19+
height: '7px',
20+
'& .MuiLinearProgress-dashed': {
21+
animation: 'none',
22+
backgroundImage: 'none',
23+
},
24+
}}
25+
/>
26+
);
27+
};
28+
29+
export default MediaProgress;

src/renderer/components/app/etc/NextAiringEpisodeIndicator.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import { Tooltip, Typography } from '@mui/joy';
22
import InfoIcon from '@mui/icons-material/Info';
33
import NewReleasesIcon from '@mui/icons-material/NewReleases';
4-
import React from 'react';
4+
import React, { useEffect, useState } from 'react';
55
import { Box, IconButton } from '@mui/material';
6+
import MediaProgress from './MediaProgress';
67

78
const NextAiringEpisodeIndicator = ({ props }: any) => {
9+
const normalise = (value: number) =>
10+
((value - 0) * 100) /
11+
(props.episodes !== null ? props.episodes - 0 : 26 - 0);
12+
813
return (
914
<Box display="flex" flexDirection="row">
1015
<Typography fontSize={12} fontWeight="bold">

src/renderer/components/app/etc/ProgressStepper.tsx

Lines changed: 120 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import AddIcon from '@mui/icons-material/Add';
22
import RemoveIcon from '@mui/icons-material/Remove';
3-
import { IconButton, Tooltip, Typography } from '@mui/material';
3+
import { Tooltip, Typography } from '@mui/material';
44
import InfoIcon from '@mui/icons-material/Info';
55
import NewReleasesIcon from '@mui/icons-material/NewReleases';
66
import { useTheme } from '@mui/material/styles';
77
import { Box } from '@mui/system';
88
import { useEffect, useState } from 'react';
99
import { formatProgress } from 'renderer/functions/edit/formatInfo';
10+
import { Button, IconButton } from '@mui/joy';
1011
import NextAiringEpisodeIndicator from './NextAiringEpisodeIndicator';
12+
import MediaProgress from './MediaProgress';
1113

1214
export default function ProgressStepper({
1315
props,
@@ -16,6 +18,71 @@ export default function ProgressStepper({
1618
}: any) {
1719
const theme = useTheme();
1820

21+
const getEpisodeOrChapterNumber = (
22+
value: any,
23+
valueC: any,
24+
type: any,
25+
progress: any,
26+
) => {
27+
if (type === 'ANIME') {
28+
if (value === null) {
29+
const num = Math.ceil(progress / 13);
30+
if (progress >= 1000) {
31+
return 9999;
32+
}
33+
if (progress >= 100) {
34+
return 999;
35+
}
36+
if (progress === 0) {
37+
return 13;
38+
}
39+
return num * 13 + 1;
40+
}
41+
return value;
42+
}
43+
if (valueC === null) {
44+
const num = Math.ceil(progress / 26);
45+
if (progress >= 1000) {
46+
return 9999;
47+
}
48+
if (progress >= 100) {
49+
return 999;
50+
}
51+
if (progress === 0) {
52+
return 13;
53+
}
54+
return num * 26 + 1;
55+
}
56+
return valueC;
57+
};
58+
59+
const normalise = (value: number, valueC: number, type: any) => {
60+
if (type === 'ANIME') {
61+
return (
62+
((value - 0) * 100) /
63+
(props.episodes !== null
64+
? props.episodes - 0
65+
: getEpisodeOrChapterNumber(
66+
props.episodes,
67+
props.chapters,
68+
props.type,
69+
advancedInput.progress,
70+
) - 0)
71+
);
72+
}
73+
return (
74+
((valueC - 0) * 100) /
75+
(props.chapters !== null
76+
? props.chapters - 0
77+
: getEpisodeOrChapterNumber(
78+
props.episodes,
79+
props.chapters,
80+
props.type,
81+
advancedInput.progress,
82+
) - 0)
83+
);
84+
};
85+
1986
const handleNext = () => {
2087
inputDispatch({
2188
type: 'updateProgress',
@@ -37,31 +104,43 @@ export default function ProgressStepper({
37104
});
38105
}, [inputDispatch, props.mediaListEntry.progress]);
39106

107+
/* <NextAiringEpisodeIndicator props={props} /> */
108+
40109
return (
41110
<Box
42111
display="flex"
43112
flexDirection="column"
44113
sx={{ gridColumn: '1/2' /* userSelect: 'none' */ }}
45114
>
46115
{props.nextAiringEpisode !== null ? (
47-
<NextAiringEpisodeIndicator props={props} />
116+
<Typography fontSize={12} fontWeight="bold">
117+
{props.type === 'ANIME' ? 'Episodes' : 'Chapters'}
118+
{/* <NextAiringEpisodeIndicator props={props} /> */}
119+
</Typography>
48120
) : (
49121
<Typography fontSize={12} fontWeight="bold">
50122
{props.type === 'ANIME' ? 'Episodes' : 'Chapters'}
51123
</Typography>
52124
)}
53-
54125
<Box
55126
display="flex"
56127
flexDirection="row"
57128
alignItems="center"
58129
sx={{ overflowX: 'auto' }}
59130
>
60131
<IconButton
61-
size="small"
132+
size="sm"
133+
variant="outlined"
134+
color="primary"
62135
onClick={handleBack}
63136
disabled={advancedInput.progress === 0}
64-
sx={{ m: 0, p: 0, minWidth: 0 }}
137+
sx={{
138+
m: 0,
139+
p: 0,
140+
minWidth: 0,
141+
'--IconButton-size': '12px',
142+
mr: '4px',
143+
}}
65144
>
66145
<RemoveIcon fontSize="inherit" />
67146
</IconButton>
@@ -74,19 +153,53 @@ export default function ProgressStepper({
74153
)}
75154
</Typography>
76155
<IconButton
77-
size="small"
156+
size="sm"
157+
variant="outlined"
158+
color="primary"
78159
onClick={handleNext}
79160
disabled={
80161
(props.type === 'ANIME'
81162
? advancedInput.progress === props.episodes
82163
: advancedInput.progress === props.chapters) ||
83164
advancedInput.progress === 9999
84165
}
85-
sx={{ m: 0, p: 0, minWidth: 0 }}
166+
sx={{
167+
m: 0,
168+
p: 0,
169+
minWidth: 0,
170+
'--IconButton-size': '12px',
171+
ml: '4px',
172+
}}
86173
>
87174
<AddIcon fontSize="inherit" />
88175
</IconButton>
89176
</Box>
177+
<Box
178+
display="flex"
179+
flexDirection="row"
180+
alignItems="center"
181+
sx={{ overflowX: 'auto', my: '3px' }}
182+
>
183+
<MediaProgress
184+
progress={normalise(
185+
advancedInput.progress,
186+
advancedInput.progress,
187+
props.type,
188+
)}
189+
buffer={normalise(
190+
props.nextAiringEpisode !== null
191+
? props.nextAiringEpisode.episode - 1
192+
: getEpisodeOrChapterNumber(
193+
props.episodes,
194+
props.chapters,
195+
props.type,
196+
advancedInput.progress,
197+
), // this should be episodes or if episodes is null, then default number
198+
props.chapters,
199+
props.type,
200+
)}
201+
/>
202+
</Box>
90203
</Box>
91204
);
92205
}

0 commit comments

Comments
 (0)