Skip to content

Build your personal knowledge base with Trilium Notes

feat(desktop): drop the Ignore button from the upload toast

Elian Dorancece87b840ed
diff --git a/apps/client/src/services/file_watcher.spec.ts b/apps/client/src/services/file_watcher.spec.ts
index 53f9b4a469..1848269954 100644
--- a/apps/client/src/services/file_watcher.spec.ts
+++ b/apps/client/src/services/file_watcher.spec.ts
@@ -67,18 +67,13 @@ describe("file_watcher", () => {
expect(shown.id).toBe("opened-file-updated-notes-noteA");
expect(shown.timeout).toBeUndefined();
expect(shown.notes).toEqual([ "noteA" ]);
- expect(shown.buttons).toHaveLength(2);
+ expect(shown.buttons).toHaveLength(1);
- const [ upload, ignore ] = shown.buttons ?? [];
+ const [ upload ] = shown.buttons ?? [];
const dismissToast = vi.fn();
await upload.onClick({ dismissToast });
expect(post).toHaveBeenCalledWith("notes/noteA/upload-modified-file", { filePath: "/tmp/noteA" });
expect(dismissToast).toHaveBeenCalledOnce();
-
- dismissToast.mockClear();
- await ignore.onClick({ dismissToast });
- expect(post).toHaveBeenCalledOnce();
- expect(dismissToast).toHaveBeenCalledOnce();
});
it("links an attachment's toast to its owner note", async () => {
diff --git a/apps/client/src/services/file_watcher.ts b/apps/client/src/services/file_watcher.ts
index f96fc521a2..e7586148a4 100644
--- a/apps/client/src/services/file_watcher.ts
+++ b/apps/client/src/services/file_watcher.ts
@@ -47,10 +47,6 @@ async function showUploadToast({ entityType, entityId, filePath, lastModifiedMs
await server.post(`${entityType}/${entityId}/upload-modified-file`, { filePath });
dismissToast();
}
- },
- {
- text: t("watched_file_update_status.ignore_this_change"),
- onClick: ({ dismissToast }) => dismissToast()
}
]
});
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 53b53cdc96..3affcf6da2 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -2973,8 +2973,7 @@
"watched_file_update_status": {
"title": "File changed outside Trilium",
"message": "The file opened externally was saved at {{time}}. Uploading it replaces the content in Trilium; the current version is kept as a revision.",
- "upload_modified_file": "Upload",
- "ignore_this_change": "Ignore"
+ "upload_modified_file": "Upload"
},
"app_context": {
"please_wait_for_save": "Please wait for a couple of seconds for the save to finish, then you can try again."