From 23a32a45c24a7cfedc6d5e2d8c810fc163ccde75 Mon Sep 17 00:00:00 2001 From: yami Date: Tue, 8 Aug 2023 20:56:51 +0530 Subject: [PATCH] version up --- changelog.md | 39 ++-- makeAll.js | 215 ---------------------- package.json | 4 +- src/Components/Element/InputColorReal.tsx | 2 + src/Components/Element/MenuList.tsx | 2 +- 5 files changed, 22 insertions(+), 240 deletions(-) delete mode 100644 makeAll.js diff --git a/changelog.md b/changelog.md index 5f42b2b..1a50882 100644 --- a/changelog.md +++ b/changelog.md @@ -4,35 +4,30 @@ Does not follow semver. ## Added -- Option to render multiple pdfs, #216. Access from settings. -- Context menu keyboard navigation. -- Option to mark chapter as unread in home-location-list and reader-side-list, #213. -- EPUB double click fullscreen. -- Search bar and list navigation with keyboard. Check Settings -> Extras -> "Search tab shortcuts" for more. -- Context menu in epub reader. +- Option to clear app cache. +- Context menu + - esc to close. + - shortcut key to open. + - unread all, mark as real, mark all as read. +- #222, Option to disable text select in epub reader. +- Custom option select and color input. ## Changed +- Better keyboard navigation in search inputs. - UI Changes: - - Moved "usage & features" to "extras" tab. - - Context menu related changes. - - Highlight element on setting link click navigation. - - #220. - - Added custom number input spinner. - - and more. - - Text update in some loading screens. -- EPUB: - - Use default padding and margins for all elements. - - Confirm before opening external links. - - Don't render side list in zen mode, improve performance but lag when exiting zen mode if very high chapter count. + - Context Menu looks. Position in zen mode. + - Anilist data editor changes for better readability. - DEV: - - Context Menu system changed, made modular and context based rather than redux. - - pdf render optimization. + - Cleaned and improved theme maker code. Isolated theme maker, better theme apply and save + - Switched to color library to handle color conversions. ## Fixed -- Epub without toc does not open. -- Epub side-list performance issue, [more in #202](https://github.com/mienaiyami/yomikiru/issues/202#issuecomment-1655858560). -- Epub "open in new window" error. +- fixed #213, default location url edit. +- removing searched history/bookmark by right click removes other instead. +- highlighted bookmark/history if single item and search is off. +- anilist search not focused on clicking "track". +- side-list closes when context menu closes. --- \ No newline at end of file diff --git a/makeAll.js b/makeAll.js deleted file mode 100644 index 7baf8dc..0000000 --- a/makeAll.js +++ /dev/null @@ -1,215 +0,0 @@ -//! obsolete now -// /* eslint-disable @typescript-eslint/no-var-requires */ -// const fs = require("fs"); -// const readline = require("readline"); - -// const rl = readline.createInterface({ -// input: process.stdin, -// output: process.stdout, -// }); - -// const { exec } = require("child_process"); -// const pkgJSON = require("./package.json"); - -// // if (fs.existsSync("./out/full")) { -// // fs.rmSync("./out/full/", { -// // recursive: true -// // }) -// // } -// // fs.mkdirSync("./out/full") -// const printProcessing = (string) => { -// let times = 0; -// return setInterval(() => { -// times++; -// process.stdout.clearLine(); -// process.stdout.cursorTo(0); -// process.stdout.write(string + "".padEnd(times % 4, ".")); -// }, 500); -// // console.log(`\x1b[31m${string} \x1b[0m`) -// }; - -// const makeAndPushTag = () => { -// const a = printProcessing(`Tagging v${pkgJSON.version} and pushing tags`); -// const push = () => { -// const gitSpawn = exec(`git push --tags`); -// gitSpawn.stderr.on("data", (data) => { -// process.stdout.write(`\x1b[91m${data}\x1b[0m`); -// }); -// gitSpawn.on("close", (code) => { -// clearInterval(a); -// console.log(`push tags: spawn yarn child process exited with code ${code}.`); -// pushRelease(); -// }); -// }; -// const gitSpawn = exec(`git tag -a v${pkgJSON.version} -m"v${pkgJSON.version}"`); -// gitSpawn.stderr.on("data", (data) => { -// process.stdout.write(`\x1b[91m${data}\x1b[0m`); -// }); -// gitSpawn.on("close", (code) => { -// console.log(`git tag: spawn yarn child process exited with code ${code}.`); -// push(); -// }); -// }; - -// const pushRelease = () => { -// let changelog = fs.readFileSync("./changelog.md", "utf8"); -// changelog = changelog -// .replaceAll("$$TAG$$", pkgJSON.version) -// .replaceAll("$$EXE_NAME$$", `Yomikiru-${pkgJSON.version}-Setup.exe`) -// .replaceAll("$$EXE_NAME_1$$", `Yomikiru--${pkgJSON.version}--Setup.exe`) -// .replaceAll("$$ZIP_NAME$$", `Yomikiru-win32-${pkgJSON.version}-Portable.zip`) -// .replaceAll("$$ZIP_NAME_1$$", `Yomikiru--win32--${pkgJSON.version}--Portable.zip`); -// // .replaceAll("$$DEB_NAME$$", `Yomikiru-${pkgJSON.version}-amd64.deb`) -// // .replaceAll("$$DEB_NAME_1$$", `Yomikiru--${pkgJSON.version}--amd64.deb`) -// if (fs.existsSync("./changelogTemp.md")) fs.rmSync("./changelogTemp.md"); -// fs.writeFileSync("./changelogTemp.md", changelog); -// const pushCommand = -// `gh release create v${pkgJSON.version} -t v${pkgJSON.version} ` + -// `--discussion-category "General" ` + -// "--generate-notes " + -// " -F changelogTemp.md " + -// // `--notes ""` + -// // "-d " + -// // `./out/full/Manga.Reader-${pkgJSON.version}-Setup.exe ./out/full/Manga.Reader-win32-${pkgJSON.version}-Portable.zip ` + -// `./out/full/Yomikiru-${pkgJSON.version}-Setup.exe ./out/full/Yomikiru-win32-${pkgJSON.version}-Portable.zip `; -// // `./out/full/Yomikiru-${pkgJSON.version}-amd64.deb ` -// const a = printProcessing("Pushing build to gh release "); -// const ghSpawn = exec(pushCommand); -// ghSpawn.stderr.on("data", (data) => { -// process.stdout.write(`\x1b[91m${data}\x1b[0m`); -// }); -// ghSpawn.on("close", (code) => { -// clearInterval(a); -// fs.rmSync("./changelogTemp.md"); -// console.log(`spawn yarn child process exited with code ${code}.`); -// if (code === 0) { -// console.log( -// "\x1b[92mPushed release to github. https://github.com/mienaiyami/yomikiru/releases.\x1b[0m" -// ); - -// const gitSpawn = exec("git push origin"); -// gitSpawn.stderr.on("data", (data) => { -// process.stdout.write(`\x1b[91m${data}\x1b[0m`); -// }); -// gitSpawn.stdout.on("data", (data) => { -// process.stdout.write(data); -// }); -// } -// }); -// }; -// const makeExe = () => { -// fs.writeFileSync( -// "./electron/IS_PORTABLE.ts", -// ` -// const isPortable = false; -// export default isPortable; -// ` -// ); -// const a = printProcessing("making .exe "); -// // console.log(`./out/make/squirrel.windows/ia32/Yomikiru-${pkgJSON.version} Setup.exe`) -// const yarnSpawn = exec("yarn make:exe"); -// // yarnSpawn.stdout.on('data', (data) => { -// // process.stdout.write(data) -// // }); -// yarnSpawn.stderr.on("data", (data) => { -// process.stdout.write(`\x1b[91m${data}\x1b[0m`); -// }); -// yarnSpawn.on("close", (code) => { -// clearInterval(a); -// console.log(`spawn yarn child process exited with code ${code}.`); -// if (fs.existsSync(`./out/make/squirrel.windows/ia32/Yomikiru-${pkgJSON.version} Setup.exe`)) { -// console.log("\x1b[92m.exe create successfully \x1b[0m"); -// console.log("moving .exe ..."); -// fs.rename( -// `./out/make/squirrel.windows/ia32/Yomikiru-${pkgJSON.version} Setup.exe`, -// `./out/full/Yomikiru-${pkgJSON.version}-Setup.exe`, -// (err) => { -// if (err) return console.error(err); -// console.log("\x1b[92mmoved successfully. \x1b[0m"); -// makeZip(); -// } -// ); -// } else { -// console.log("\x1b[91m.exe not found\x1b[0m"); -// } -// }); -// }; -// // const makeDeb = () => { -// // const a = printProcessing('making .deb ') -// // // console.log(`./out/make/squirrel.windows/ia32/Yomikiru-${pkgJSON.version} Setup.exe`) -// // const yarnSpawn = exec("yarn make:deb") -// // // yarnSpawn.stdout.on('data', (data) => { -// // // process.stdout.write(data) -// // // }); -// // yarnSpawn.stderr.on('data', (data) => { -// // process.stdout.write(`\x1b[91m${data}\x1b[0m`) -// // }); -// // yarnSpawn.on('close', (code) => { -// // clearInterval(a) -// // console.log(`spawn yarn child process exited with code ${code}.`); -// // if (fs.existsSync(`./out/make/deb/x64/yomikiru_${pkgJSON.version}_amd64.deb`)) { -// // console.log("\x1b[92m.deb create successfully \x1b[0m") -// // console.log("moving .deb ...") -// // fs.rename(`./out/make/deb/x64/yomikiru_${pkgJSON.version}_amd64.deb`, -// // `./out/full/Yomikiru-${pkgJSON.version}-amd64.deb`, (err) => { -// // if (err) return console.error(err) -// // console.log("\x1b[92mmoved successfully. \x1b[0m") -// // makeZip() -// // }) -// // } else { -// // console.log("\x1b[91m.deb not found\x1b[0m") -// // } -// // }); -// // } - -// const makeZip = () => { -// fs.writeFileSync( -// "./electron/IS_PORTABLE.ts", -// ` -// const isPortable = true; -// export default isPortable; -// ` -// ); -// const a = printProcessing("making .zip "); -// // console.log(`./out/make/zip/win32/ia32/Manga.Reader-win32-${pkgJSON.version}-Portable.zip`) -// const yarnSpawn = exec("yarn make:zip"); -// // yarnSpawn.stdout.on('data', (data) => { -// // process.stdout.write(data) -// // }); -// yarnSpawn.stderr.on("data", (data) => { -// process.stdout.write(`\x1b[91m${data}\x1b[0m`); -// }); -// yarnSpawn.on("close", (code) => { -// clearInterval(a); -// console.log(`spawn yarn child process exited with code ${code}.`); -// if (fs.existsSync(`./out/make/zip/win32/ia32/Yomikiru-win32-ia32-${pkgJSON.version}.zip`)) { -// console.log("\x1b[92m.zip create successfully\x1b[0m"); -// console.log("moving .zip..."); -// fs.rename( -// `./out/make/zip/win32/ia32/Yomikiru-win32-ia32-${pkgJSON.version}.zip`, -// `./out/full/Yomikiru-win32-${pkgJSON.version}-Portable.zip`, -// (err) => { -// if (err) return console.error(err); -// console.log("\x1b[92mmoved successfully.\x1b[0m"); -// fs.writeFileSync( -// "./electron/IS_PORTABLE.ts", -// ` -// const isPortable = false; -// export default isPortable; -// ` -// ); -// makeAndPushTag(); -// // pushRelease() -// } -// ); -// } else { -// console.log("\x1b[91m.zip not found\x1b[0m"); -// } -// }); -// }; - -// rl.question("\x1b[91mMake sure to edit and commit package.json and changelog.md before starting.\x1b[0m", () => { -// makeExe(); -// // pushRelease() -// rl.close(); -// }); diff --git a/package.json b/package.json index 1485eb6..5cc1f33 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "yomikiru", "productName": "Yomikiru", - "version": "2.16.2", + "version": "2.17.0", "description": "App to read manga / comic / epub offline on desktop", "main": ".webpack/main", "author": { @@ -92,4 +92,4 @@ "config": { "forge": "forge.config.js" } -} +} \ No newline at end of file diff --git a/src/Components/Element/InputColorReal.tsx b/src/Components/Element/InputColorReal.tsx index 9f63e63..31413db 100644 --- a/src/Components/Element/InputColorReal.tsx +++ b/src/Components/Element/InputColorReal.tsx @@ -4,6 +4,8 @@ import InputNumber from "./InputNumber"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faEyeDropper, faSort } from "@fortawesome/free-solid-svg-icons"; +// ! not indented to be used without `AppContext::colorSelectData` + const COLOR_FORMATS = ["RGBA", "HEX", "HSLA"] as const; const VALID_SLIDER = { diff --git a/src/Components/Element/MenuList.tsx b/src/Components/Element/MenuList.tsx index e6166ec..c32a1fc 100644 --- a/src/Components/Element/MenuList.tsx +++ b/src/Components/Element/MenuList.tsx @@ -1,6 +1,6 @@ import React, { useRef, useState, useEffect, useLayoutEffect, useContext } from "react"; import { AppContext } from "../../App"; - +// ! not indented to be used without `AppContext::optSelectData` //todo rename later for select only const MenuList = () => { const { optSelectData } = useContext(AppContext);