Add return URL to login form
This commit is contained in:
parent
74a8eb4c1a
commit
99a2a5caf0
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto } from "@roxi/routify"
|
import { goto, params } from "@roxi/routify"
|
||||||
import {
|
import {
|
||||||
notifications,
|
notifications,
|
||||||
Input,
|
Input,
|
||||||
|
@ -22,8 +22,12 @@
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
})
|
})
|
||||||
|
if ($params["?returnUrl"]) {
|
||||||
|
window.location = decodeURIComponent($params["?returnUrl"])
|
||||||
|
} else {
|
||||||
notifications.success("Logged in successfully")
|
notifications.success("Logged in successfully")
|
||||||
$goto("../portal")
|
$goto("../portal")
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
notifications.error("Invalid credentials")
|
notifications.error("Invalid credentials")
|
||||||
|
|
Loading…
Reference in New Issue