mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 21:07:05 -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 { ConfirmWithMessageOptions } from "./confirm";
|
||||||
import "./info.css";
|
import "./info.css";
|
||||||
|
|
||||||
export type InfoExtraProps = Partial<Pick<ModalProps, "size">>;
|
export type InfoExtraProps = Partial<Pick<ModalProps, "size" | "title">>;
|
||||||
export type InfoProps = ConfirmWithMessageOptions & InfoExtraProps;
|
export type InfoProps = ConfirmWithMessageOptions & InfoExtraProps;
|
||||||
|
|
||||||
export default function InfoDialog() {
|
export default function InfoDialog() {
|
||||||
@ -25,7 +25,7 @@ export default function InfoDialog() {
|
|||||||
return (<Modal
|
return (<Modal
|
||||||
className="info-dialog"
|
className="info-dialog"
|
||||||
size={opts?.size ?? "sm"}
|
size={opts?.size ?? "sm"}
|
||||||
title={t("info.modalTitle")}
|
title={opts?.title ?? t("info.modalTitle")}
|
||||||
onHidden={() => {
|
onHidden={() => {
|
||||||
opts?.callback?.();
|
opts?.callback?.();
|
||||||
setShown(false);
|
setShown(false);
|
||||||
|
|||||||
@ -312,13 +312,14 @@ function useWatchdogCrashHandling() {
|
|||||||
<h3>{t("editable_text.editor_crashed_details_title")}</h3>
|
<h3>{t("editable_text.editor_crashed_details_title")}</h3>
|
||||||
<pre>{formattedCrash}</pre>
|
<pre>{formattedCrash}</pre>
|
||||||
</>, {
|
</>, {
|
||||||
|
title: t("editable_text.editor_crashed_title"),
|
||||||
size: "lg"
|
size: "lg"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// timeout: 20_000
|
// timeout: 20_000
|
||||||
})
|
});
|
||||||
} else if (currentState === "crashedPermanently") {
|
} else if (currentState === "crashedPermanently") {
|
||||||
dialog.info(t("editable-text.keeps-crashing"));
|
dialog.info(t("editable-text.keeps-crashing"));
|
||||||
watchdog.editor?.enableReadOnlyMode("crashed-editor");
|
watchdog.editor?.enableReadOnlyMode("crashed-editor");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user