Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(client): remove unnecessary logs
Elian Doran1de9634c4435
diff --git a/apps/client/src/widgets/collections/NoteList.tsx b/apps/client/src/widgets/collections/NoteList.tsxindex 98d9a3febf..63eb64a993 100644--- a/apps/client/src/widgets/collections/NoteList.tsx+++ b/apps/client/src/widgets/collections/NoteList.tsx@@ -123,7 +123,6 @@ function useNoteIds(note: FNote | null | undefined, viewType: ViewTypeOptions |}async function getNoteIds(note: FNote) {- console.log("Refreshed note IDs");if (viewType === "list" || viewType === "grid") {return note.getChildNoteIds();} else {diff --git a/apps/client/src/widgets/collections/geomap/map.tsx b/apps/client/src/widgets/collections/geomap/map.tsxindex faf2ec654d..da9c2173bd 100644--- a/apps/client/src/widgets/collections/geomap/map.tsx+++ b/apps/client/src/widgets/collections/geomap/map.tsx@@ -68,7 +68,6 @@ export default function Map({ coordinates, zoom, layerName, viewportChanged, chiuseEffect(() => {const map = mapRef.current;const layerToAdd = layer;- console.log("Add layer ", map, layerToAdd);if (!map || !layerToAdd) return;layerToAdd.addTo(map);return () => layerToAdd.removeFrom(map);diff --git a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsxindex 08241f9316..32cae708b3 100644--- a/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx+++ b/apps/client/src/widgets/ribbon/components/AttributeEditor.tsx@@ -132,7 +132,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIif (htmlAttrs.length > 0) {htmlAttrs += " ";- }+ }editorRef.current?.setText(htmlAttrs);setCurrentValue(htmlAttrs);@@ -233,7 +233,6 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIuseEffect(() => refresh(), [ note ]);useTriliumEvent("entitiesReloaded", ({ loadResults }) => {if (loadResults.getAttributeRows(componentId).find((attr) => attributes.isAffecting(attr, note))) {- console.log("Trigger due to entities reloaded");refresh();}});@@ -262,8 +261,8 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxI}return result?.note?.getBestNotePathString();- }- }), [ notePath ]));+ }+ }), [ notePath ]));// Keyboard shortcutsuseTriliumEvent("addNewLabel", ({ ntxId: eventNtxId }) => {@@ -281,7 +280,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIrefresh,renderOwnedAttributes: (attributes) => renderOwnedAttributes(attributes as FAttribute[], false)}), [ save, refresh, renderOwnedAttributes ]);-+return (<>{!hidden && <div@@ -292,7 +291,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIif (isIMEComposing(e)) {return;}-+if (e.key === "Enter") {// allow autocomplete to fill the result textareasetTimeout(() => save(), 100);@@ -313,9 +312,9 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxI}}onChange={(currentValue) => {currentValueRef.current = currentValue ?? "";-+const oldValue = getPreprocessedData(lastSavedContent.current ?? "").trimEnd();- const newValue = getPreprocessedData(currentValue ?? "").trimEnd();+ const newValue = getPreprocessedData(currentValue ?? "").trimEnd();setNeedsSaving(oldValue !== newValue);setError(undefined);}}@@ -351,7 +350,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIx: e.pageX,y: e.pageY});- setState("showAttributeDetail");+ setState("showAttributeDetail");} else {setState("showHelpTooltip");}@@ -373,7 +372,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxIonClick={save}/> }- <ActionButton+ <ActionButtonicon="bx bx-plus"className="add-new-attribute-button tn-tool-button"text={escapeQuotes(t("attribute_editor.add_a_new_attribute"))}@@ -407,7 +406,7 @@ export default function AttributeEditor({ api, note, componentId, notePath, ntxI{attributeDetailWidgetEl}</>- )+ )}function getPreprocessedData(currentValue: string) {