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(print): display list of ignored notes
Elian Doran293ef60350b3
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 535c5e04b5..e0c5a49b67 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1773,7 +1773,9 @@"printing_pdf": "Exporting to PDF in progress...","print_report_title": "Print report","print_report_collection_content_one": "{{count}} note in the collection could not be printed because they are not supported or they are protected.",- "print_report_collection_content_other": "{{count}} notes in the collection could not be printed because they are not supported or they are protected."+ "print_report_collection_content_other": "{{count}} notes in the collection could not be printed because they are not supported or they are protected.",+ "print_report_collection_details_button": "See details",+ "print_report_collection_details_ignored_notes": "Ignored notes"},"note_title": {"placeholder": "type note's title here...",diff --git a/apps/client/src/widgets/NoteDetail.tsx b/apps/client/src/widgets/NoteDetail.tsxindex 57b8409993..4ad3743444 100644--- a/apps/client/src/widgets/NoteDetail.tsx+++ b/apps/client/src/widgets/NoteDetail.tsx@@ -7,12 +7,14 @@ import NoteContext from "../components/note_context";import FNote from "../entities/fnote";import type { PrintReport } from "../print";import attributes from "../services/attributes";+import dialog from "../services/dialog";import { t } from "../services/i18n";import protected_session_holder from "../services/protected_session_holder";import toast from "../services/toast.js";import { dynamicRequire, isElectron, isMobile } from "../services/utils";import { ExtendedNoteType, TYPE_MAPPINGS, TypeWidget } from "./note_types";import { useNoteContext, useTriliumEvent } from "./react/hooks";+import NoteList from "./react/NoteList";import { TypeWidgetProps } from "./type_widgets/type_widget";/**@@ -190,7 +192,22 @@ export default function NoteDetail() {id: "print-report",icon: "bx bx-collection",title: t("note_detail.print_report_title"),- message: t("note_detail.print_report_collection_content", { count: printReport.ignoredNoteIds.length })+ message: t("note_detail.print_report_collection_content", { count: printReport.ignoredNoteIds.length }),+ buttons: [+ {+ text: t("note_detail.print_report_collection_details_button"),+ onClick(api) {+ api.dismissToast();+ dialog.info(<>+ <h3>{t("note_detail.print_report_collection_details_ignored_notes")}</h3>+ <NoteList noteIds={printReport.ignoredNoteIds} />+ </>, {+ title: t("note_detail.print_report_title"),+ size: "md"+ });+ }+ }+ ]});}}