front: redirect to last visited page after login

This commit is contained in:
AdrienLSH
2024-01-19 10:54:14 +01:00
parent e1e6e6c1ab
commit 60a3e02420
4 changed files with 23 additions and 17 deletions

View File

@ -3,13 +3,14 @@ import AbstractAuthentifiedView from "../abstracts/AbstractAuthentifiedView.js";
export default class extends AbstractAuthentifiedView
{
constructor(params) {
constructor(params, lastPageUrl = '/login') {
super(params, "Logout");
this.lastPageUrl = lastPageUrl;
}
async postInit() {
await client.logout();
await client.notice.disconnect();
navigateTo("/login")
navigateTo(this.lastPageUrl);
}
}