Fixed files for jsBrowser

This commit is contained in:
dankito 2024-09-01 23:32:48 +02:00
parent 37b6310ad0
commit e9c0f2a77d
5 changed files with 38 additions and 1 deletions

View File

@ -32,6 +32,7 @@ kotlin {
}
}
binaries.executable()
useEsModules()
}
androidTarget {

View File

@ -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

View File

@ -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()
}
})
}

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bankmeister</title>
<link type="text/css" rel="stylesheet" href="styles.css">
<script type="application/javascript" src="skiko.js"></script>
</head>
<body>
<script type="application/javascript" src="composeApp.js"></script>
</body>
</html>

View File

@ -0,0 +1,7 @@
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}