From: TheSaminator Date: Tue, 8 Feb 2022 18:40:22 +0000 (-0500) Subject: Change Valor table format X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=132c1726d90ebb3e5a47451f73b0af6c83ec0a14;p=starship-fights Change Valor table format --- diff --git a/src/jvmMain/kotlin/starshipfights/info/views_user.kt b/src/jvmMain/kotlin/starshipfights/info/views_user.kt index 2cc41ec..5ec1975 100644 --- a/src/jvmMain/kotlin/starshipfights/info/views_user.kt +++ b/src/jvmMain/kotlin/starshipfights/info/views_user.kt @@ -353,13 +353,19 @@ suspend fun ApplicationCall.admiralPage(): HTML.() -> Unit { } table { tr { + th { +"When" } th { +"Role" } th { +"Against" } - th { +"Time" } th { +"Result" } } records.sortedBy { it.whenEnded }.forEach { record -> tr { + td { + span(classes = "moment") { + style = "display:none" + +record.whenEnded.toEpochMilli().toString() + } + } td { +when (recordRoles[record.id]) { GlobalSide.HOST -> "Host" @@ -376,12 +382,6 @@ suspend fun ApplicationCall.admiralPage(): HTML.() -> Unit { +opponent.fullName } } - td { - span(classes = "moment") { - style = "display:none" - +record.whenEnded.toEpochMilli().toString() - } - } td { +when (recordRoles[record.id]) { record.winner -> "Victory"