mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
small fixes
This commit is contained in:
parent
a1c1c7c830
commit
75fc9e2048
@ -166,12 +166,14 @@ class NoteRevision extends AbstractEntity {
|
|||||||
utcDateLastEdited: this.utcDateLastEdited,
|
utcDateLastEdited: this.utcDateLastEdited,
|
||||||
utcDateCreated: this.utcDateCreated,
|
utcDateCreated: this.utcDateCreated,
|
||||||
utcDateModified: this.utcDateModified,
|
utcDateModified: this.utcDateModified,
|
||||||
|
content: this.content,
|
||||||
contentLength: this.contentLength
|
contentLength: this.contentLength
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getPojoToSave() {
|
getPojoToSave() {
|
||||||
const pojo = this.getPojo();
|
const pojo = this.getPojo();
|
||||||
|
delete pojo.content; // not getting persisted
|
||||||
delete pojo.contentLength; // not getting persisted
|
delete pojo.contentLength; // not getting persisted
|
||||||
|
|
||||||
if (pojo.isProtected) {
|
if (pojo.isProtected) {
|
||||||
|
@ -141,7 +141,7 @@ export default class DesktopLayout {
|
|||||||
.ribbon(new NoteInfoWidget())
|
.ribbon(new NoteInfoWidget())
|
||||||
.button(new EditButton())
|
.button(new EditButton())
|
||||||
.button(new ButtonWidget()
|
.button(new ButtonWidget()
|
||||||
.icon('bx bx-history')
|
.icon('bx-history')
|
||||||
.title("Note Revisions")
|
.title("Note Revisions")
|
||||||
.command("showNoteRevisions")
|
.command("showNoteRevisions")
|
||||||
.titlePlacement("bottom"))
|
.titlePlacement("bottom"))
|
||||||
|
@ -310,7 +310,7 @@ export default class RibbonContainer extends NoteContextAwareWidget {
|
|||||||
// won't trigger .refresh();
|
// won't trigger .refresh();
|
||||||
await super.handleEventInChildren('setNoteContext', data);
|
await super.handleEventInChildren('setNoteContext', data);
|
||||||
}
|
}
|
||||||
else if (this.isEnabled()) {
|
else if (this.isEnabled() || name === 'initialRenderComplete') {
|
||||||
const activeRibbonWidget = this.getActiveRibbonWidget();
|
const activeRibbonWidget = this.getActiveRibbonWidget();
|
||||||
|
|
||||||
// forward events only to active ribbon tab, inactive ones don't need to be updated
|
// forward events only to active ribbon tab, inactive ones don't need to be updated
|
||||||
|
@ -40,6 +40,15 @@ export default class SqlResultWidget extends NoteContextAwareWidget {
|
|||||||
this.$resultContainer.empty();
|
this.$resultContainer.empty();
|
||||||
|
|
||||||
for (const rows of results) {
|
for (const rows of results) {
|
||||||
|
if (typeof rows === 'object' && !Array.isArray(rows)) {
|
||||||
|
// inserts, updates
|
||||||
|
this.$resultContainer.empty().show().append(
|
||||||
|
$("<pre>").text(JSON.stringify(rows, null, '\t'))
|
||||||
|
);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!rows.length) {
|
if (!rows.length) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user