New-UI: add AboutScreen tab and make contact email clickable with mailto link

This commit is contained in:
2025-10-03 19:47:02 +02:00
parent 864397d96e
commit 07f8c666be
2 changed files with 68 additions and 8 deletions

View File

@@ -112,7 +112,7 @@ import app.klottr.platform.OutboxScheduler
import app.klottr.platform.UiFeedback
import app.klottr.platform.UiFeedbackDuration
import app.klottr.platform.hasFgLocationPerms
import app.klottr.ui.AboutDialog
import app.klottr.ui.AboutScreen
import app.klottr.ui.DmDialog
import app.klottr.ui.FornsokDialog
import app.klottr.ui.KlottrHomeContent
@@ -386,7 +386,7 @@ fun KlottrAppShell(
},
floatingActionButtonPosition = androidx.compose.material3.FabPosition.Center,
content = { innerPadding ->
if (selectedTab !in listOf("home", "nearby", "menu", "account")) {
if (selectedTab !in listOf("home", "nearby", "menu", "account", "about")) {
selectedTab = "home"
}
// VIKTIGT: vi komponerar ALLA flikar alltid, och växlar bara synlighet.
@@ -637,8 +637,8 @@ fun KlottrAppShell(
) {
items(
listOf(
Triple(Icons.Filled.Settings, "Inställningar") { showSettings = true },
Triple(Icons.Filled.Info, "Om") { showAbout = true },
Triple(Icons.Filled.Settings, "Inställningar") { selectedTab = "settings" },
Triple(Icons.Filled.Info, "Om") { selectedTab = "about" },
Triple(Icons.Filled.Person, "Konto") { selectedTab = "account" },
Triple(Icons.Filled.Bookmark, "Bokmärken") { },
Triple(Icons.Filled.Create, "Mitt klotter") { },
@@ -763,6 +763,19 @@ fun KlottrAppShell(
}
)
}
// === ABOUT ===
Box(
modifier = Modifier
.fillMaxSize()
.alpha(if (selectedTab == "about") 1f else 0f)
.zIndex(if (selectedTab == "about") 1f else 0f)
) {
AboutScreen(
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 16.dp, vertical = 0.dp) // egen padding, ingen top-padding
)
}
}
}
)
@@ -1014,10 +1027,6 @@ fun KlottrAppShell(
)
}
}
// Om-appen
if (showAbout) {
AboutDialog { showAbout = false }
}
// Närliggande
if (showNearby) {
NearbyDialog(