feat(web/panettone): Redirect to original URL after login
Add an original-uri query param to the target of the Log In link pointing at the current URL, so that when the user eventually successfully logs in they are redirected to the page they were originally on Fixes: #21 Change-Id: I75ed7b75fa00b1b09c8b26bf4dcf5bc6b6d7f53a Reviewed-on: https://cl.tvl.fyi/c/depot/+/1498 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
addcba11b0
commit
f46aa2a20c
1 changed files with 6 additions and 1 deletions
|
@ -105,7 +105,12 @@ successful, `nil' otherwise"
|
|||
:action "/logout"
|
||||
(:input :type "submit" :value "Log Out")))
|
||||
(who:htm
|
||||
(:a :href "/login" "Log In")))))))
|
||||
(:a :href
|
||||
(format nil
|
||||
"/login?original-uri=~A"
|
||||
(drakma:url-encode (hunchentoot:request-uri*)
|
||||
:utf-8))
|
||||
"Log In")))))))
|
||||
|
||||
(defmacro render ((&key (footer t)) &body body)
|
||||
`(who:with-html-output-to-string (*standard-output* nil :prologue t)
|
||||
|
|
Loading…
Reference in a new issue