mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-10-08 05:50:04 -04:00
Add option to hide sync progress bar during synchronization
This commit is contained in:
1 parent
731bd525ad
commit
ce0c2fceda
7 files changed
+37
-21
No files matched your search
@@ -127,6 +127,7 @@
|
||||
"Account": "Account",
|
||||
"Always keep local data when resolving sync conflicts": "Always keep local data when resolving sync conflicts",
|
||||
"If you update a piece of data that has already been deleted in the cloud before synchronization, it will cause a conflict. In this case, we will keep the cloud data by default. If you turn this option on, we will keep the local data": "If you update a piece of data that has already been deleted in the cloud before synchronization, it will cause a conflict. In this case, we will keep the cloud data by default. If you turn this option on, we will keep the local data",
|
||||
"Hide sync progress bar when syncing": "Hide sync progress bar when syncing",
|
||||
"Encryption failed, error code": "Encryption failed, error code",
|
||||
"Decryption failed, error code": "Decryption failed, error code",
|
||||
"Delete login option": "Delete login option",
|
||||
|
||||
@@ -649,6 +649,7 @@
|
||||
"Send": "发送",
|
||||
"Please add data source in the setting-Sync and backup first": "请先在设置-同步和备份中添加数据源",
|
||||
"If you update a piece of data that has already been deleted in the cloud before synchronization, it will cause a conflict. In this case, we will keep the cloud data by default. If you turn this option on, we will keep the local data": "如果您在同步前更新了一条已经在云端删除的数据,会引发冲突。此时我们默认保留云端数据。如果您开启此选项,我们将保留本地数据",
|
||||
"Hide sync progress bar when syncing": "同步时隐藏同步进度条",
|
||||
"Meticulously designed and built for Android and iOS": "为安卓和 iOS 平台精心设计和开发的客户端",
|
||||
"Official AI OCR": "官方 AI 文字识别",
|
||||
"After three years of design and development, the mobile version of Koodo Reader is finally out": "经过3年的设计和开发,移动版的 Koodo Reader 终于正式上线了",
|
||||
|
||||
@@ -322,6 +322,11 @@ export const syncSettingList = [
|
||||
desc: "If you update a piece of data that has already been deleted in the cloud before synchronization, it will cause a conflict. In this case, we will keep the cloud data by default. If you turn this option on, we will keep the local data",
|
||||
propName: "isKeepLocal",
|
||||
},
|
||||
{
|
||||
isElectron: false,
|
||||
title: "Hide sync progress bar when syncing",
|
||||
propName: "hideSyncProgress",
|
||||
},
|
||||
];
|
||||
export const readingSettingList = [
|
||||
{
|
||||
|
||||
@@ -450,18 +450,20 @@ class Header extends React.Component<HeaderProps, HeaderState> {
|
||||
return false;
|
||||
}
|
||||
if (ConfigService.getReaderConfig("isEnableKoodoSync") !== "yes") {
|
||||
toast.loading(
|
||||
this.props.t("Start syncing") +
|
||||
" (" +
|
||||
this.props.t(
|
||||
driveList.find(
|
||||
(item) =>
|
||||
item.value === ConfigService.getItem("defaultSyncOption")
|
||||
)?.label || ""
|
||||
) +
|
||||
")",
|
||||
{ id: "syncing", position: "bottom-center" }
|
||||
);
|
||||
if (ConfigService.getReaderConfig("hideSyncProgress") !== "yes") {
|
||||
toast.loading(
|
||||
this.props.t("Start syncing") +
|
||||
" (" +
|
||||
this.props.t(
|
||||
driveList.find(
|
||||
(item) =>
|
||||
item.value === ConfigService.getItem("defaultSyncOption")
|
||||
)?.label || ""
|
||||
) +
|
||||
")",
|
||||
{ id: "syncing", position: "bottom-center" }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -534,9 +536,11 @@ class Header extends React.Component<HeaderProps, HeaderState> {
|
||||
this.props.handleFetchBookmarks();
|
||||
this.props.handleFetchNotes();
|
||||
|
||||
toast.success(this.props.t("Synchronisation successful"), {
|
||||
id: "syncing",
|
||||
});
|
||||
if (ConfigService.getReaderConfig("hideSyncProgress") !== "yes") {
|
||||
toast.success(this.props.t("Synchronisation successful"), {
|
||||
id: "syncing",
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
ConfigService.getItem("defaultSyncOption") === "adrive" &&
|
||||
@@ -642,10 +646,12 @@ class Header extends React.Component<HeaderProps, HeaderState> {
|
||||
);
|
||||
return;
|
||||
}
|
||||
toast.loading(this.props.t("Almost finished"), {
|
||||
id: "syncing",
|
||||
position: "bottom-center",
|
||||
});
|
||||
if (ConfigService.getReaderConfig("hideSyncProgress") !== "yes") {
|
||||
toast.loading(this.props.t("Almost finished"), {
|
||||
id: "syncing",
|
||||
position: "bottom-center",
|
||||
});
|
||||
}
|
||||
await this.handleSuccess();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
@@ -54,6 +54,8 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
|
||||
ConfigService.getReaderConfig("isDisableAutoSync") === "yes",
|
||||
isEnableKoodoSync:
|
||||
ConfigService.getReaderConfig("isEnableKoodoSync") === "yes",
|
||||
hideSyncProgress:
|
||||
ConfigService.getReaderConfig("hideSyncProgress") === "yes",
|
||||
driveConfig: {},
|
||||
scheduledSyncInterval:
|
||||
ConfigService.getReaderConfig("scheduledSyncInterval") || "",
|
||||
|
||||
@@ -34,6 +34,7 @@ export interface SettingInfoState {
|
||||
isEnableKoodoSync: boolean;
|
||||
isDisableAutoSync: boolean;
|
||||
autoOffline: boolean;
|
||||
hideSyncProgress: boolean;
|
||||
driveConfig: any;
|
||||
scheduledSyncInterval: string;
|
||||
backupDrive: string;
|
||||
|
||||
+2
-2
@@ -1195,7 +1195,7 @@ export const showTaskProgress = async (
|
||||
let stats = await window
|
||||
.require("electron")
|
||||
.ipcRenderer.invoke("cloud-stats", config);
|
||||
if (stats.total > 0) {
|
||||
if (stats.total > 0 && ConfigService.getReaderConfig("hideSyncProgress") !== "yes") {
|
||||
toast.loading(
|
||||
i18n.t("Start Transferring Data") +
|
||||
" (" +
|
||||
@@ -1220,7 +1220,7 @@ export const showTaskProgress = async (
|
||||
} else {
|
||||
let syncUtil = await SyncService.getSyncUtil();
|
||||
let stats = await syncUtil.getStats();
|
||||
if (stats.total > 0) {
|
||||
if (stats.total > 0 && ConfigService.getReaderConfig("hideSyncProgress") !== "yes") {
|
||||
toast.loading(
|
||||
i18n.t("Start Transferring Data") +
|
||||
" (" +
|
||||
|
||||
Reference in new issue
Block a user