mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
Merge remote-tracking branch 'origin/math2'
# Conflicts: # package-lock.json
This commit is contained in:
commit
b70ee742e8
@ -115,6 +115,7 @@ export default class TabManager extends Component {
|
|||||||
|
|
||||||
// using pushState instead of directly modifying document.location because it does not trigger hashchange
|
// using pushState instead of directly modifying document.location because it does not trigger hashchange
|
||||||
window.history.pushState(null, "", url);
|
window.history.pushState(null, "", url);
|
||||||
|
}
|
||||||
|
|
||||||
document.title = "Trilium Notes";
|
document.title = "Trilium Notes";
|
||||||
|
|
||||||
@ -122,7 +123,6 @@ export default class TabManager extends Component {
|
|||||||
// it helps navigating in history if note title is included in the title
|
// it helps navigating in history if note title is included in the title
|
||||||
document.title += " - " + activeTabContext.note.title;
|
document.title += " - " + activeTabContext.note.title;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
this.triggerEvent('activeNoteChanged'); // trigger this even in on popstate event
|
this.triggerEvent('activeNoteChanged'); // trigger this even in on popstate event
|
||||||
}
|
}
|
||||||
|
@ -196,8 +196,8 @@ class TreeCache {
|
|||||||
if (note.type === 'search') {
|
if (note.type === 'search') {
|
||||||
const searchResultNoteIds = await server.get('search-note/' + note.noteId);
|
const searchResultNoteIds = await server.get('search-note/' + note.noteId);
|
||||||
|
|
||||||
if (!searchResultNoteIds) {
|
if (!Array.isArray(searchResultNoteIds)) {
|
||||||
throw new Error(`Search note ${note.noteId} failed.`);
|
throw new Error(`Search note ${note.noteId} failed: ${searchResultNoteIds}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// force to load all the notes at once instead of one by one
|
// force to load all the notes at once instead of one by one
|
||||||
|
@ -283,7 +283,9 @@ export default class AttributeDetailWidget extends TabAwareWidget {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.attribute.value = suggestion.notePath;
|
const pathChunks = suggestion.notePath.split('/');
|
||||||
|
|
||||||
|
this.attribute.value = pathChunks[pathChunks.length - 1]; // noteId
|
||||||
|
|
||||||
this.triggerCommand('updateAttributeList', { attributes: this.allAttributes });
|
this.triggerCommand('updateAttributeList', { attributes: this.allAttributes });
|
||||||
this.updateRelatedNotes();
|
this.updateRelatedNotes();
|
||||||
|
@ -181,7 +181,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addTextToActiveEditorEvent(text) {
|
addTextToActiveEditorEvent({text}) {
|
||||||
if (!this.isActive()) {
|
if (!this.isActive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,8 @@ async function searchFromNote(req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (note.isDeleted) {
|
if (note.isDeleted) {
|
||||||
return [400, `Note ${req.params.noteId} is deleted.`];
|
// this can be triggered from recent changes and it's harmless to return empty list rather than fail
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (note.type !== 'search') {
|
if (note.type !== 'search') {
|
||||||
|
@ -11,8 +11,8 @@ const htmlSanitizer = require('../html_sanitizer');
|
|||||||
* @param {Note} parentNote
|
* @param {Note} parentNote
|
||||||
* @return {Promise<*[]|*>}
|
* @return {Promise<*[]|*>}
|
||||||
*/
|
*/
|
||||||
function importOpml(taskContext, fileBuffer, parentNote) {
|
async function importOpml(taskContext, fileBuffer, parentNote) {
|
||||||
const xml = new Promise(function(resolve, reject)
|
const xml = await new Promise(function(resolve, reject)
|
||||||
{
|
{
|
||||||
parseString(fileBuffer, function (err, result) {
|
parseString(fileBuffer, function (err, result) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user