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
feat(export): show 'Preparing for export' during the metadata phase
Elian Doranec37af03378c
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 3588e6b7dc..9c4246670c 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -149,7 +149,7 @@"result_single_markdown": "A single Markdown (.md) file.","export": "Export","choose_export_type": "Choose export type first please",- "export_in_progress": "Export in progress: {{progressCount}}",+ "preparing_export": "Preparing for export…","export_in_progress_with_total": "Exporting {{progressCount}} of {{totalCount}}","export_finished_successfully": "Export finished successfully.","format_pdf": "PDF - for printing or sharing purposes."diff --git a/apps/client/src/widgets/dialogs/export.tsx b/apps/client/src/widgets/dialogs/export.tsxindex 54ebdbbe69..5ff4c7ec8f 100644--- a/apps/client/src/widgets/dialogs/export.tsx+++ b/apps/client/src/widgets/dialogs/export.tsx@@ -184,8 +184,8 @@ ws.subscribeToMessages(async (message) => {/*** Builds the persistent "export in progress" toast. The metadata-collection phase doesn't know the total- * up front, so it shows a bare running count; once the content-writing phase sets a total, the message- * switches to "Exporting X of N" with a progress bar.+ * up front, so it shows an indeterminate "Preparing for export…" message; once the content-writing phase+ * sets a total, the message switches to "Exporting X of N" with a progress bar.*/function makeProgressToast(taskId: string, progressCount: number, totalCount?: number): ToastOptionsWithRequiredId {const hasTotal = typeof totalCount === "number" && totalCount > 0;@@ -194,7 +194,7 @@ function makeProgressToast(taskId: string, progressCount: number, totalCount?: nicon: "bx bx-loader-circle bx-spin",message: hasTotal? t("export.export_in_progress_with_total", { progressCount, totalCount })- : t("export.export_in_progress", { progressCount }),+ : t("export.preparing_export"),...(hasTotal ? { progress: progressCount / totalCount } : {})};}