mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
fix(demo): geomap incorrect
This commit is contained in:
Binary file not shown.
@@ -33,11 +33,15 @@ function runNotesWithLabel(runAttrValue: string) {
|
||||
}
|
||||
}
|
||||
|
||||
sqlInit.dbReady.then(() => {
|
||||
cls.init(() => {
|
||||
hiddenSubtreeService.checkHiddenSubtree();
|
||||
});
|
||||
// If the database is already initialized, we need to check the hidden subtree. Otherwise, hidden subtree
|
||||
// is also checked before importing the demo.zip, so no need to do it again.
|
||||
if (sqlInit.isDbInitialized()) {
|
||||
console.log("Checking hidden subtree.");
|
||||
sqlInit.dbReady.then(() => cls.init(() => hiddenSubtreeService.checkHiddenSubtree()));
|
||||
}
|
||||
|
||||
// Periodic checks.
|
||||
sqlInit.dbReady.then(() => {
|
||||
if (!process.env.TRILIUM_SAFE_MODE) {
|
||||
setTimeout(
|
||||
cls.wrap(() => runNotesWithLabel("backendStartup")),
|
||||
|
||||
@@ -18,6 +18,7 @@ import password from "./encryption/password.js";
|
||||
import backup from "./backup.js";
|
||||
import eventService from "./events.js";
|
||||
import { t } from "i18next";
|
||||
import hidden_subtree from "./hidden_subtree.js";
|
||||
|
||||
export const dbReady = deferred<void>();
|
||||
|
||||
@@ -120,7 +121,13 @@ async function createInitialDatabase(skipDemoDb?: boolean) {
|
||||
password.resetPassword();
|
||||
});
|
||||
|
||||
log.info("Importing demo content ...");
|
||||
// Check hidden subtree.
|
||||
// This ensures the existence of system templates, for the demo content.
|
||||
console.log("Checking hidden subtree at first start.");
|
||||
cls.init(() => hidden_subtree.checkHiddenSubtree());
|
||||
|
||||
// Import demo content.
|
||||
log.info("Importing demo content...");
|
||||
|
||||
const dummyTaskContext = new TaskContext("no-progress-reporting", "importNotes", null);
|
||||
|
||||
@@ -128,6 +135,7 @@ async function createInitialDatabase(skipDemoDb?: boolean) {
|
||||
await zipImportService.importZip(dummyTaskContext, demoFile, rootNote);
|
||||
}
|
||||
|
||||
// Post-demo.
|
||||
sql.transactional(() => {
|
||||
// this needs to happen after ZIP import,
|
||||
// the previous solution was to move option initialization here, but then the important parts of initialization
|
||||
|
||||
Reference in New Issue
Block a user