From 26b89fc801f9a5d09090890f1b000c1dec89ec49 Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 30 Sep 2021 12:23:22 +0200 Subject: [PATCH] fix note revisions not displaying content length --- src/becca/entities/note_revision.js | 4 +++- src/public/app/services/frontend_script_api.js | 16 ++++++++++++++-- src/public/app/widgets/mermaid.js | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/becca/entities/note_revision.js b/src/becca/entities/note_revision.js index d90649231..af51687a5 100644 --- a/src/becca/entities/note_revision.js +++ b/src/becca/entities/note_revision.js @@ -167,12 +167,14 @@ class NoteRevision extends AbstractEntity { dateCreated: this.dateCreated, utcDateLastEdited: this.utcDateLastEdited, utcDateCreated: this.utcDateCreated, - utcDateModified: this.utcDateModified + utcDateModified: this.utcDateModified, + contentLength: this.contentLength }; } getPojoToSave() { const pojo = this.getPojo(); + delete pojo.contentLength; // not getting persisted if (pojo.isProtected) { if (protectedSessionService.isProtectedSessionAvailable()) { diff --git a/src/public/app/services/frontend_script_api.js b/src/public/app/services/frontend_script_api.js index 973b2901a..249e35829 100644 --- a/src/public/app/services/frontend_script_api.js +++ b/src/public/app/services/frontend_script_api.js @@ -39,12 +39,24 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain /** @property {CollapsibleWidget} */ this.CollapsibleWidget = CollapsibleWidget; - /** @property {NoteContextAwareWidget} */ + /** + * @property {NoteContextAwareWidget} + * @deprecated use NoteContextAwareWidget instead + */ this.TabAwareWidget = NoteContextAwareWidget; - /** @property {NoteContextCachingWidget} */ + /** @property {NoteContextAwareWidget} */ + this.NoteContextAwareWidget = NoteContextAwareWidget; + + /** + * @property {NoteContextCachingWidget} + * @deprecated use NoteContextCachingWidget instead + */ this.TabCachingWidget = NoteContextCachingWidget; + /** @property {NoteContextAwareWidget} */ + this.NoteContextCachingWidget = NoteContextCachingWidget; + /** @property {BasicWidget} */ this.BasicWidget = BasicWidget; diff --git a/src/public/app/widgets/mermaid.js b/src/public/app/widgets/mermaid.js index fa26149bd..04a6b838a 100644 --- a/src/public/app/widgets/mermaid.js +++ b/src/public/app/widgets/mermaid.js @@ -10,6 +10,7 @@ const TPL = `
min-height: 200px; border-bottom: 1px solid var(--main-border-color); padding: 20px; + margin-bottom: 10px; display: flex; justify-content: space-around; /* centering rendered SVG */ flex-basis: 0;