This commit is contained in:
Hartmut Bauer committed 2026-10-21 01:29:35 +02:00
1 parent e08a941c62
commit 3d165ee610
12 files changed
+112 -26

No files matched your search

+2 -2
View File
@@ -1,3 +1,3 @@
#auto generated
#Mon Oct 19 00:45:22 CEST 2026
build.number=633
#Wed Oct 21 01:06:20 CEST 2026
build.number=655
+6 -6
View File
@@ -4,13 +4,13 @@ import net.keinekekse.version.Version
object VERSION: Version {
override val version = "0.2.0-alpha"
override val fullVersion = "0.2.0-alpha+build.633"
override val fullVersion = "0.2.0-alpha+build.655"
override val major = 0
override val minor = 2
override val patch = 0
override val preRelease = "alpha"
override val buildMetadata = "build.633"
override val buildDate = "2026-10-18T22:45:22.165046Z"
override val buildMetadata = "build.655"
override val buildDate = "2026-10-20T23:06:20.951648Z"
override val displayName = "Application Server"
override val copyright = "Copyright (c) 2026 Hartmut Bauer"
override val name = "server"
@@ -18,13 +18,13 @@ object VERSION: Version {
}
object VERSION_books: Version {
override val version = "0.2.0-alpha"
override val fullVersion = "0.2.0-alpha+build.633"
override val fullVersion = "0.2.0-alpha+build.655"
override val major = 0
override val minor = 2
override val patch = 0
override val preRelease = "alpha"
override val buildMetadata = "build.633"
override val buildDate = "2026-10-18T22:45:22.165140Z"
override val buildMetadata = "build.655"
override val buildDate = "2026-10-20T23:06:20.951769Z"
override val displayName = "Books-DB"
override val copyright = "Copyright (c) 2026 Hartmut Bauer"
override val name = "books"
@@ -135,6 +135,12 @@ fun Application.configureRouting(
val receiveParameters = call.receiveParameters()
val session =
getSession(receiveParameters["sessionId"], sessions, call.principal.userId)
// TODO
call.application.log.info("## New publisher form OK ")
receiveParameters.forEach { param: String, value: List<String> ->
call.application.log.info("## param: $param, value: $value")
}
}
hx.post("${navBooksEdit.second}/addseries") {
val receiveParameters = call.receiveParameters()
+51 -5
View File
@@ -136,6 +136,7 @@ fun FlowContent.bookEdit(
}
select(classes = "$cssTextInput w-74") {
name = "publisher"
id = "publisher"
option {
value = "0"
@@ -294,7 +295,7 @@ fun FlowContent.bookEdit(
// evtl. switch oder <detail>
// Teil von Sammelband _____v / enthält (-> Link)
div(classes = "flex flex-row mb-5 mr-2 justify-end") {
div(classes = "flex flex-row mb-5 mr-2 justify-end w-180") {
button(classes = "$cssButtonStd block mt-8 mr-10") {
type = ButtonType.button
onClick =
@@ -316,13 +317,58 @@ fun FlowContent.bookEdit(
id = "publisherDialog"
// attributes["popover"] = "true"
// attributes["closedby"] = "any"
div {
+"Test-Verlag"
form {
id = "publisherDialogForm"
attributes.hx {
post = "${navBooksEdit.second}/addpublisher"
target = "#publisher"
swap = "innerHTML"
validate = true
on(
event = "after-request",
script = "this.reset();document.getElementById('publisherDialog').close()"
)
}
button(classes = cssButtonStd) {
input(type = InputType.hidden, name = "sessionId") {
value = session.sessionId
}
input(type = InputType.hidden, name = "bookId") {
value = session.data.book.id.toString()
}
div(classes = "flex flex-row mb-5 h-9") {
div(classes = "content-center pr-6 text-nowrap") {
+"Neuer Verlag:"
}
input(classes = "$cssTextInput w-75") {
name = "newpublisher"
required = true
value = ""
onBlur = """
const select = document.getElementById('publisher')
const optArray = Array.from(select.options)
if (optArray.some(opt => opt.text.toLowerCase() === this.value.toLowerCase() )) {
this.setCustomValidity('Dieser Verlag existiert bereits.');
} else {
this.setCustomValidity('');
}
"""
}
}
div(classes = "flex flex-row mb-5 mr-2 justify-end") {
button(classes = "$cssButtonStd block mt-8 mr-10") {
type = ButtonType.button
onClick =
"document.getElementById('publisherDialogForm').reset()"
attributes["commandfor"] = "publisherDialog"
attributes["command"] = "close"
+"Close"
+"Abbrechen"
}
button(classes = "$cssButtonPri block mt-8") {
type = ButtonType.submit
+"Speichern"
}
}
}
}
output { }
@@ -1,6 +1,7 @@
package net.keinekekse.app.books.ui
import kotlinx.html.HTML
import kotlinx.html.div
import net.keinekekse.app.books.db.BookRepository
import net.keinekekse.app.books.edit.BooksSessionData
import net.keinekekse.app.core.auth.UserSession
@@ -14,8 +15,9 @@ fun HTML.bookEditPage(
navBooksEdit.first,
mapOf(navBooks, Pair(navBooksEdit.first, ""))
) {
div(classes = "flex flex-row flex-auto overflow-auto w-0 min-w-1/1") {
bookEdit(booksRepo, session)
}
}
}
+1 -1
View File
@@ -33,7 +33,7 @@ fun FlowContent.booksTable(booksRepo: BookRepository) {
booksRepo.allBooks()
}
div(classes = "flex-auto overflow-auto px-1 pb-1") {
div(classes = "flex-auto overflow-auto px-1 pb-1 w-0 min-w-1/1") {
table {
id = "bookstable"
thead(classes = "$cssFixedTHead ") {
@@ -7,16 +7,16 @@ import net.keinekekse.app.core.ui.stdHead
fun FlowContent.programName() {
a(classes = "flex") {
a(classes = "flex flex-nowrap text-nowrap") {
href = navBooks.second
title = "v ${VERSION_books.fullVersion}"
img(classes = "h-14 my-2 $bgHeaderIcon") {
img(classes = "h-8 md:h-14 my-2 $bgHeaderIcon") {
src = "/static/books.png"
}
div(classes = "self-center text-right ml-3") {
div {
div(classes = "text-3xl") {
div(classes = "text-xl md:text-3xl") {
+VERSION_books.displayName
}
div(classes = "text-xs") {
+2 -2
View File
@@ -58,8 +58,8 @@ const val cssFormIcon =
"cursor-pointer m-0 px-2 pt-1 no-underline "
const val cssTextInput =
"rounded-sm border-1 border-slate-400 px-2 py-1 focus:border-orange-400 focus:border-4" +
" invalid:focus:bg-red-200 invalid:focus:border-red-500 invalid:focus:border-5" +
" invalid:bg-red-200 invalid:border-red-500 invalid:border-3 "
" invalid:focus:bg-red-200 invalid:focus:border-red-500 invalid:focus:border-4" +
" invalid:bg-red-200 invalid:border-red-500 invalid:border-2 "
const val _cssTextInput =
"rounded-sm border-b-1 px-2 py-1 focus:border-b-orange-400 focus:border-b-4" +
" invalid:focus:bg-red-200 invalid:focus:border-red-500 invalid:focus:border-5" +
@@ -22,7 +22,7 @@ fun HTML.importEditPage(
navBooksScanEdit.first,
mapOf(navBooks, navBooksNew, Pair(navBooksScanEdit.first, ""))
) {
div(classes = "flex flex-row flex-auto") {
div(classes = "flex flex-row flex-auto overflow-auto w-0 min-w-1/1") {
session.data.book = Book(
title = bookInfo?.title ?: "",
@@ -36,7 +36,7 @@ fun HTML.importPage(books: List<CalibreBookInfo>) {
fun FlowContent.importTable(books: List<CalibreBookInfo>) {
div(classes = "flex-auto overflow-auto px-1 pb-1") {
div(classes = "flex-auto overflow-auto px-1 pb-1 w-0 min-w-1/1") {
table {
id = "importtable"
thead(classes = "$cssFixedTHead ") {
+35 -3
View File
@@ -234,14 +234,22 @@ fun HTML.testPage(booksDb: Database) {
//}
fun FlowContent.testTable() {
div(classes = "flex-auto overflow-auto px-1 pb-1") {
div(classes = "flex-auto overflow-auto px-1 pb-1 w-0 min-w-1/1") {
table {
id = "testtable"
thead(classes = "$cssFixedTHead ") {
tr {
th(classes = "py-3 px-2") { +"#" }
th(classes = "py-3 px-2") { +"Alias" }
th(classes = "py-3 px-2") { +"Score" }
th(classes = "py-3 px-2") { +"Alias0" }
th(classes = "py-3 px-2") { +"Score0" }
th(classes = "py-3 px-2") { +"Alias1" }
th(classes = "py-3 px-2") { +"Score1" }
th(classes = "py-3 px-2") { +"Alias2" }
th(classes = "py-3 px-2") { +"Score2" }
th(classes = "py-3 px-2") { +"Alias3" }
th(classes = "py-3 px-2") { +"Score3" }
th(classes = "py-3 px-2") { +"Alias4" }
th(classes = "py-3 px-2") { +"Score4" }
th(classes = "py-3 px-2") {
a {
href = navBooksNew.second
@@ -267,6 +275,30 @@ fun FlowContent.testTable() {
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1") {
+Random.nextLong().toString()
}
td(classes = "border-t-1 $borderTable px-2 py-1 text-nowrap") {
materialSymbolButton("Edit")
materialSymbolButton("Delete")
@@ -39,7 +39,7 @@ fun HTML.landingPage(loggedOn: Boolean) {
}
}
}
div(classes = "lg:hidden p-8") {
div(classes = "md:hidden p-8") {
a(classes = "inline-flex $cssMainLink") {
href = navBooksScan.second