1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-05-12 14:47:46 +00:00

Add links to return home on the login pages

This commit is contained in:
Joshua Goins 2025-05-06 16:03:16 -04:00
parent adb1259829
commit e455bc10e5
3 changed files with 16 additions and 2 deletions

View file

@ -13,4 +13,6 @@
<p><small>This is not an official login page. It will <i>not</i> accept your official account's credentials, please do not enter them here!</small></p> <p><small>This is not an official login page. It will <i>not</i> accept your official account's credentials, please do not enter them here!</small></p>
<a href="http://{{ web_server_name }}">Return Home</a>
{% endblock %} {% endblock %}

View file

@ -13,4 +13,6 @@
<p><small>This is not an official registration page.</small></p> <p><small>This is not an official registration page.</small></p>
<a href="http://{{ web_server_name }}">Return Home</a>
{% endblock %} {% endblock %}

View file

@ -173,15 +173,25 @@ async fn check_session(
} }
async fn login() -> Html<String> { async fn login() -> Html<String> {
let config = get_config();
let environment = setup_default_environment(); let environment = setup_default_environment();
let template = environment.get_template("login.html").unwrap(); let template = environment.get_template("login.html").unwrap();
Html(template.render(context! {}).unwrap()) Html(
template
.render(context! { web_server_name => config.web.server_name })
.unwrap(),
)
} }
async fn register() -> Html<String> { async fn register() -> Html<String> {
let config = get_config();
let environment = setup_default_environment(); let environment = setup_default_environment();
let template = environment.get_template("register.html").unwrap(); let template = environment.get_template("register.html").unwrap();
Html(template.render(context! {}).unwrap()) Html(
template
.render(context! { web_server_name => config.web.server_name })
.unwrap(),
)
} }
#[derive(Deserialize, Debug)] #[derive(Deserialize, Debug)]