Skip to content

Commit

Permalink
code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mienaiyami committed Jan 23, 2024
1 parent 39fa1cd commit bb323a0
Show file tree
Hide file tree
Showing 13 changed files with 818 additions and 1,003 deletions.
12 changes: 3 additions & 9 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,15 @@ import { setReaderOpen } from "./store/isReaderOpen";
import { setMangaInReader } from "./store/mangaInReader";
import { addBookmark, refreshBookmark, removeBookmark } from "./store/bookmarks";
import { refreshThemes, setTheme } from "./store/themes";
import {
bookmarksPath,
historyPath,
promptSelectDir,
renderPDF,
settingsPath,
themesPath,
unzip,
} from "./MainImports";
import { bookmarksPath, historyPath, settingsPath, themesPath } from "./utils/paths";
import { setBookInReader } from "./store/bookInReader";
import { setAniEditOpen } from "./store/isAniEditOpen";
import { setAniLoginOpen } from "./store/isAniLoginOpen";
import { setAniSearchOpen } from "./store/isAniSearchOpen";
import { setAnilistCurrentManga } from "./store/anilistCurrentManga";
import { toggleOpenSetting } from "./store/isSettingOpen";
import { promptSelectDir, unzip } from "./MainImports";
import { renderPDF } from "./utils/pdf";

interface IAppContext {
pageNumberInputRef: React.RefObject<HTMLInputElement>;
Expand Down
1 change: 0 additions & 1 deletion src/renderer/Components/ReaderSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { setReaderSettings } from "../store/appSettings";
import { useAppDispatch, useAppSelector } from "../store/hooks";
import InputRange from "./Element/InputRange";
import { InputSelect } from "./Element/InputSelect";
import { settingSchema } from "../MainImports";
import InputNumber from "./Element/InputNumber";
import InputCheckbox from "./Element/InputCheckbox";
import InputCheckboxNumber from "./Element/InputCheckboxNumber";
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/Components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { resetShortcuts } from "../store/shortcuts";
import { setOpenSetting } from "../store/isSettingOpen";
import { addBookmark, removeAllBookmarks } from "../store/bookmarks";
import { makeNewSettings, setAppSettings, setEpubReaderSettings, setReaderSettings } from "../store/appSettings";
import { promptSelectDir, renderPDF } from "../MainImports";
import { promptSelectDir } from "../MainImports";
import { deleteAllHistory } from "../store/history";
import InputNumber from "./Element/InputNumber";
import { setAnilistToken } from "../store/anilistToken";
Expand All @@ -21,6 +21,7 @@ import FocusLock from "react-focus-lock";
import ThemeCont from "./settings/ThemeCont";
import Shortcuts from "./settings/Shortcuts";
import Usage from "./settings/Usage";
import { renderPDF } from "../utils/pdf";

//todo: divide into components
const Settings = (): ReactElement => {
Expand Down
Loading

0 comments on commit bb323a0

Please sign in to comment.