mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 22:39:14 +01:00
Add redirect functionality after login (#76)
Gone is the frustration of scanning a qr code to only be sent to the homepage
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
|
||||
const loading = ref(false);
|
||||
const loginPassword = ref("");
|
||||
const redirectTo = useState("authRedirect");
|
||||
|
||||
async function login() {
|
||||
loading.value = true;
|
||||
@@ -116,7 +117,8 @@
|
||||
|
||||
toast.success("Logged in successfully");
|
||||
|
||||
navigateTo("/home");
|
||||
navigateTo(redirectTo.value || "/home");
|
||||
redirectTo.value = null;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user