fixing footer-issue
This commit is contained in:
@@ -24,18 +24,20 @@ fun App() {
|
|||||||
title = "Meldestelle",
|
title = "Meldestelle",
|
||||||
onNavigateToPing = { currentScreen = AppScreen.Ping }
|
onNavigateToPing = { currentScreen = AppScreen.Ping }
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
) { paddingValues ->
|
{ paddingValues ->
|
||||||
Box(modifier = Modifier.padding(paddingValues)) {
|
Box(modifier = Modifier.padding(paddingValues)) {
|
||||||
when (currentScreen) {
|
when (currentScreen) {
|
||||||
is AppScreen.Home -> {
|
is AppScreen.Home -> {
|
||||||
LandingScreen()
|
LandingScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
is AppScreen.Ping -> {
|
is AppScreen.Ping -> {
|
||||||
PingScreen(viewModel = pingViewModel)
|
PingScreen(viewModel = pingViewModel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import androidx.compose.ui.unit.dp
|
|||||||
fun LandingScreen() {
|
fun LandingScreen() {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxWidth()
|
||||||
.padding(32.dp),
|
.padding(32.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Center
|
verticalArrangement = Arrangement.Top
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "Willkommen bei Meldestelle",
|
text = "Willkommen bei Meldestelle",
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
const isLocalhost = ['localhost', '127.0.0.1', '::1'].includes(location.hostname);
|
const isLocalhost = ['localhost', '127.0.0.1', '::1'].includes(location.hostname);
|
||||||
if (isLocalhost) {
|
if (isLocalhost) {
|
||||||
// Unregister any existing service workers to avoid dev reload loops
|
|
||||||
navigator.serviceWorker.getRegistrations().then(regs => {
|
navigator.serviceWorker.getRegistrations().then(regs => {
|
||||||
for (const reg of regs) reg.unregister();
|
for (const reg of regs) reg.unregister();
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden; /* Verhindert Scrollbalken durch die Canvas */
|
overflow: hidden; /* Verhindert Scrollbalken durch die Canvas */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ComposeTarget {
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ fun AppFooter() {
|
|||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = "© 2024 Meldestelle - Built with Kotlin Multiplatform",
|
text = "© 2025 Meldestelle - Built with Kotlin Multiplatform",
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
textAlign = TextAlign.Center
|
textAlign = TextAlign.Center
|
||||||
|
|||||||
+4
-8
@@ -14,20 +14,16 @@ fun AppScaffold(
|
|||||||
header: @Composable () -> Unit = {
|
header: @Composable () -> Unit = {
|
||||||
AppHeader(title = "Meldestelle")
|
AppHeader(title = "Meldestelle")
|
||||||
},
|
},
|
||||||
|
content: @Composable (PaddingValues) -> Unit,
|
||||||
footer: @Composable () -> Unit = {
|
footer: @Composable () -> Unit = {
|
||||||
AppFooter()
|
AppFooter()
|
||||||
},
|
},
|
||||||
content: @Composable (PaddingValues) -> Unit
|
|
||||||
) {
|
) {
|
||||||
Column(modifier = Modifier.fillMaxSize()) {
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = header,
|
topBar = header,
|
||||||
modifier = Modifier.weight(1f)
|
bottomBar = footer,
|
||||||
) {
|
modifier = Modifier.fillMaxSize()
|
||||||
paddingValues ->
|
) { paddingValues ->
|
||||||
content(paddingValues)
|
content(paddingValues)
|
||||||
}
|
}
|
||||||
footer()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user