mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-25 14:31:33 +08:00
feat(mermaid): add visual indicator for preview on error
This commit is contained in:
parent
f42a89a548
commit
9985e9b623
@ -35,6 +35,14 @@ const TPL = `\
|
|||||||
margin: 0.1em;
|
margin: 0.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.note-detail-split .note-detail-split-preview {
|
||||||
|
transition: opacity 250ms ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note-detail-split .note-detail-split-preview.on-error {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/* Horizontal layout */
|
/* Horizontal layout */
|
||||||
|
|
||||||
.note-detail-split.split-horizontal > .note-detail-split-second-col {
|
.note-detail-split.split-horizontal > .note-detail-split-second-col {
|
||||||
@ -139,6 +147,7 @@ export default abstract class AbstractSplitTypeWidget extends TypeWidget {
|
|||||||
|
|
||||||
setError(message: string | null | undefined) {
|
setError(message: string | null | undefined) {
|
||||||
this.$errorContainer.toggleClass("hidden-ext", !message);
|
this.$errorContainer.toggleClass("hidden-ext", !message);
|
||||||
|
this.$preview.toggleClass("on-error", !!message);
|
||||||
this.$errorContainer.text(message ?? "");
|
this.$errorContainer.text(message ?? "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user