mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge remote-tracking branch 'origin/stable' into stable
# Conflicts: # src/services/build.js
This commit is contained in:
commit
a0e9ac73c9
@ -2,7 +2,7 @@
|
|||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"description": "Trilium Notes",
|
"description": "Trilium Notes",
|
||||||
"version": "0.59.2",
|
"version": "0.59.3",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"main": "electron.js",
|
"main": "electron.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -14,7 +14,7 @@ async function processEntityChanges(entityChanges) {
|
|||||||
if (ec.entityName === 'notes') {
|
if (ec.entityName === 'notes') {
|
||||||
processNoteChange(loadResults, ec);
|
processNoteChange(loadResults, ec);
|
||||||
} else if (ec.entityName === 'branches') {
|
} else if (ec.entityName === 'branches') {
|
||||||
processBranchChange(loadResults, ec);
|
await processBranchChange(loadResults, ec);
|
||||||
} else if (ec.entityName === 'attributes') {
|
} else if (ec.entityName === 'attributes') {
|
||||||
processAttributeChange(loadResults, ec);
|
processAttributeChange(loadResults, ec);
|
||||||
} else if (ec.entityName === 'note_reordering') {
|
} else if (ec.entityName === 'note_reordering') {
|
||||||
@ -105,7 +105,7 @@ function processNoteChange(loadResults, ec) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function processBranchChange(loadResults, ec) {
|
async function processBranchChange(loadResults, ec) {
|
||||||
if (ec.isErased && ec.entityId in froca.branches) {
|
if (ec.isErased && ec.entityId in froca.branches) {
|
||||||
utils.reloadFrontendApp(`${ec.entityName} ${ec.entityId} is erased, need to do complete reload.`);
|
utils.reloadFrontendApp(`${ec.entityName} ${ec.entityId} is erased, need to do complete reload.`);
|
||||||
return;
|
return;
|
||||||
@ -139,7 +139,15 @@ function processBranchChange(loadResults, ec) {
|
|||||||
loadResults.addBranch(ec.entityId, ec.componentId);
|
loadResults.addBranch(ec.entityId, ec.componentId);
|
||||||
|
|
||||||
const childNote = froca.notes[ec.entity.noteId];
|
const childNote = froca.notes[ec.entity.noteId];
|
||||||
const parentNote = froca.notes[ec.entity.parentNoteId];
|
let parentNote = froca.notes[ec.entity.parentNoteId];
|
||||||
|
|
||||||
|
if (childNote && !parentNote) {
|
||||||
|
// a branch cannot exist without the parent
|
||||||
|
// a note loaded into froca has to also contain all its ancestors
|
||||||
|
// this problem happened e.g. in sharing where _share was hidden and thus not loaded
|
||||||
|
// sharing meant cloning into _share, which crashed because _share was not loaded
|
||||||
|
parentNote = await froca.getNote(ec.entity.parentNoteId);
|
||||||
|
}
|
||||||
|
|
||||||
if (branch) {
|
if (branch) {
|
||||||
branch.update(ec.entity);
|
branch.update(ec.entity);
|
||||||
|
@ -39,7 +39,14 @@ export default class SharedInfoWidget extends NoteContextAwareWidget {
|
|||||||
this.$sharedText.text("This note is shared publicly on");
|
this.$sharedText.text("This note is shared publicly on");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
link = `${location.protocol}//${location.host}${location.pathname}share/${shareId}`;
|
let host = location.host;
|
||||||
|
if (host.endsWith('/')) {
|
||||||
|
// seems like IE has trailing slash
|
||||||
|
// https://github.com/zadam/trilium/issues/3782
|
||||||
|
host = host.substr(0, host.length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
link = `${location.protocol}//${host}${location.pathname}share/${shareId}`;
|
||||||
this.$sharedText.text("This note is shared locally on");
|
this.$sharedText.text("This note is shared locally on");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
module.exports = { buildDate:"", buildRevision: "9881e6de3e4966af39ec6245562dca6ac7b25eaa" };
|
module.exports = { buildDate:"2023-03-27T23:06:14+02:00", buildRevision: "9881e6de3e4966af39ec6245562dca6ac7b25eaa" };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user