Skip to content

Commit

Permalink
Add shelly links to overview page
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRobo committed Jul 21, 2024
1 parent 2100ef0 commit cf773d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/src/main/kotlin/at/robert/hf/page/ShellyManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import io.ktor.server.routing.*
import io.ktor.util.pipeline.*
import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope
import kotlinx.html.a
import kotlinx.html.h1
import kotlinx.html.main
import kotlinx.html.p
import kotlinx.html.*

fun Application.configureShellyManager() {
routing {
Expand Down Expand Up @@ -50,6 +47,11 @@ private suspend fun PipelineContext<*, ApplicationCall>.shellySelectionPage(conf
a(href = "shelly/${configFileName.encodeURLPathPart()}/${host.encodeURLPathPart()}") {
+"Shelly: ${shellyNames[host]}"
}
br { }
val hostUrl = "http://$host"
a(href = hostUrl, classes = "italic") {
+hostUrl
}
}
}
}
Expand Down

0 comments on commit cf773d6

Please sign in to comment.