X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FAboutPage.kt;h=31aee0573c5182e3fbef11974b42a4d03db061d2;hp=7809817098fe3f28d30606b0d80c555c7a5626fb;hb=110a933c2724aba6a604fc5eed6372ff1e1e6144;hpb=de7568a82eb4150bf6d2b0553841b7b69f84c968 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt index 7809817..31aee05 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt @@ -1,23 +1,22 @@ package net.pterodactylus.sone.web.pages -import net.pterodactylus.sone.main.SonePlugin.PluginHomepage -import net.pterodactylus.sone.main.SonePlugin.PluginVersion -import net.pterodactylus.sone.main.SonePlugin.PluginYear -import net.pterodactylus.sone.web.pages.SoneTemplatePage +import net.pterodactylus.sone.main.* import net.pterodactylus.sone.web.WebInterface -import net.pterodactylus.sone.web.page.FreenetRequest -import net.pterodactylus.util.template.Template +import net.pterodactylus.sone.web.page.* import net.pterodactylus.util.template.TemplateContext +import javax.inject.Inject /** * A [SoneTemplatePage] that stores information about Sone in the [TemplateContext]. */ -class AboutPage(template: Template, webInterface: WebInterface, +@MenuName("About") +@TemplatePath("/templates/about.html") +class AboutPage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer, private val pluginVersion: PluginVersion, private val pluginYear: PluginYear, - private val pluginHomepage: PluginHomepage): SoneTemplatePage("about.html", template, "Page.About.Title", webInterface, false) { + private val pluginHomepage: PluginHomepage): SoneTemplatePage("about.html", webInterface, loaders, templateRenderer, pageTitleKey = "Page.About.Title") { - override fun handleRequest(request: FreenetRequest, templateContext: TemplateContext) { + override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) { templateContext["version"] = pluginVersion.version templateContext["year"] = pluginYear.year templateContext["homepage"] = pluginHomepage.homepage