Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
troyeguo committed May 21, 2023
1 parent 279a929 commit 1ada9ff
Show file tree
Hide file tree
Showing 33 changed files with 867 additions and 439 deletions.
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const configDir = app.getPath("userData");
const { ra } = require("./edge-tts");
const dirPath = path.join(configDir, "uploads");
let mainWin;
let readerWindow;
const singleInstance = app.requestSingleInstanceLock();
var filePath = null;
if (process.platform != "darwin" && process.argv.length >= 2) {
Expand Down Expand Up @@ -150,6 +149,11 @@ const createMainWin = () => {
mainWin.webContents.openDevTools();
event.returnvalue = true;
});
ipcMain.handle("reload", (event, arg) => {
if (readerWindow) {
readerWindow.reload();
}
});
ipcMain.handle("focus-on-main", (event, arg) => {
if (mainWin) {
if (!mainWin.isVisible()) mainWin.show();
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "koodo-reader",
"main": "main.js",
"version": "1.5.4",
"version": "1.5.5",
"description": "A cross-platform ebook reader",
"author": {
"name": "App by Troye",
Expand Down Expand Up @@ -37,6 +37,7 @@
"webdav": "^3.6.2",
"webdav-fs": "^3.0.0",
"ws": "^8.13.0",
"xlsx": "^0.18.5",
"zip-a-folder": "^0.0.12"
},
"devDependencies": {
Expand Down Expand Up @@ -253,6 +254,7 @@
"target": "deb",
"arch": [
"arm64",
"ia32",
"x64"
]
},
Expand All @@ -266,6 +268,7 @@
"target": "AppImage",
"arch": [
"arm64",
"ia32",
"x64"
]
}
Expand Down
9 changes: 9 additions & 0 deletions src/assets/locales/cn/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@
"Ascend": "升序",
"Sort by Name": "按书名",
"Turn on Bionic Reading": "开启仿生阅读",
"Export All Books": "导出所有图书",
"Export All Notes": "导出所有笔记",
"Export All Highlights": "导出所有高亮",
"Export All": "导出全部",
"Export Books": "导出图书",
"Export Notes": "导出笔记",
"Export Highlights": "导出高亮",
"Take effect in a while": "稍后生效",
"Nothing to export": "导出数据为空",
"Token": "凭证",
"Book not exist": "书籍不存在",
"Please authorize your account, and fill the following box with the token": "登录授权后,您将获得一串代码,请将代码填入以下输入框即可完成绑定",
Expand Down
9 changes: 9 additions & 0 deletions src/assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@
"Light Mode": "Light Mode",
"Night Mode": "Night Mode",
"Turn on Bionic Reading": "Turn on Bionic Reading",
"Export All Books": "Export All Books",
"Export All Notes": "Export All Notes",
"Export All Highlights": "Export All Highlights",
"Export All": "Export All",
"Export Books": "Export Books",
"Export Notes": "Export Notes",
"Export Highlights": "Export Highlights",
"Nothing to export": "Nothing to export",
"Take effect in a while": "Take effect in a while",
"Follow OS": "Follow OS",
"Use first page as PDF cover": "Use first page as PDF cover",
"You may see this error when the book you're importing is not supported by Koodo Reader, try converting it with Calibre": "You may see this error when the book you're importing is not supported by Koodo Reader, try converting it with Calibre",
Expand Down
2 changes: 1 addition & 1 deletion src/components/bookCardItem/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class BookCardItem extends React.Component<BookCardProps, BookCardState> {
}}
onMouseLeave={() => {
this.handleConfig(false);
this.props.handleActionDialog(false);
// this.props.handleActionDialog(false);
}}
onContextMenu={(event) => {
this.handleMoreAction(event);
Expand Down
2 changes: 1 addition & 1 deletion src/components/bookCoverItem/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class BookCoverItem extends React.Component<BookCoverProps, BookCoverState> {
}}
onMouseLeave={() => {
this.handleConfig(false);
this.props.handleActionDialog(false);
// this.props.handleActionDialog(false);
}}
onContextMenu={(event) => {
this.handleMoreAction(event);
Expand Down
9 changes: 9 additions & 0 deletions src/components/dialogs/aboutDialog/aboutDialog.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.icon-export-all {
margin-left: 5px;
line-height: 18px;
display: inline-block;
position: relative;
top: 2px;
left: 5px;
transform: rotate(-90deg) scale(0.7);
}
Loading

0 comments on commit 1ada9ff

Please sign in to comment.