diff --git a/changelog.md b/changelog.md index 758af9d..8eb12f5 100644 --- a/changelog.md +++ b/changelog.md @@ -17,17 +17,15 @@ Linux distribution currently not available as direct download but can be build e ## Added -- EPub reader (experimental) #78. -- Custom color filter in reader settings, #93. -- Force low brightness option, #93. -- Option to disable list numbering(#95) and page number on home page(#94), +- EPUB: Auto scroll to old position after setting changes. +- Option to open epub from file explorer. ## Fixed -- #96 and other fixes. +- #98. --- diff --git a/package.json b/package.json index 05a2a6a..1656302 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "yomikiru", "productName": "Yomikiru", - "version": "2.10.0", + "version": "2.10.1", "description": "App to read manga/comic/epub offline on desktop", "main": ".webpack/main", "author": { diff --git a/src/hooks/useTheme.tsx b/src/hooks/useTheme.tsx deleted file mode 100644 index 3fe6a18..0000000 --- a/src/hooks/useTheme.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useLayoutEffect, useState } from "react"; -export default function useTheme( - newTheme: string, - themes: ThemeData[] -): [string, React.Dispatch>] { - const [theme, setTheme] = useState(newTheme); - useLayoutEffect(() => { - if (themes.map((e) => e.name).includes(theme)) { - let themeStr = ""; - if (themes.find((e) => e.name)) { - const themeData: { [key: string]: string } = themes.find((e) => e.name === theme)!.main; - for (const key in themeData) { - themeStr += `${key}:${themeData[key]};`; - } - document.body.style.cssText = themeStr || ""; - document.body.setAttribute("data-theme", theme); - window.electron.getCurrentWindow().setTitleBarOverlay({ - color: window.getComputedStyle(document.querySelector("body #topBar")!).backgroundColor, - symbolColor: window.getComputedStyle(document.querySelector("body #topBar .homeBtns button")!) - .color, - }); - } else { - window.dialog.customError({ - title: "Error", - message: '"' + theme + '" Theme does not exist or is corrupted.\nRewriting theme', - }); - window.fs.unlinkSync(window.path.join(window.electron.app.getPath("userData"), "themes.json")); - window.location.reload(); - } - } else { - window.dialog.customError({ - title: "Error", - message: `Theme "${theme}" does not exist. Try fixing or deleting theme.json and settings.json in "userdata" folder.(at "%appdata%/Yomikiru/" or in main folder on Portable version)`, - }); - } - }, [theme]); - return [theme, setTheme]; -}