fix note revisions not displaying content length

This commit is contained in:
zadam 2021-09-30 12:23:22 +02:00
parent af3fd61974
commit 26b89fc801
3 changed files with 18 additions and 3 deletions

View File

@ -167,12 +167,14 @@ class NoteRevision extends AbstractEntity {
dateCreated: this.dateCreated, dateCreated: this.dateCreated,
utcDateLastEdited: this.utcDateLastEdited, utcDateLastEdited: this.utcDateLastEdited,
utcDateCreated: this.utcDateCreated, utcDateCreated: this.utcDateCreated,
utcDateModified: this.utcDateModified utcDateModified: this.utcDateModified,
contentLength: this.contentLength
}; };
} }
getPojoToSave() { getPojoToSave() {
const pojo = this.getPojo(); const pojo = this.getPojo();
delete pojo.contentLength; // not getting persisted
if (pojo.isProtected) { if (pojo.isProtected) {
if (protectedSessionService.isProtectedSessionAvailable()) { if (protectedSessionService.isProtectedSessionAvailable()) {

View File

@ -39,12 +39,24 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
/** @property {CollapsibleWidget} */ /** @property {CollapsibleWidget} */
this.CollapsibleWidget = CollapsibleWidget; this.CollapsibleWidget = CollapsibleWidget;
/** @property {NoteContextAwareWidget} */ /**
* @property {NoteContextAwareWidget}
* @deprecated use NoteContextAwareWidget instead
*/
this.TabAwareWidget = NoteContextAwareWidget; this.TabAwareWidget = NoteContextAwareWidget;
/** @property {NoteContextCachingWidget} */ /** @property {NoteContextAwareWidget} */
this.NoteContextAwareWidget = NoteContextAwareWidget;
/**
* @property {NoteContextCachingWidget}
* @deprecated use NoteContextCachingWidget instead
*/
this.TabCachingWidget = NoteContextCachingWidget; this.TabCachingWidget = NoteContextCachingWidget;
/** @property {NoteContextAwareWidget} */
this.NoteContextCachingWidget = NoteContextCachingWidget;
/** @property {BasicWidget} */ /** @property {BasicWidget} */
this.BasicWidget = BasicWidget; this.BasicWidget = BasicWidget;

View File

@ -10,6 +10,7 @@ const TPL = `<div class="mermaid-widget">
min-height: 200px; min-height: 200px;
border-bottom: 1px solid var(--main-border-color); border-bottom: 1px solid var(--main-border-color);
padding: 20px; padding: 20px;
margin-bottom: 10px;
display: flex; display: flex;
justify-content: space-around; /* centering rendered SVG */ justify-content: space-around; /* centering rendered SVG */
flex-basis: 0; flex-basis: 0;