adds Version to index
This commit is contained in:
parent
24acc0b942
commit
4fd83f48cd
35
src/main/kotlin/de/arindy/dicetower/IndexResource.kt
Normal file
35
src/main/kotlin/de/arindy/dicetower/IndexResource.kt
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package de.arindy.dicetower
|
||||||
|
|
||||||
|
import io.quarkus.qute.TemplateInstance
|
||||||
|
import io.quarkus.runtime.annotations.RegisterForReflection
|
||||||
|
import jakarta.enterprise.context.ApplicationScoped
|
||||||
|
import jakarta.ws.rs.Consumes
|
||||||
|
import jakarta.ws.rs.GET
|
||||||
|
import jakarta.ws.rs.POST
|
||||||
|
import jakarta.ws.rs.Path
|
||||||
|
import jakarta.ws.rs.PathParam
|
||||||
|
import jakarta.ws.rs.Produces
|
||||||
|
import jakarta.ws.rs.QueryParam
|
||||||
|
import jakarta.ws.rs.core.Context
|
||||||
|
import jakarta.ws.rs.core.MediaType
|
||||||
|
import jakarta.ws.rs.sse.OutboundSseEvent
|
||||||
|
import jakarta.ws.rs.sse.Sse
|
||||||
|
import jakarta.ws.rs.sse.SseBroadcaster
|
||||||
|
import jakarta.ws.rs.sse.SseEventSink
|
||||||
|
import org.eclipse.microprofile.config.inject.ConfigProperty
|
||||||
|
import java.util.UUID
|
||||||
|
|
||||||
|
@Path("/")
|
||||||
|
@ApplicationScoped
|
||||||
|
final class IndexResource() {
|
||||||
|
|
||||||
|
@ConfigProperty(name = "quarkus.application.version")
|
||||||
|
private lateinit var version: String
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Produces(MediaType.TEXT_HTML)
|
||||||
|
fun get(): TemplateInstance {
|
||||||
|
return Templates.index(version)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -9,4 +9,6 @@ object Templates {
|
|||||||
external fun overlay(diceid: String, scale: Int?, clearAfter: Long?): TemplateInstance
|
external fun overlay(diceid: String, scale: Int?, clearAfter: Long?): TemplateInstance
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
external fun results(room: String, name: String?, user: String?): TemplateInstance
|
external fun results(room: String, name: String?, user: String?): TemplateInstance
|
||||||
|
@JvmStatic
|
||||||
|
external fun index(version: String): TemplateInstance
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<title>Dice-Tower</title>
|
<title>Dice-Tower</title>
|
||||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<script src="/vendor/color-picker.js"></script>
|
<script src="/META-INF/resources/vendor/color-picker.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.w3-theme-l6 {
|
.w3-theme-l6 {
|
||||||
color: #000 !important;
|
color: #000 !important;
|
||||||
@ -611,6 +611,7 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
<footer class="w3-theme-l1 w3-center w3-padding-16">
|
<footer class="w3-theme-l1 w3-center w3-padding-16">
|
||||||
|
Version {version} ::
|
||||||
<a href="https://git.arindy.de/arindy/dice-tower" target="_blank" class="w3-hover-text-black">Dice-Tower on my
|
<a href="https://git.arindy.de/arindy/dice-tower" target="_blank" class="w3-hover-text-black">Dice-Tower on my
|
||||||
GitTea</a>
|
GitTea</a>
|
||||||
</footer>
|
</footer>
|
Loading…
x
Reference in New Issue
Block a user