diff --git a/app/src/main/kotlin/views/SettingView.kt b/app/src/main/kotlin/views/SettingView.kt index b39fc7d..530fda7 100644 --- a/app/src/main/kotlin/views/SettingView.kt +++ b/app/src/main/kotlin/views/SettingView.kt @@ -26,14 +26,31 @@ class SettingView(staticFileResolver: StaticFileResolver) : View(staticFileResol } } - section("m-4 p-4 bg-gray-800 rounded") { - p(classes = "mb-4") { - +"Export all my data" + section("m-4 p-4 bg-gray-800 rounded flex justify-around") { + + form(method = FormMethod.post, action = "/export") { + button(name = "display", + classes = "inline btn btn-teal block", + type = submit) { +"Display my data" } } form(method = FormMethod.post, action = "/export") { - button(name = "display", classes = "inline btn btn-teal block", type = submit) { +"Display my data" } - button(name = "download", classes = "inline btn btn-green block ml-2 mt-2", type = submit) { + + listOf("json", "zip").forEach { format -> + div { + radioInput(name = "format") { + id = format + attributes["value"] = format + if(format == "json") attributes["checked"] = "" + } + label(classes = "ml-2") { + attributes["for"] = format + +format + } + } + } + + button(name = "download", classes = "inline btn btn-green block mt-2", type = submit) { +"Download my data" } }