Remove console.log statements from various components to clean up the code and reduce unnecessary logging. This includes the ImportDialog, NoteTag, PopupNote, PopupRefer, SyncSetting, and common utility functions.

This commit is contained in:
troyeguo committed 2025-08-17 07:59:07 +08:00
1 parent d1d90feef3
commit e89b8ac1f0
7 files changed
+1 -13

No files matched your search

+1 -1
View File
File diff suppressed because one or more lines are too long.
@@ -267,7 +267,6 @@ class ImportDialog extends React.Component<
try {
let pickerUtil: any = await SyncService.getPickerUtil("google");
await pickerUtil.remote.refreshToken();
console.log("Using Google Picker with access token:", pickerUtil.remote);
this.googlePickerUtil = new GooglePickerUtil({
accessToken: pickerUtil.remote.config.access_token,
apiKey: "",
-1
View File
@@ -72,7 +72,6 @@ class NoteTag extends React.Component<NoteTagProps, NoteTagState> {
return;
}
ConfigService.setListConfig(event.target.value, "noteTags");
console.log(this.props.tag, this.tagToIndex(this.props.tag));
this.setState({ tagIndex: this.tagToIndex(this.props.tag) });
this.props.handleTag(this.indextoTag(this.tagToIndex(this.props.tag)));
};
@@ -193,7 +193,6 @@ class PopupNote extends React.Component<PopupNoteProps, PopupNoteState> {
}
});
}
console.log("PopupNote render", this.props.noteKey, note);
const renderNoteEditor = () => {
return (
@@ -82,10 +82,8 @@ class PopupRefer extends React.Component<PopupReferProps, PopupReferStates> {
rendition: any = {}
): Promise<boolean> => {
let href = getTargetHref(event);
console.log("handleLinkJump2123", href);
if (href && href.startsWith("kindle:")) {
console.log(href);
let chapterInfo = rendition.resolveChapter(href);
if (chapterInfo) {
await rendition.goToChapter(
@@ -100,7 +98,6 @@ class PopupRefer extends React.Component<PopupReferProps, PopupReferStates> {
return false;
}
let currentPosition = rendition.getPosition();
console.log(result, "---", currentPosition);
if (result.index === parseInt(currentPosition.chapterDocIndex)) {
let doc = getIframeDoc(this.props.currentBook.format)[0];
let node = result.anchor(doc);
@@ -129,11 +129,6 @@ class SyncSetting extends React.Component<SettingInfoProps, SettingInfoState> {
}
ConfigService.deleteListConfig(targetDrive, "dataSourceList");
this.props.handleFetchDataSourceList();
console.log(
"targetDrive",
targetDrive,
ConfigService.getItem("defaultSyncOption")
);
if (targetDrive === ConfigService.getItem("defaultSyncOption")) {
ConfigService.removeItem("defaultSyncOption");
this.props.handleFetchDefaultSyncOption();
-1
View File
@@ -809,7 +809,6 @@ export const clearAllData = async () => {
if (isElectron) {
let storageLocation = getStorageLocation();
const fs = window.require("fs");
console.log(`Clearing all data in ${storageLocation}`);
let databaseList = CommonTool.databaseList;
for (let i = 0; i < databaseList.length; i++) {
await window.require("electron").ipcRenderer.invoke("close-database", {