diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 290b3e3..6a81b1b 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -32,6 +32,7 @@ kotlin { } } binaries.executable() + useEsModules() } androidTarget { diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt index 3d3485e..ae3ce4c 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt @@ -20,7 +20,6 @@ import net.codinux.banking.ui.composables.StateHandler import net.codinux.banking.ui.composables.TransactionsList import net.codinux.banking.ui.config.Colors import net.codinux.banking.ui.config.DI -import net.codinux.banking.ui.dialogs.AddAccountDialog import net.codinux.log.LoggerFactory import org.jetbrains.compose.ui.tooling.preview.Preview diff --git a/composeApp/src/jsMain/kotlin/net/codinux/banking/ui/main.kt b/composeApp/src/jsMain/kotlin/net/codinux/banking/ui/main.kt new file mode 100644 index 0000000..957ae55 --- /dev/null +++ b/composeApp/src/jsMain/kotlin/net/codinux/banking/ui/main.kt @@ -0,0 +1,16 @@ +package net.codinux.banking.ui + +import androidx.compose.ui.ExperimentalComposeUiApi +import androidx.compose.ui.window.ComposeViewport +import kotlinx.browser.document +import kotlinx.browser.window +import org.w3c.dom.events.EventListener + +@OptIn(ExperimentalComposeUiApi::class) +fun main() { + window.addEventListener("DOMContentLoaded", EventListener { + ComposeViewport(document.body!!) { + App() + } + }) +} \ No newline at end of file diff --git a/composeApp/src/jsMain/resources/index.html b/composeApp/src/jsMain/resources/index.html new file mode 100644 index 0000000..4cea77a --- /dev/null +++ b/composeApp/src/jsMain/resources/index.html @@ -0,0 +1,14 @@ + + + + + + Bankmeister + + + + + + + + \ No newline at end of file diff --git a/composeApp/src/jsMain/resources/styles.css b/composeApp/src/jsMain/resources/styles.css new file mode 100644 index 0000000..0549b10 --- /dev/null +++ b/composeApp/src/jsMain/resources/styles.css @@ -0,0 +1,7 @@ +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; +} \ No newline at end of file