From 9117aa5b66fb71123e6496da249bd1acd916deff Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Tue, 8 Feb 2022 17:24:30 -0500 Subject: [PATCH] Add owner indicator --- .../kotlin/starshipfights/info/views_user.kt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/jvmMain/kotlin/starshipfights/info/views_user.kt b/src/jvmMain/kotlin/starshipfights/info/views_user.kt index 413975d..6c6df5a 100644 --- a/src/jvmMain/kotlin/starshipfights/info/views_user.kt +++ b/src/jvmMain/kotlin/starshipfights/info/views_user.kt @@ -8,6 +8,7 @@ import kotlinx.html.* import org.litote.kmongo.and import org.litote.kmongo.eq import org.litote.kmongo.or +import starshipfights.CurrentConfiguration import starshipfights.ForbiddenException import starshipfights.auth.getUser import starshipfights.auth.getUserSession @@ -36,15 +37,14 @@ suspend fun ApplicationCall.userPage(): HTML.() -> Unit { NavLink("/admiral/new", "New Admiral"), ) ) - else - CustomSidebar { - - } + else null ) { section { h1 { +user.profileName } p { - +"This user's profile name is ${user.profileName}!" + +user.discordName + +"#" + +user.discordDiscriminator } if (isCurrentUser) @@ -52,6 +52,11 @@ suspend fun ApplicationCall.userPage(): HTML.() -> Unit { +"This user is you!" } + if (user.discordId == CurrentConfiguration.discordClient?.ownerId) + p { + +"This user is the owner of the site!" + } + if (admirals.isNotEmpty()) { p { +"This user has the following admirals:" -- 2.25.1