Skip to content

Commit 5a5716e

Browse files
committed
1.7.3
1 parent 8092e25 commit 5a5716e

File tree

10 files changed

+151
-85
lines changed

10 files changed

+151
-85
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.7.3
2+
3+
- Added episode countdown for search media cards.
4+
- All media cards now follow the same standard except for the dedicated information based on the category.
5+
- Changed color for the EP# for the next airing episode countdown.
6+
- Title formatting changes for compact media cards.
7+
18
## 1.7.2
29

310
- Redesign of the tables for a more modern and clean look.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ _Note:_
3232
**This app does not have a code signing certificate and will give a warning message on installation.**
3333

3434
1. Download the setup file from the latest releases. The setup file is labeled as AniCour-Setup-x.x.x.exe, where x.x.x will denote the version.
35-
<br> **Example: AniCour-Setup-1.7.2.exe**
35+
<br> **Example: AniCour-Setup-1.7.3.exe**
3636
<br> _Some browsers may give a warning when downloading the setup file as it does not use a code signing certificate._
3737
<br> _In this case, to allow the download use the alternate option they provide. (Example: keep file)_
3838
2. Run the setup file, Windows will give a message like below, click on **"More info"** <p align="center"><a href="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourNoCodeSigningInitial.png"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourNoCodeSigningInitial.png" height="280"/></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.7.2",
3+
"version": "1.7.3",
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": {

src/renderer/components/app/main/MediaCard.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,18 @@ export default function MediaCard({ props }: any) {
316316
padding: '10px',
317317
}}
318318
>
319-
<Typography variant="body2" fontSize={11}>
320-
{`EP${props.nextAiringEpisode.episode}: ${getTimeFormat(
321-
props.nextAiringEpisode.airingAt,
322-
)}`}
319+
<Typography variant="body2" fontSize={11} noWrap>
320+
<Box
321+
component="span"
322+
style={{
323+
color: '#00FFFF',
324+
fontSize: 13,
325+
fontWeight: 'bold',
326+
}}
327+
>
328+
{`EP${props.nextAiringEpisode.episode}:`}
329+
</Box>{' '}
330+
{`${getTimeFormat(props.nextAiringEpisode.airingAt)}`}
323331
</Typography>
324332
</Box>
325333
) : null}

src/renderer/components/app/main/MediaCardCompact.tsx

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,7 @@ export default function MediaCardCompact({ props }: any) {
166166
height: '55px',
167167
}}
168168
>
169-
<Typography
170-
fontSize={12}
171-
sx={{
172-
overflow: 'hidden',
173-
textOverflow: 'ellipsis',
174-
display: '-webkit-box',
175-
WebkitLineClamp:
176-
props.nextAiringEpisode !== null && nextAiringEpisode === 'Show'
177-
? '1'
178-
: '2',
179-
WebkitBoxOrient: 'vertical',
180-
}}
181-
className="title"
182-
>
169+
<Typography fontSize={12} fontWeight="bold" noWrap className="title">
183170
<Circle
184171
fontSize="inherit"
185172
sx={{
@@ -192,9 +179,17 @@ export default function MediaCardCompact({ props }: any) {
192179
</Typography>
193180
{props.nextAiringEpisode !== null && nextAiringEpisode === 'Show' ? (
194181
<Typography variant="body2" fontSize={11} color="aliceblue" noWrap>
195-
{`EP${props.nextAiringEpisode.episode}: ${getTimeFormat(
196-
props.nextAiringEpisode.airingAt,
197-
)}`}
182+
<Box
183+
component="span"
184+
style={{
185+
color: '#00FFFF',
186+
fontSize: 13,
187+
fontWeight: 'bold',
188+
}}
189+
>
190+
{`EP${props.nextAiringEpisode.episode}:`}
191+
</Box>{' '}
192+
{`${getTimeFormat(props.nextAiringEpisode.airingAt)}`}
198193
</Typography>
199194
) : null}
200195
</Box>

src/renderer/components/app/search/SearchMediaCard.tsx

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import CardContent from '@mui/material/CardContent';
66
import CardMedia from '@mui/material/CardMedia';
77
import Typography from '@mui/material/Typography';
88
import * as React from 'react';
9-
import { useState } from 'react';
9+
import { useEffect, useState } from 'react';
1010
import { useTitle } from 'renderer/context/TitleContext';
1111
import getStatusColor from 'renderer/functions/StatusFunction';
1212
import {
@@ -25,6 +25,9 @@ import { useSearchQuery } from 'renderer/functions/SearchFunctions';
2525
import { useAdvancedMedia } from 'renderer/context/advanced/AdvancedMediaContext';
2626
import { Tooltip } from '@mui/joy';
2727
import { Circle } from '@mui/icons-material';
28+
import { getTime, getTimeFormat } from 'renderer/functions/SeasonsFunctions';
29+
import { nextAiringEpisodeAtom } from 'renderer/store';
30+
import { useAtom } from 'jotai';
2831
import ContextMenu from '../etc/ContextMenu';
2932
import DeleteModal from '../etc/DeleteModal';
3033

@@ -57,6 +60,16 @@ export default function SearchMediaCard({ props }: any) {
5760
mouseY: number;
5861
} | null>(null);
5962

63+
const [time, setTime] = useState(
64+
props.nextAiringEpisode !== null
65+
? props.nextAiringEpisode.timeUntilAiring
66+
: null,
67+
);
68+
69+
const [nextAiringEpisode, setNextAiringEpisode] = useAtom(
70+
nextAiringEpisodeAtom,
71+
);
72+
6073
const handleContextMenu = (event: React.MouseEvent) => {
6174
event.preventDefault();
6275
setContextMenu(
@@ -72,6 +85,16 @@ export default function SearchMediaCard({ props }: any) {
7285
);
7386
};
7487

88+
useEffect(() => {
89+
const timer = setTimeout(() => {
90+
if (time !== null && time >= 0 && props.nextAiringEpisode !== null) {
91+
// eslint-disable-next-line no-plusplus
92+
setTime(getTime(props.nextAiringEpisode.airingAt));
93+
}
94+
}, 1000);
95+
// eslint-disable-next-line react-hooks/exhaustive-deps
96+
}, [time]);
97+
7598
return (
7699
<Card
77100
variant="outlined"
@@ -112,6 +135,33 @@ export default function SearchMediaCard({ props }: any) {
112135
maxHeight: '200px',
113136
}}
114137
/>
138+
{props.nextAiringEpisode !== null && nextAiringEpisode === 'Show' ? (
139+
<Box
140+
sx={{
141+
position: 'absolute',
142+
bottom: 0,
143+
left: 0,
144+
width: '100%',
145+
bgcolor: 'rgba(0, 0, 0, 0.69)',
146+
color: 'white',
147+
padding: '10px',
148+
}}
149+
>
150+
<Typography variant="body2" fontSize={11} noWrap>
151+
<Box
152+
component="span"
153+
style={{
154+
color: '#00FFFF',
155+
fontSize: 13,
156+
fontWeight: 'bold',
157+
}}
158+
>
159+
{`EP${props.nextAiringEpisode.episode}:`}
160+
</Box>{' '}
161+
{`${getTimeFormat(props.nextAiringEpisode.airingAt)}`}
162+
</Typography>
163+
</Box>
164+
) : null}
115165
{props.mediaListEntry !== null ? (
116166
<Tooltip title="On List" arrow variant="outlined" color="primary">
117167
<PlaylistAddCheckCircleIcon

src/renderer/components/app/search/SearchMediaCardCompact.tsx

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CardActionArea, Typography } from '@mui/material';
33
import Box from '@mui/material/Box';
44
import Card from '@mui/material/Card';
55
import CardMedia from '@mui/material/CardMedia';
6-
import { useState, MouseEvent } from 'react';
6+
import { useState, MouseEvent, useEffect } from 'react';
77
import { useTitle } from 'renderer/context/TitleContext';
88
import getStatusColor from 'renderer/functions/StatusFunction';
99
import { getMalLink } from 'renderer/functions/edit/getAdjustedSiteLink';
@@ -15,8 +15,11 @@ import { useSearchQuery } from 'renderer/functions/SearchFunctions';
1515
import { useAdvancedMedia } from 'renderer/context/advanced/AdvancedMediaContext';
1616
import { Tooltip } from '@mui/joy';
1717
import { Circle } from '@mui/icons-material';
18-
import ContextMenu from '../etc/ContextMenu';
18+
import { useAtom } from 'jotai';
19+
import { nextAiringEpisodeAtom } from 'renderer/store';
20+
import { getTime, getTimeFormat } from 'renderer/functions/SeasonsFunctions';
1921
import DeleteModal from '../etc/DeleteModal';
22+
import ContextMenu from '../etc/ContextMenu';
2023

2124
export default function SearchMediaCardCompact({ props }: any) {
2225
const titlePreference: any = useTitle();
@@ -43,6 +46,16 @@ export default function SearchMediaCardCompact({ props }: any) {
4346
mouseY: number;
4447
} | null>(null);
4548

49+
const [time, setTime] = useState(
50+
props.nextAiringEpisode !== null
51+
? props.nextAiringEpisode.timeUntilAiring
52+
: null,
53+
);
54+
55+
const [nextAiringEpisode, setNextAiringEpisode] = useAtom(
56+
nextAiringEpisodeAtom,
57+
);
58+
4659
const handleContextMenu = (event: MouseEvent) => {
4760
event.preventDefault();
4861
setContextMenu(
@@ -58,44 +71,15 @@ export default function SearchMediaCardCompact({ props }: any) {
5871
);
5972
};
6073

61-
const handleClose = () => {
62-
setContextMenu(null);
63-
};
64-
65-
const handleCloseAdvanced = () => {
66-
setContextMenu(null);
67-
window.electron.ipcRenderer.sendMessage('advancedMedia', [
68-
getTitle(titlePreference.title, props),
69-
props,
70-
]);
71-
};
72-
73-
const handleCloseTrailer = () => {
74-
setContextMenu(null);
75-
window.electron.ipcRenderer.sendMessage('advancedMedia', [
76-
getTitle(titlePreference.title, props),
77-
props,
78-
'trailer',
79-
]);
80-
};
81-
82-
const handleCloseMalPage = () => {
83-
setContextMenu(null);
84-
window.electron.ipcRenderer.sendMessage('openExternalLink', [
85-
getMalLink(props.idMal, props.type),
86-
]);
87-
};
88-
89-
const handleCloseAniListPage = () => {
90-
setContextMenu(null);
91-
window.electron.ipcRenderer.sendMessage('openExternalLink', [
92-
props.siteUrl,
93-
]);
94-
};
95-
96-
const handleCloseDelete = () => {
97-
setContextMenu(null);
98-
};
74+
useEffect(() => {
75+
const timer = setTimeout(() => {
76+
if (time !== null && time >= 0 && props.nextAiringEpisode !== null) {
77+
// eslint-disable-next-line no-plusplus
78+
setTime(getTime(props.nextAiringEpisode.airingAt));
79+
}
80+
}, 1000);
81+
// eslint-disable-next-line react-hooks/exhaustive-deps
82+
}, [time]);
9983

10084
return (
10185
<Card
@@ -158,11 +142,12 @@ export default function SearchMediaCardCompact({ props }: any) {
158142
>
159143
<Typography
160144
fontSize={12}
145+
fontWeight="bold"
161146
sx={{
162147
overflow: 'hidden',
163148
textOverflow: 'ellipsis',
164149
display: '-webkit-box',
165-
WebkitLineClamp: '2',
150+
WebkitLineClamp: '1',
166151
WebkitBoxOrient: 'vertical',
167152
}}
168153
className="title"
@@ -177,6 +162,21 @@ export default function SearchMediaCardCompact({ props }: any) {
177162
/>
178163
{getTitle(titlePreference.title, props)}
179164
</Typography>
165+
{props.nextAiringEpisode !== null && nextAiringEpisode === 'Show' ? (
166+
<Typography variant="body2" fontSize={11} color="aliceblue" noWrap>
167+
<Box
168+
component="span"
169+
style={{
170+
color: '#00FFFF',
171+
fontSize: 13,
172+
fontWeight: 'bold',
173+
}}
174+
>
175+
{`EP${props.nextAiringEpisode.episode}:`}
176+
</Box>{' '}
177+
{`${getTimeFormat(props.nextAiringEpisode.airingAt)}`}
178+
</Typography>
179+
) : null}
180180
</Box>
181181
</CardActionArea>
182182
<ContextMenu

src/renderer/components/app/seasons/SeasonMediaCard.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,18 @@ export const SeasonMediaCard = ({ props }: any) => {
155155
padding: '10px',
156156
}}
157157
>
158-
<Typography variant="body2" fontSize={11}>
159-
{`EP${props.nextAiringEpisode.episode}: ${getTimeFormat(
160-
props.nextAiringEpisode.airingAt,
161-
)}`}
158+
<Typography variant="body2" fontSize={11} noWrap>
159+
<Box
160+
component="span"
161+
style={{
162+
color: '#00FFFF',
163+
fontSize: 13,
164+
fontWeight: 'bold',
165+
}}
166+
>
167+
{`EP${props.nextAiringEpisode.episode}:`}
168+
</Box>{' '}
169+
{`${getTimeFormat(props.nextAiringEpisode.airingAt)}`}
162170
</Typography>
163171
</Box>
164172
) : null}

src/renderer/components/app/seasons/SeasonMediaCardCompact.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,7 @@ export default function SeasonMediaCardCompact({ props }: any) {
139139
height: '55px',
140140
}}
141141
>
142-
<Typography
143-
fontSize={12}
144-
sx={{
145-
overflow: 'hidden',
146-
textOverflow: 'ellipsis',
147-
display: '-webkit-box',
148-
WebkitLineClamp: props.nextAiringEpisode !== null ? '1' : '2',
149-
WebkitBoxOrient: 'vertical',
150-
}}
151-
className="title"
152-
>
142+
<Typography fontSize={12} fontWeight="bold" noWrap className="title">
153143
<Circle
154144
fontSize="inherit"
155145
sx={{
@@ -162,9 +152,17 @@ export default function SeasonMediaCardCompact({ props }: any) {
162152
</Typography>
163153
{props.nextAiringEpisode !== null ? (
164154
<Typography variant="body2" fontSize={11} color="aliceblue" noWrap>
165-
{`EP${props.nextAiringEpisode.episode}: ${getTimeFormat(
166-
props.nextAiringEpisode.airingAt,
167-
)}`}
155+
<Box
156+
component="span"
157+
style={{
158+
color: '#00FFFF',
159+
fontSize: 13,
160+
fontWeight: 'bold',
161+
}}
162+
>
163+
{`EP${props.nextAiringEpisode.episode}:`}
164+
</Box>{' '}
165+
{`${getTimeFormat(props.nextAiringEpisode.airingAt)}`}
168166
</Typography>
169167
) : null}
170168
</Box>

0 commit comments

Comments
 (0)