dashboard: preserve path when relogin is required

This commit is contained in:
Johannes Zellner
2024-04-29 15:22:01 +02:00
parent 67c1b2cb71
commit 3df7b74f65
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -6,6 +6,11 @@ tmp.forEach(function (pair) {
if (pair.indexOf('access_token=') === 0) localStorage.token = pair.split('=')[1];
});
window.location.href = '/';
var redirectTo = '/';
if (localStorage.getItem('redirectToHash')) {
redirectTo += localStorage.getItem('redirectToHash');
localStorage.removeItem('redirectToHash');
}
window.location.href = redirectTo;
</script>