added "safe mode" environment variable switch which disables startup scripts and resets tabs

This commit is contained in:
zadam
2021-01-15 20:12:14 +01:00
parent e06c5703ee
commit e1e185e5db
5 changed files with 22 additions and 8 deletions

View File

@@ -54,11 +54,21 @@ function getBundlesWithLabel(label, value) {
}
function getStartupBundles() {
return getBundlesWithLabel("run", "frontendStartup");
if (!process.env.TRILIUM_SAFE_MODE) {
return getBundlesWithLabel("run", "frontendStartup");
}
else {
return [];
}
}
function getWidgetBundles() {
return getBundlesWithLabel("widget");
if (!process.env.TRILIUM_SAFE_MODE) {
return getBundlesWithLabel("widget");
}
else {
return [];
}
}
function getRelationBundles(req) {