Skip to content

Commit

Permalink
1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ReStartQ committed Jul 13, 2024
1 parent d113cf0 commit f22af99
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 25 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Changes

## 1.5.3

- Sort menu options in seasons list have been rearranged.
- By default, anime is sorted by popularity in the seasons list section.
- This default seasons sort can be changed within the settings menu under application.

## 1.5.2

- Releasing/Not Yet Released anime list cards now have the next airing episode timer just like the seasonal anime cards.
- Next Airing Time is now shown as a sort option on the user's anime list.
- An option has been added settings menu to hide/show the next airing time for anime media cards in the user's anime list. By default the option is set to show.
- An option has been added to the settings menu to hide/show the next airing time for anime media cards in the user's anime list. By default the option is set to show.

## 1.5.1

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Downloads can be found [here](https://github.com/ReStartQ/AniCour/releases). Che
**_Whenever you get a warning message in the browser, you will have to allow for the download with an alternate option that may show up as something like "download suspicious file" (chrome) or "keep file" (edge)._**

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 denotes the version.
<br> **Ex: AniCour-Setup-1.5.2.exe**
<br> **Ex: AniCour-Setup-1.5.3.exe**
2. Run the setup file, Windows will give a message like below, click on "More info" <p align="center"><a href="#"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourNoCodeSigningInitial.png" height="300"/></a></p>
3. A new option will appear, "Run anyway". Click on it. <p align="center"><a href="#"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourNoCodeSigning.png" height="300"/></a></p>
4. The installer menu will open up to allow you to install it on your computer. <p align="center"><a href="#"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourInstallationMenu2.png" height="240"/></a></p>
Expand Down
2 changes: 1 addition & 1 deletion help/InstallHelp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You can download the app [here](https://github.com/ReStartQ/AniCour/releases).

1. Download the setup file from the latest release and install it on your computer.
2. The setup file is labeled as AniCour-Setup-x.x.x.exe, where x denotes a number for the version.
**Ex: AniCour-Setup-1.5.2.exe**
**Ex: AniCour-Setup-1.5.3.exe**
3. When you run the exe file, Windows will give a message like below, click on "More info" <p align="center"><a href="#"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourNoCodeSigningInitial.png" /></a></p>
4. A new option will appear, "Run anyway". Click on it. <p align="center"><a href="#"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourNoCodeSigning.png" /></a></p>
5. The installer menu will open up to allow you to install it on your computer. <p align="center"><a href="#"><img src="https://raw.githubusercontent.com/restartq/anicour/main/images/help/AniCourInstallationMenu2.png" /></a></p>
Expand Down
4 changes: 2 additions & 2 deletions release/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anicour",
"version": "1.5.2",
"version": "1.5.3",
"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. ",
"license": "GPL-3.0",
"author": {
Expand Down
4 changes: 4 additions & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ const schema: any = {
type: 'string',
default: 'Show',
},
defaultSeasonSort: {
type: 'number',
default: 2,
},
};

const store = new Store({ schema });
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/app/sidebar/SortMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ export default function SortMenu() {
<List component="div" disablePadding dense>
{[
'Next Airing Time',
'Popularity',
'Score',
'Status',
'Title',
'Episodes',
'Score',
'Popularity',
].map((text, index) => (
<ListItem key={text} disablePadding dense>
<ListItemButton
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/settings/SettingsMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import SelectDefaultView from './app/SelectDefaultView';
import AboutSection from './about/AboutSection';
import SelectSeasonChange from './app/SelectSeasonChange';
import NextAiringEpisodeMainList from './app/NextAiringEpisodeMainList';
import SelectDefaultSeasonsSort from './app/SelectDefaultSeasonsSort';

function SettingsMainTab({ view }: any) {
if (view === 0) {
Expand Down Expand Up @@ -58,6 +59,7 @@ function SettingsMainTab({ view }: any) {
<SelectLanguage />
<SelectDefaultView />
<SelectSeasonChange />
<SelectDefaultSeasonsSort />
<SelectDefaultLink />
<DefaultStatus />
<NextAiringEpisodeMainList />
Expand Down
43 changes: 43 additions & 0 deletions src/renderer/components/settings/app/SelectDefaultSeasonsSort.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Box, FormControl, InputLabel, NativeSelect } from '@mui/material';
import { useAtom } from 'jotai';
import React from 'react';
import { defaultSeasonSortAtom } from 'renderer/store';

function SelectDefaultSeasonsSort() {
const [defaultSeasonSort, setDefaultSeasonSort] = useAtom(
defaultSeasonSortAtom,
);

const handleChange = (event: any) => {
setDefaultSeasonSort(Number(event.target.value));
window.electron.store.set('defaultSeasonSort', Number(event.target.value));
/*
window.electron.ipcRenderer.sendMessage('updateMainFromSettings', [
'defaultSeasonSort',
event.target.value,
]);
*/
};

return (
<Box>
<FormControl fullWidth>
<InputLabel variant="standard">Default seasonal list sort</InputLabel>
<NativeSelect
id="defaultSeasonSort"
value={defaultSeasonSort}
onChange={handleChange}
>
<option value={1}>Next Airing Time</option>
<option value={2}>Popularity</option>
<option value={3}>Score</option>
<option value={4}>Status</option>
<option value={5}>Title</option>
<option value={6}>Episodes</option>
</NativeSelect>
</FormControl>
</Box>
);
}

export default SelectDefaultSeasonsSort;
18 changes: 14 additions & 4 deletions src/renderer/context/SortLastContext.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { useAtom } from 'jotai';
import {
createContext,
useState,
useContext,
useReducer,
ReactNode,
} from 'react';
import { defaultSeasonSortAtom } from 'renderer/store';

type SortLastContextProviderProps = {
children: ReactNode;
Expand All @@ -17,7 +19,7 @@ const defaultSortLast = {
searchAnime: 0,
searchManga: 0,
searchLightNovels: 0,
seasons: 0,
seasons: 5,
};

export const SortLastContext = createContext({});
Expand Down Expand Up @@ -71,10 +73,18 @@ export const SortLastContextReducer = (state: any, action: any) => {
export const SortLastContextProvider = ({
children,
}: SortLastContextProviderProps) => {
const [sortLast, dispatch] = useReducer(
SortLastContextReducer,
defaultSortLast,
const [defaultSeasonSort, setDefaultSeasonSort] = useAtom(
defaultSeasonSortAtom,
);
const [sortLast, dispatch] = useReducer(SortLastContextReducer, {
anime: 0,
manga: 0,
lightNovels: 0,
searchAnime: 0,
searchManga: 0,
searchLightNovels: 0,
seasons: defaultSeasonSort,
});

return (
<SortLastContext.Provider value={{ sortLast, dispatch }}>
Expand Down
26 changes: 13 additions & 13 deletions src/renderer/functions/sort/sortSeasonsFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ export default function sortSeasons(
case 1.5:
return [...data].sort(sortByAiringDateDescending);
case 2:
return [...data].sort(sortByStatusAscending);
return [...data].sort(sortByPopularityDescending);
case 2.5:
return [...data].sort(sortByStatusDescending);
return [...data].sort(sortByPopularityAscending);
case 3:
return [...data].sort(sortByAverageScoreDescending);
case 3.5:
return [...data].sort(sortByAverageScoreAscending);
case 4:
return [...data].sort(sortByStatusAscending);
case 4.5:
return [...data].sort(sortByStatusDescending);
case 5:
return [...data].sort((a, b) => {
return sortByTitleDescending(a, b, titlePreference);
});
case 3.5:
case 5.5:
return [...data].sort((a, b) => {
return sortByTitleAscending(a, b, titlePreference);
});
case 4:
return [...data].sort(sortByEpisodesDescending);
case 4.5:
return [...data].sort(sortByEpisodesAscending);
case 5:
return [...data].sort(sortByAverageScoreDescending);
case 5.5:
return [...data].sort(sortByAverageScoreAscending);
case 6:
return [...data].sort(sortByPopularityDescending);
return [...data].sort(sortByEpisodesDescending);
case 6.5:
return [...data].sort(sortByPopularityAscending);
return [...data].sort(sortByEpisodesAscending);
default:
return data;
}
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,11 @@ myStore.set(
nextAiringEpisodeAtom,
window.electron.store.get('nextAiringEpisode'),
);

export const defaultSeasonSortAtom = atom(
window.electron.store.get('defaultSeasonSort'),
);
myStore.set(
defaultSeasonSortAtom,
window.electron.store.get('defaultSeasonSort'),
);

0 comments on commit f22af99

Please sign in to comment.