fix: adjust layout and margins in login page, update cover handling, and enhance security messages

This commit is contained in:
troyeguo
2025-06-09 09:23:33 +08:00
parent 9324c6f4df
commit 7038640625
10 changed files with 22 additions and 19 deletions

View File

@@ -6,10 +6,6 @@
<link rel="dns-prefetch" href="https://web.koodoreader.com" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="epub reader free koodo" />
<meta
http-equiv="Content-Security-Policy"
content="upgrade-insecure-requests"
/>
<meta
itemprop="name"
content="Koodo Reader - Free Epub Reader for Windows, Mac and Web"

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -101,7 +101,7 @@
"This process is inreversible, and will completely overwrite your current library, make sure you know what you're doing before proceeding": "这个过程是不可逆的,并且会完全覆盖现有的图书库",
"Lemmatize words when looking up in a dictionary": "查询单词前将词性还原",
"To reduce the different forms of a word to one single form, for example, reducing builds, building or built to build, reducing cats to cat, reducing fastest to fast": "将不同变形的单词还原成单词原形例如将builds, building 和 built 还原为 build将cats还原为catfastest还原成fast",
"Some S3 services are not compatible with browser environments. If you encounter connection issues, please refer to the service provider's official documentation for instructions on enabling CORS.": "某些 S3 服务不支持浏览器环境,如果您遇到连接问题,请参考服务提供商的官方文档,了解如何开启 CORS",
"Some S3 services are not compatible with browser environments. If you encounter connection issues, please refer to the service provider's official documentation for instructions on enabling CORS. Also due to browser's security restrictions, the S3 service must be accessed via HTTPS protocol when you're visiting Koodo Reader via HTTPS protocal.": "某些 S3 服务不支持浏览器环境,如果您遇到连接问题,请参考服务提供商的官方文档,了解如何开启 CORS。由于浏览器的安全限制当您通过 HTTPS 协议访问 Koodo Reader时 S3 服务也必须通过 HTTPS 协议访问。",
"Export all books": "导出所有图书",
"Export all dictionary history": "导出所有查词历史",
"Export dictionary history": "导出查词历史",
@@ -251,7 +251,7 @@
"Margin": "页边距",
"Do you want to open this link in browser": "是否使用浏览器打开此链接",
"WebDAV Info": "WebDAV是一种简单高效的数据备份方式这里推荐使用坚果云提供的WebDAV服务",
"The Koodo Reader Docker version does not support the data source feature by default. You need to modify the configuration parameters during deployment to manually enable it": "Koodo Reader Docker 版默认不支持数据源功能,您需要在部署时修改配置参数手动开启",
"The Koodo Reader Docker version does not support the data source feature by default. You need to modify the configuration parameters during deployment to manually enable it. Also due to browser's security restrictions, the Docker service must be accessed via HTTPS protocol when you're visiting Koodo Reader via HTTPS protocal.": "Koodo Reader Docker 版默认不支持数据源功能,您需要在部署时修改配置参数手动开启。由于浏览器的安全限制,当您通过 HTTPS 协议访问 Koodo Reader 时, Docker 服务也必须通过 HTTPS 协议访问。",
"Please wait": "请稍侯",
"Grant access to local folder to save your data and reduce the risk of data loss": "授权访问本地文件夹来保存您的数据,减少数据丢失的风险",
"Never lose your data": "不要丢失您的数据",
@@ -623,7 +623,7 @@
"Updated successfully": "更新成功",
"Enable this option to increase synchronization speed. Your reading progress, notes, highlights, bookmarks, and other reading-related data will be stored and synced via our cloud service, your books and covers will still be synced by your added data sources. Turning off this option will remove the above data from our cloud.": "启用此选项以提高同步速度。您的阅读进度、笔记、高亮、书签等阅读相关数据将通过我们的云服务进行存储和同步,您的图书和封面仍将由您添加的数据源同步。关闭此选项将从我们的云端删除上述数据",
"Access may be unstable in China": "国内网络访问可能不稳定",
"Only WebDAV service provided by Alist is directly supported in Browser, Other WebDAV services need to enable CORS to work properly": "由于浏览器的限制,仅支持 Alist 提供的 WebDAV 服务,其他 WebDAV 服务需要开启 CORS 才能正常使用",
"Only WebDAV service provided by Alist is directly supported in Browser, Other WebDAV services need to enable CORS to work properly. Also due to browser's security restrictions, the WebDAV service must be accessed via HTTPS protocol when you're visiting Koodo Reader via HTTPS protocal.": "由于浏览器的限制,仅支持 Alist 提供的 WebDAV 服务,其他 WebDAV 服务需要开启 CORS 才能正常使用。同时,由于浏览器的安全限制,当您通过 HTTPS 协议访问 Koodo Reader 时WebDAV 服务也必须通过 HTTPS 协议访问。",
"Enable Koodo Sync": "启用 Koodo Sync",
"Disable automatic sync": "禁用自动同步",
"By default, Koodo Reader will automatically synchronize your data when you open the app and exit reading": "默认情况下Koodo Reader 会在您打开应用和退出阅读时自动同步数据",

View File

@@ -73,11 +73,7 @@ class LocalFileDialog extends React.Component<
if (directoryHandle) {
// 成功获取权限
ConfigService.setReaderConfig("isUseLocal", "yes");
ConfigService.setReaderConfig(
"localDirectoryName",
directoryHandle.name
);
toast.loading(
this.props.t("Granting access to local folder, please wait"),
{
@@ -90,7 +86,11 @@ class LocalFileDialog extends React.Component<
isFinish: true,
hasLocalAccess: true,
});
ConfigService.setReaderConfig("isUseLocal", "yes");
ConfigService.setReaderConfig(
"localDirectoryName",
directoryHandle.name
);
this.showMessage("Local folder access granted successfully");
this.props.handleFetchBooks();
setTimeout(() => {

View File

@@ -362,7 +362,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
}}
>
{this.props.t(
"Only WebDAV service provided by Alist is directly supported in Browser, Other WebDAV services need to enable CORS to work properly"
"Only WebDAV service provided by Alist is directly supported in Browser, Other WebDAV services need to enable CORS to work properly. Also due to browser's security restrictions, the WebDAV service must be accessed via HTTPS protocol when you're visiting Koodo Reader via HTTPS protocal."
)}
</div>
)}
@@ -377,7 +377,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
}}
>
{this.props.t(
"The Koodo Reader Docker version does not support the data source feature by default. You need to modify the configuration parameters during deployment to manually enable it"
"The Koodo Reader Docker version does not support the data source feature by default. You need to modify the configuration parameters during deployment to manually enable it. Also due to browser's security restrictions, the Docker service must be accessed via HTTPS protocol when you're visiting Koodo Reader via HTTPS protocal."
)}
</div>
)}
@@ -392,7 +392,7 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
}}
>
{this.props.t(
"Some S3 services are not compatible with browser environments. If you encounter connection issues, please refer to the service provider's official documentation for instructions on enabling CORS."
"Some S3 services are not compatible with browser environments. If you encounter connection issues, please refer to the service provider's official documentation for instructions on enabling CORS. Also due to browser's security restrictions, the S3 service must be accessed via HTTPS protocol when you're visiting Koodo Reader via HTTPS protocal."
)}
</div>
)}

View File

@@ -438,6 +438,7 @@ class Login extends React.Component<LoginProps, LoginState> {
style={{
borderWidth: "0px",
right: "0px",
bottom: "10px",
}}
>
{this.props.t("Skip")}

View File

@@ -154,6 +154,7 @@
width: 90%;
height: 50%;
margin: 0 auto;
margin-top: -20px;
/*实现三乘三的布局*/
display: grid;
grid-template-columns: 1fr 1fr 1fr;

View File

@@ -152,7 +152,7 @@ class CoverUtil {
await this.uploadCover(
book.key + "." + this.base64ToFileType(coverBase64)
);
book.cover = "";
// book.cover = "";
}
}
static convertCoverBase64(base64: string) {

View File

@@ -545,6 +545,11 @@ export const exportToLocalFile = async (): Promise<void> => {
}
}
}
let records = await DatabaseService.getAllRecords(dbName);
if (!records || records.length === 0) {
console.warn(`No records found in database ${dbName}`);
continue;
}
let dbBuffer = await DatabaseService.getDbBuffer(dbName);
if (!dbBuffer) {
console.error(`Database buffer for ${dbName} is null`);