feat: add screen transitions and rebrand to MyIce

- AnimatedContent with fade transitions between screens (300ms)
- Desktop window title 'MyIce' (dropped 'K' codename)
This commit is contained in:
2026-08-06 17:19:21 +02:00
parent c9841b6744
commit 85e2391833
2 changed files with 32 additions and 19 deletions
@@ -17,6 +17,11 @@
package ch.parano.myicek package ch.parano.myicek
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState import androidx.compose.runtime.collectAsState
@@ -83,7 +88,14 @@ fun App(
} }
MyIceTheme { MyIceTheme {
when (val screen = currentScreen) { AnimatedContent(
targetState = currentScreen,
transitionSpec = {
fadeIn(tween(300)) togetherWith fadeOut(tween(300))
},
label = "screenTransition",
) { screen ->
when (screen) {
Screen.Login -> LoginScreen(viewModel = authViewModel) Screen.Login -> LoginScreen(viewModel = authViewModel)
Screen.Schedule -> ScheduleScreen( Screen.Schedule -> ScheduleScreen(
scheduleViewModel = scheduleViewModel, scheduleViewModel = scheduleViewModel,
@@ -104,3 +116,4 @@ fun App(
} }
} }
} }
}
@@ -22,7 +22,7 @@ import androidx.compose.ui.window.application
import ch.parano.myicek.auth.DesktopOAuthClient import ch.parano.myicek.auth.DesktopOAuthClient
fun main() = application { fun main() = application {
Window(onCloseRequest = ::exitApplication, title = "MyIceK") { Window(onCloseRequest = ::exitApplication, title = "MyIce") {
App(oauthClient = DesktopOAuthClient()) App(oauthClient = DesktopOAuthClient())
} }
} }