Skip to content

Build your personal knowledge base with Trilium Notes

fix redirect after login

zadamdedc1e708faa
diff --git a/src/public/javascripts/mobile.js b/src/public/javascripts/mobile.js
index 7ff4ad57ad..7e33f7aeb4 100644
--- a/src/public/javascripts/mobile.js
+++ b/src/public/javascripts/mobile.js
@@ -47,6 +47,7 @@ async function showTree() {
minExpandLevel: 2, // root can't be collapsed
click: (event, data) => {
if (data.targetType !== 'expander' && data.node.isActive()) {
+ // this is important for single column mobile view, otherwise it's not possible to see again previously displayed note
$tree.fancytree('getTree').reactivate(true);
return false;
diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js
index 95237387a1..b7ee2ea0a8 100644
--- a/src/public/javascripts/services/note_detail.js
+++ b/src/public/javascripts/services/note_detail.js
@@ -337,10 +337,10 @@ function fireDetailLoaded() {
}
messagingService.subscribeToSyncMessages(syncData => {
- if (syncData.some(sync => sync.entityName === 'notes')) {
- infoService.showMessage('Reloading note because of background changes');
-
- refreshTabs(null, sync.entityId);
+ for (const sync of syncData) {
+ if (sync.entityName === 'notes') {
+ refreshTabs(null, sync.entityId);
+ }
}
});
diff --git a/src/routes/login.js b/src/routes/login.js
index a4bfe29502..415834d582 100644
--- a/src/routes/login.js
+++ b/src/routes/login.js
@@ -24,7 +24,7 @@ async function login(req, res) {
}
req.session.loggedIn = true;
- res.redirect('..');
+ res.redirect('.');
});
}
else {