merge feat/welcome-screen into screen #2
1 changed files with 22 additions and 17 deletions
|
|
@ -11,6 +11,7 @@ import androidx.compose.animation.fadeIn
|
|||
import androidx.compose.animation.fadeOut
|
||||
import androidx.compose.animation.togetherWith
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
|
|
@ -64,7 +65,7 @@ fun HomeScreen(paddingValues: PaddingValues) {
|
|||
.padding(paddingValues)
|
||||
.fillMaxSize()
|
||||
.imePadding()
|
||||
.padding(all = 56.dp),
|
||||
.padding(start = 56.dp, end = 56.dp),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center) {
|
||||
Greeting(serverURL, currentScreen);
|
||||
|
|
@ -84,32 +85,35 @@ fun HomeScreen(paddingValues: PaddingValues) {
|
|||
}
|
||||
}
|
||||
|
||||
Row (
|
||||
AnimatedVisibility(currentScreen == "passwordDialog" || currentScreen == "apiDialog") {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.SpaceBetween
|
||||
) {
|
||||
AnimatedVisibility(currentScreen == "passwordDialog") {
|
||||
OutlinedButton (
|
||||
onClick = {currentScreen = "serverDialog"},
|
||||
OutlinedButton(
|
||||
onClick = { currentScreen = "serverDialog" },
|
||||
modifier = Modifier.padding(top = 24.dp)
|
||||
) {
|
||||
Row() {
|
||||
Text(text = "Change Server")
|
||||
}
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.width(12.dp))
|
||||
AnimatedVisibility(currentScreen == "passwordDialog") {
|
||||
OutlinedButton (
|
||||
OutlinedButton(
|
||||
onClick = {
|
||||
when(currentScreen) {
|
||||
"passwordDialog" -> {currentScreen = "apiDialog"}
|
||||
"apidialog" -> {currentScreen = "passwordDialog"}
|
||||
when (currentScreen) {
|
||||
"passwordDialog" -> {
|
||||
currentScreen = "apiDialog"
|
||||
}
|
||||
|
||||
"apidialog" -> {
|
||||
currentScreen = "passwordDialog"
|
||||
}
|
||||
}
|
||||
},
|
||||
modifier = Modifier.padding(top = 24.dp)
|
||||
) {
|
||||
Row() {
|
||||
when(currentScreen) {
|
||||
when (currentScreen) {
|
||||
"passwordDialog" -> Text(text = "Use API Key")
|
||||
"apiDialog" -> Text(text = "Use Password")
|
||||
}
|
||||
|
|
@ -124,7 +128,8 @@ fun HomeScreen(paddingValues: PaddingValues) {
|
|||
"apiDialog" -> currentScreen = "loadingDialog"
|
||||
"loadingDialog" -> currentScreen = "loadingDialog"
|
||||
}},
|
||||
modifier = Modifier.padding(top = 24.dp)
|
||||
modifier = Modifier
|
||||
.padding(top = 24.dp)
|
||||
.fillMaxWidth()
|
||||
.height(128.dp),
|
||||
enabled = when(currentScreen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue