X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FLoginPage.kt;h=8e927c50016ae27e128a26017f5c77ad0c5f02cc;hp=20251c086557b628069dae53f8c7718475274882;hb=bce70170ce5ddaa142e67fcc67985215e1eadac2;hpb=cd72add62ab407336b471d4b7cda8e33dd2df5c6 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt index 20251c0..8e927c5 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/LoginPage.kt @@ -2,6 +2,7 @@ package net.pterodactylus.sone.web.pages import freenet.clients.http.ToadletContext import net.pterodactylus.sone.data.Sone +import net.pterodactylus.sone.main.* import net.pterodactylus.sone.utils.emptyToNull import net.pterodactylus.sone.utils.isPOST import net.pterodactylus.sone.web.WebInterface @@ -13,8 +14,10 @@ import javax.inject.Inject /** * The login page lets the user log in. */ -class LoginPage @Inject constructor(template: Template, webInterface: WebInterface): - SoneTemplatePage("login.html", webInterface, template, "Page.Login.Title") { +@MenuName("Login") +@TemplatePath("/templates/login.html") +class LoginPage @Inject constructor(template: Template, webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer): + SoneTemplatePage("login.html", webInterface, loaders, template, templateRenderer, pageTitleKey = "Page.Login.Title") { override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) { if (soneRequest.isPOST) {