Merge remote-tracking branch 'origin/develop' into feature/i18n_first_steps

; Conflicts:
;	package-lock.json
;	package.json
This commit is contained in:
Elian Doran
2024-07-23 23:22:34 +03:00
38 changed files with 3775 additions and 11663 deletions

View File

@@ -301,7 +301,7 @@ export default class GlobalMenuWidget extends BasicWidget {
}
async fetchLatestVersion() {
const RELEASES_API_URL = "https://api.github.com/repos/zadam/trilium/releases/latest";
const RELEASES_API_URL = "https://api.github.com/repos/TriliumNext/Notes/releases/latest";
const resp = await fetch(RELEASES_API_URL);
const data = await resp.json();

View File

@@ -5,7 +5,6 @@ import { JSDOM } from "jsdom";
import BNote = require('../../becca/entities/bnote');
import BAttribute = require('../../becca/entities/battribute');
import { Request } from 'express';
import ValidationError = require('../../errors/validation_error');
function buildDescendantCountMap(noteIdsToCount: string[]) {
if (!Array.isArray(noteIdsToCount)) {

View File

@@ -1 +1,4 @@
export = { buildDate:"2024-07-14T22:32:45+03:00", buildRevision: "b811f3d399aed7e740bd8e92ef7edc7d15de7038" };
export = {
buildDate: "2024-07-21T10:25:01Z",
buildRevision: "715a952148ae6e83fda0886f5ceec8dc329972ae"
};

View File

@@ -41,15 +41,13 @@ function updateEntities(entityChanges: EntityChangeRecord[], instanceId: string)
atLeastOnePullApplied = true;
}
if (entity) {
updateEntity(entityChange, entity, instanceId, updateContext);
}
updateEntity(entityChange, entity, instanceId, updateContext);
}
logUpdateContext(updateContext);
}
function updateEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, instanceId: string, updateContext: UpdateContext) {
function updateEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow | undefined, instanceId: string, updateContext: UpdateContext) {
if (!remoteEntityRow && remoteEC.entityName === 'options') {
return; // can be undefined for options with isSynced=false
}
@@ -74,7 +72,7 @@ function updateEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, instan
}
}
function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow, instanceId: string, updateContext: UpdateContext) {
function updateNormalEntity(remoteEC: EntityChange, remoteEntityRow: EntityRow | undefined, instanceId: string, updateContext: UpdateContext) {
const localEC = sql.getRow<EntityChange | undefined>(`SELECT * FROM entity_changes WHERE entityName = ? AND entityId = ?`, [remoteEC.entityName, remoteEC.entityId]);
const localECIsOlderOrSameAsRemote = (
localEC && localEC.utcDateChanged && remoteEC.utcDateChanged &&
@@ -139,7 +137,7 @@ function preProcessContent(remoteEC: EntityChange, remoteEntityRow: EntityRow) {
}
}
function updateNoteReordering(remoteEC: EntityChange, remoteEntityRow: EntityRow, instanceId: string) {
function updateNoteReordering(remoteEC: EntityChange, remoteEntityRow: EntityRow | undefined, instanceId: string) {
if (!remoteEntityRow) {
throw new Error(`Empty note_reordering body for: ${JSON.stringify(remoteEC)}`);
}