mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
feat(ckeditor/watchdog): add a title to the details screen
This commit is contained in:
parent
37a14fefb3
commit
292cbf1383
@ -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);
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user