From: TheSaminator Date: Tue, 8 Feb 2022 22:24:30 +0000 (-0500) Subject: Add owner indicator X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=9117aa5b66fb71123e6496da249bd1acd916deff;p=starship-fights Add owner indicator --- 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:"