projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔥 Remove templates from FreenetTemplatePages
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
pages
/
AboutPage.kt
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
d3382b4
..
31aee05
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/pages/AboutPage.kt
@@
-1,20
+1,20
@@
package net.pterodactylus.sone.web.pages
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.main.*
import net.pterodactylus.sone.web.WebInterface
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 net.pterodactylus.util.template.TemplateContext
+import javax.inject.Inject
/**
* A [SoneTemplatePage] that stores information about Sone in the [TemplateContext].
*/
/**
* 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 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(freenetRequest: FreenetRequest, templateContext: TemplateContext) {
templateContext["version"] = pluginVersion.version
override fun handleRequest(freenetRequest: FreenetRequest, templateContext: TemplateContext) {
templateContext["version"] = pluginVersion.version