Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from troyeguo:master #22

Merged
merged 25 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
- type: checkboxes
id: testing1
attributes:
label: I've already installed the latest developer version of Koodo Reader, this problem still exsits
label: I've already installed the latest developer version of Koodo Reader from Github Release, this problem still exsits
description: https://github.com/troyeguo/koodo-reader/releases/latest
options:
- label: "Yes"
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/4bug_report_cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body:
- type: checkboxes
id: testing1
attributes:
label: 我已经安装了最新开发版的 Koodo Reader,这个问题仍然存在
label: 我已经从 Github Release 安装了最新开发版的 Koodo Reader,这个问题仍然存在
description: https://github.com/troyeguo/koodo-reader/releases/latest
options:
- label: "Yes"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 18

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1.2.0
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
- Install with Scoop:

```shell
scoop bucket add dorado https://github.com/chawyehsu/dorado
scoop install dorado/koodo-reader
scoop bucket add extras
scoop install extras/koodo-reader
```

- Install with Winget:
Expand Down Expand Up @@ -111,7 +111,7 @@ flatpak run io.github.troyeguo.koodo-reader

## Develop

Make sure that you have installed yarn and git, node's version on your computer is 14.x.x.
Make sure that you have installed yarn and git

1. Download the repo

Expand Down
6 changes: 3 additions & 3 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
- 使用 Scoop 安装:

```shell
scoop bucket add dorado https://github.com/chawyehsu/dorado
scoop install dorado/koodo-reader
scoop bucket add extras
scoop install extras/koodo-reader
```

- 使用 Winget 安装:
Expand Down Expand Up @@ -108,7 +108,7 @@ flatpak run io.github.troyeguo.koodo-reader

## 运行源码

请确保您电脑的 node 的版本为 14.x.x,已配置好 yarn,git 的运行环境。
请确保您电脑已配置好 yarn,git 的运行环境。

1. 将项目源码下载到本地

Expand Down
6 changes: 3 additions & 3 deletions README_pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
- Instalar com o Scoop:

```shell
scoop bucket add dorado https://github.com/chawyehsu/dorado
scoop install dorado/koodo-reader
scoop bucket add extras
scoop install extras/koodo-reader
```

- Instalar com o Winget:
Expand Down Expand Up @@ -111,7 +111,7 @@ flatpak run io.github.troyeguo.koodo-reader

## Desenvolver

Certifique-se de ter instalado yarn e git, a versão, a versão do node deverá ser superior ou igual a 14.0.0.
Certifique-se de ter instalado yarn e git, a versão.

1. Baixe o repositório

Expand Down
16 changes: 15 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const fs = require("fs");
const configDir = app.getPath("userData");
const { ra } = require("./edge-tts");
const dirPath = path.join(configDir, "uploads");
const { Blob } = require("buffer");
let mainWin;
const singleInstance = app.requestSingleInstanceLock();
var filePath = null;
Expand Down Expand Up @@ -156,6 +155,21 @@ const createMainWin = () => {
});
return path;
});
ipcMain.handle("get-url-content", async (event, config) => {
const axios = require("axios");
try {
const response = await axios.get(config.url, {
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
},
});
return response.data;
} catch (error) {
console.error(error);
return null;
}
});
ipcMain.on("storage-location", (event, arg) => {
event.returnValue = path.join(dirPath, "data");
});
Expand Down
34 changes: 16 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "koodo-reader",
"main": "main.js",
"version": "1.5.7",
"version": "1.5.9",
"description": "A cross-platform ebook reader",
"author": {
"name": "App by Troye",
"email": "support@960960.xyz"
},
"engines": {
"node": "<15.0.0",
"node": "18.x",
"npm": ">=6.0.0"
},
"repository": "https://github.com/troyeguo/koodo-reader",
Expand All @@ -27,21 +27,20 @@
"electron-is-dev": "^1.1.0",
"electron-store": "^8.0.1",
"epub-cfi-resolver": "^1.0.2",
"fast-average-color": "^9.4.0",
"font-list": "^1.4.5",
"fs-extra": "^9.1.0",
"howler": "^2.2.3",
"react-hot-toast": "^2.1.1",
"request": "^2.88.2",
"webdav": "^3.6.2",
"webdav-fs": "^3.0.0",
"wink-lemmatizer": "^3.0.4",
"ws": "^8.13.0",
"zip-a-folder": "^0.0.12"
},
"devDependencies": {
"@types/chardet": "^0.8.1",
"@types/express": "^4.17.15",
"@types/i18next": "^13.0.0",
"@types/marked": "^2.0.2",
"@types/md5": "^2.2.0",
"@types/node": "^13.13.2",
"@types/react": "17.0.2",
Expand All @@ -51,8 +50,7 @@
"@types/react-redux": "^7.1.7",
"@types/react-router-dom": "^5.1.6",
"@types/spark-md5": "^3.0.2",
"@types/underscore": "^1.10.24",
"@types/ws": "^8.5.4",
"@types/ws": "^8.5.5",
"classnames": "^2.2.6",
"concurrently": "^5.0.1",
"cross-env": "^6.0.3",
Expand All @@ -62,7 +60,7 @@
"html-react-parser": "^0.13.0",
"i18next": "^20.2.4",
"md5": "^2.3.0",
"node-sass": "^4.13.0",
"node-sass": "^9.0.0",
"nodemon": "^2.0.6",
"rc-color-picker": "^1.2.6",
"react": "^17.0.2",
Expand All @@ -73,14 +71,14 @@
"react-lottie": "^1.2.3",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-scripts": "^5.0.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"sass-loader": "^8.0.0",
"sass-loader": "^13.3.2",
"source-map-explorer": "^2.5.2",
"spark-md5": "^3.0.1",
"typescript": "3.8.3",
"wait-on": "^3.3.0"
"wait-on": "^7.0.1"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
Expand All @@ -89,7 +87,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"ele": "electron .",
"dev": "concurrently \"cross-env BROWSER=none npm start\" \"wait-on http://localhost:3000/ && nodemon --watch main.js --exec electron .\"",
"dev": "concurrently \"cross-env BROWSER=none npm start\" \"wait-on http://127.0.0.1:3000/ && nodemon --watch main.js --exec electron .\"",
"release": "electron-builder",
"prerelease": "react-scripts build"
},
Expand Down Expand Up @@ -124,6 +122,12 @@
"role": "Viewer",
"mimeType": "application/pdf"
},
{
"ext": "djvu",
"icon": "assets/icons/pdf",
"role": "Viewer",
"mimeType": "image/vnd.djvu"
},
{
"ext": "mobi",
"icon": "assets/icons/mobi",
Expand All @@ -142,12 +146,6 @@
"role": "Viewer",
"mimeType": "application/vnd.amazon.ebook"
},
{
"ext": "djvu",
"icon": "assets/icons/pdf",
"role": "Viewer",
"mimeType": "image/vnd.djvu"
},
{
"ext": "cbz",
"icon": "assets/icons/comic",
Expand Down
Loading
Loading