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

This commit is contained in:
Elian Doran 2025-12-07 21:03:26 +02:00
parent 37a14fefb3
commit 292cbf1383
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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");