From 0281d2751fb7abbc874f2eea24bb5a45d166de52 Mon Sep 17 00:00:00 2001 From: rnentjes Date: Wed, 26 Jun 2024 14:17:04 +0200 Subject: [PATCH] Cleanup --- .run/Main [jvm].run.xml | 27 ++++++++++++++ .../nl/astraeus/vst/chip/view/MainView.kt | 36 ++++--------------- 2 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 .run/Main [jvm].run.xml diff --git a/.run/Main [jvm].run.xml b/.run/Main [jvm].run.xml new file mode 100644 index 0000000..4378084 --- /dev/null +++ b/.run/Main [jvm].run.xml @@ -0,0 +1,27 @@ + + + + + + + false + true + false + false + + + + \ No newline at end of file diff --git a/src/jsMain/kotlin/nl/astraeus/vst/chip/view/MainView.kt b/src/jsMain/kotlin/nl/astraeus/vst/chip/view/MainView.kt index 5809c74..a3c73bc 100644 --- a/src/jsMain/kotlin/nl/astraeus/vst/chip/view/MainView.kt +++ b/src/jsMain/kotlin/nl/astraeus/vst/chip/view/MainView.kt @@ -7,27 +7,11 @@ import daw.style.CssId import daw.style.CssName import daw.style.hover import kotlinx.browser.window -import kotlinx.html.InputType -import kotlinx.html.div -import kotlinx.html.h1 -import kotlinx.html.input +import kotlinx.html.* import kotlinx.html.js.onChangeFunction import kotlinx.html.js.onClickFunction import kotlinx.html.js.onInputFunction -import kotlinx.html.option -import kotlinx.html.select -import kotlinx.html.span -import nl.astraeus.css.properties.BoxSizing -import nl.astraeus.css.properties.FontWeight -import nl.astraeus.css.properties.Position -import nl.astraeus.css.properties.Transform -import nl.astraeus.css.properties.em -import nl.astraeus.css.properties.hsla -import nl.astraeus.css.properties.prc -import nl.astraeus.css.properties.px -import nl.astraeus.css.properties.rem -import nl.astraeus.css.properties.vh -import nl.astraeus.css.properties.vw +import nl.astraeus.css.properties.* import nl.astraeus.css.style.cls import nl.astraeus.komp.HtmlBuilder import nl.astraeus.komp.Komponent @@ -79,11 +63,7 @@ object MainView : Komponent() { select { option { +"None" - value = "" - } - option { - +"Midi over Broadcast" - value = "midi-broadcast" + value = "none" } for (mi in Midi.inputs) { option { @@ -94,7 +74,7 @@ object MainView : Komponent() { onChangeFunction = { event -> val target = event.target as HTMLSelectElement - if (target.value == "") { + if (target.value == "none") { Midi.setInput(null) } else { val selected = Midi.inputs.find { it.id == target.value } @@ -127,11 +107,7 @@ object MainView : Komponent() { select { option { +"None" - value = "" - } - option { - +"Midi over Broadcast" - value = "midi-broadcast" + value = "none" } for (mi in Midi.outputs) { option { @@ -142,7 +118,7 @@ object MainView : Komponent() { onChangeFunction = { event -> val target = event.target as HTMLSelectElement - if (target.value == "") { + if (target.value == "none") { Midi.setOutput(null) } else { val selected = Midi.outputs.find { it.id == target.value }