Also search on name when setting midi port
This commit is contained in:
42
src/jvmMain/kotlin/nl/astraeus/vst/string/web/Index.kt
Normal file
42
src/jvmMain/kotlin/nl/astraeus/vst/string/web/Index.kt
Normal file
@@ -0,0 +1,42 @@
|
||||
package nl.astraeus.vst.string.web
|
||||
|
||||
import kotlinx.html.body
|
||||
import kotlinx.html.head
|
||||
import kotlinx.html.html
|
||||
import kotlinx.html.meta
|
||||
import kotlinx.html.script
|
||||
import kotlinx.html.stream.appendHTML
|
||||
import kotlinx.html.title
|
||||
|
||||
fun generateIndex(patch: String?): String {
|
||||
val result = StringBuilder();
|
||||
|
||||
if (patch == null) {
|
||||
result.appendHTML(true).html {
|
||||
head {
|
||||
title { +"VST String" }
|
||||
}
|
||||
body {
|
||||
script {
|
||||
type = "application/javascript"
|
||||
src = "/vst-string-worklet-ui.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result.appendHTML(true).html {
|
||||
head {
|
||||
title { +"VST Chip" }
|
||||
meta {
|
||||
httpEquiv = "refresh"
|
||||
content = "0; url=/patch/$patch"
|
||||
}
|
||||
}
|
||||
body {
|
||||
+"Redirecting to patch $patch..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user