fix(auth): close div tag in logout template
This commit is contained in:
parent
b3d015a26a
commit
9f7e4c8a68
2 changed files with 30 additions and 16 deletions
|
|
@ -26,14 +26,18 @@ templ LogoutPage(authLogoutURL, workspaceURL string) {
|
|||
<h1>Logged Out</h1>
|
||||
<div class="status">✓ Session cleared</div>
|
||||
<p>You have been logged out of Next Workspace. Your identity provider session will also be cleared.</p>
|
||||
<a href={ workspaceURL } class="btn btn-primary">Re-login</a>
|
||||
<a href={ workspaceURL } class="btn btn-primary">Re-login</a>
|
||||
if authLogoutURL != "" {
|
||||
<a href={ authLogoutURL } class="btn btn-secondary">Sign out from Authelia</a>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// Redirect to Authelia logout after a short delay
|
||||
setTimeout(function() {
|
||||
window.location.href = document.querySelector('.btn-secondary').href;
|
||||
}, 1500);
|
||||
// Only auto-redirect on first visit (before Authelia logout returns)
|
||||
if (document.querySelector('.btn-secondary')) {
|
||||
setTimeout(function() {
|
||||
window.location.href = document.querySelector('.btn-secondary').href;
|
||||
}, 1500);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -36,26 +36,36 @@ func LogoutPage(authLogoutURL, workspaceURL string) templ.Component {
|
|||
var templ_7745c5c3_Var2 templ.SafeURL
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinURLErrs(workspaceURL)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `core/ui/logout.templ`, Line: 29, Col: 26}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `core/ui/logout.templ`, Line: 29, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" class=\"btn btn-primary\">Re-login</a> <a href=\"")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" class=\"btn btn-primary\">Re-login</a> ")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 templ.SafeURL
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(authLogoutURL)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `core/ui/logout.templ`, Line: 30, Col: 27}
|
||||
if authLogoutURL != "" {
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<a href=\"")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var3 templ.SafeURL
|
||||
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(authLogoutURL)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `core/ui/logout.templ`, Line: 31, Col: 27}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" class=\"btn btn-secondary\">Sign out from Authelia</a>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" class=\"btn btn-secondary\">Sign out from Authelia</a></div><script type=\"text/javascript\">\n\t\t\t\t// Redirect to Authelia logout after a short delay\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\twindow.location.href = document.querySelector('.btn-secondary').href;\n\t\t\t\t}, 1500);\n\t\t\t</script></body></html>")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</div><script type=\"text/javascript\">\n\t\t\t\t// Only auto-redirect on first visit (before Authelia logout returns)\n\t\t\t\tif (document.querySelector('.btn-secondary')) {\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\twindow.location.href = document.querySelector('.btn-secondary').href;\n\t\t\t\t\t}, 1500);\n\t\t\t\t}\n\t\t\t</script></body></html>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue