From 97414dc1c66bcfb13fc247138c9d892121f03f19 Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Sat, 9 Apr 2022 13:34:42 -0400 Subject: [PATCH] Add private info download link --- src/jvmMain/kotlin/starshipfights/info/views_gdpr.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/jvmMain/kotlin/starshipfights/info/views_gdpr.kt b/src/jvmMain/kotlin/starshipfights/info/views_gdpr.kt index ac68710..2467f22 100644 --- a/src/jvmMain/kotlin/starshipfights/info/views_gdpr.kt +++ b/src/jvmMain/kotlin/starshipfights/info/views_gdpr.kt @@ -4,10 +4,7 @@ import io.ktor.application.* import kotlinx.coroutines.async import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.flow.toList -import kotlinx.html.HTML -import kotlinx.html.h1 -import kotlinx.html.iframe -import kotlinx.html.style +import kotlinx.html.* import org.litote.kmongo.eq import org.litote.kmongo.or import starshipfights.auth.getUser @@ -167,6 +164,13 @@ suspend fun ApplicationCall.privateInfoPage(): HTML.() -> Unit { style = "width:100%;height:25em" src = "/me/private-info/txt" } + + p { + a(href = "/me/private-info/txt") { + attributes["download"] = "private-info.txt" + +"Download your private info" + } + } } } } -- 2.25.1