Skip to content

Build your personal knowledge base with Trilium Notes

feat(ckeditor/watchdog): add a title to the details screen

Elian Doran292cbf138336
diff --git a/apps/client/src/widgets/dialogs/info.tsx b/apps/client/src/widgets/dialogs/info.tsx
index 6587f3dfff..c292db68f8 100644
--- a/apps/client/src/widgets/dialogs/info.tsx
+++ b/apps/client/src/widgets/dialogs/info.tsx
@@ -9,7 +9,7 @@ import { isValidElement } from "preact";
import { ConfirmWithMessageOptions } from "./confirm";
import "./info.css";
-export type InfoExtraProps = Partial<Pick<ModalProps, "size">>;
+export type InfoExtraProps = Partial<Pick<ModalProps, "size" | "title">>;
export type InfoProps = ConfirmWithMessageOptions & InfoExtraProps;
export default function InfoDialog() {
@@ -25,7 +25,7 @@ export default function InfoDialog() {
return (<Modal
className="info-dialog"
size={opts?.size ?? "sm"}
- title={t("info.modalTitle")}
+ title={opts?.title ?? t("info.modalTitle")}
onHidden={() => {
opts?.callback?.();
setShown(false);
diff --git a/apps/client/src/widgets/type_widgets/text/EditableText.tsx b/apps/client/src/widgets/type_widgets/text/EditableText.tsx
index a3a29c0a9d..d451161e1e 100644
--- a/apps/client/src/widgets/type_widgets/text/EditableText.tsx
+++ b/apps/client/src/widgets/type_widgets/text/EditableText.tsx
@@ -312,13 +312,14 @@ function useWatchdogCrashHandling() {
<h3>{t("editable_text.editor_crashed_details_title")}</h3>
<pre>{formattedCrash}</pre>
</>, {
+ title: t("editable_text.editor_crashed_title"),
size: "lg"
});
}
}
]
// timeout: 20_000
- })
+ });
} else if (currentState === "crashedPermanently") {
dialog.info(t("editable-text.keeps-crashing"));
watchdog.editor?.enableReadOnlyMode("crashed-editor");