fix(web): make the try again button always go back to /

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-07-25 10:15:05 -04:00
parent bb434a3351
commit eab0c82b6a
6 changed files with 139 additions and 188 deletions
+1 -9
View File
@@ -122,18 +122,10 @@ templ index(localizer *localization.SimpleLocalizer) {
</div>
}
script reload(redirect string) {
if (redirect === "") {
redirect = "/";
}
window.location = redirect;
}
templ errorPage(message, mail, redirect string, localizer *localization.SimpleLocalizer) {
templ errorPage(message, mail string, localizer *localization.SimpleLocalizer) {
<div class="centered-div">
<img id="image" alt="Sad Anubis" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version }/>
<p>{ message }.</p>
<button onClick={ reload(redirect) }>{ localizer.T("try_again") }</button>
if mail != "" {
<p>
<a href="/">{ localizer.T("go_home") }</a> { localizer.T("contact_webmaster") }