fix redirect after login

This commit is contained in:
zadam 2019-05-22 21:25:13 +02:00
parent 79956b5676
commit dedc1e708f
3 changed files with 6 additions and 5 deletions

View File

@ -47,6 +47,7 @@ async function showTree() {
minExpandLevel: 2, // root can't be collapsed minExpandLevel: 2, // root can't be collapsed
click: (event, data) => { click: (event, data) => {
if (data.targetType !== 'expander' && data.node.isActive()) { 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); $tree.fancytree('getTree').reactivate(true);
return false; return false;

View File

@ -337,11 +337,11 @@ function fireDetailLoaded() {
} }
messagingService.subscribeToSyncMessages(syncData => { messagingService.subscribeToSyncMessages(syncData => {
if (syncData.some(sync => sync.entityName === 'notes')) { for (const sync of syncData) {
infoService.showMessage('Reloading note because of background changes'); if (sync.entityName === 'notes') {
refreshTabs(null, sync.entityId); refreshTabs(null, sync.entityId);
} }
}
}); });
$tabContentsContainer.on("dragover", e => e.preventDefault()); $tabContentsContainer.on("dragover", e => e.preventDefault());

View File

@ -24,7 +24,7 @@ async function login(req, res) {
} }
req.session.loggedIn = true; req.session.loggedIn = true;
res.redirect('..'); res.redirect('.');
}); });
} }
else { else {