Skip to content

Commit

Permalink
feat: enhance login UI responsiveness and feedback
Browse files Browse the repository at this point in the history
- Add import for `MGCircularProgressIndicator` in the login feature
- Simplify login submission logic by removing print statement
- Update submit button behavior to show progress indicator when loading

Signed-off-by: jnelle <[email protected]>
  • Loading branch information
jnelle committed Jun 24, 2024
1 parent 7c6e85a commit a334b98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ jobs:
- name: export ipa
env:
EXPORT_OPTIONS_PLIST: ${{ secrets.EXPORT_OPTIONS_PLIST }}
EXPORT_OPTIONS_PLIST: ${{ secrets.EXPORT_OPTIONS}}
run: |
EXPORT_OPTS_PATH=iosApp/exportOptionsRelease.plist
echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH
xcodebuild -exportArchive -archivePath $RUNNER_TEMP/iosApp.xcarchive -exportOptionsPlist $EXPORT_OPTS_PATH -exportPath build/
Expand Down
9 changes: 6 additions & 3 deletions composeApp/src/commonMain/kotlin/features/login/Login.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.unit.dp
import cafe.adriel.voyager.core.screen.Screen
import com.mgtvapi.api.repository.MGTVApiRepository
import common.components.MGCircularProgressIndicator
import kotlinx.coroutines.launch
import massengeschmacktv.composeapp.generated.resources.Res
import massengeschmacktv.composeapp.generated.resources.email
Expand Down Expand Up @@ -88,9 +89,7 @@ class LoginScreen() : Screen {
onSubmit = {
scope.launch {
loading = true
val result =
repo.login(email = email, password = password)
println(result)
loading = false
}
},
Expand Down Expand Up @@ -154,7 +153,11 @@ fun LoginContent(
modifier = Modifier.fillMaxWidth(),
enabled = isSubmitEnabled,
) {
Text(text = stringResource(resource = Res.string.login_submit))
if (!loading){
Text(text = stringResource(resource = Res.string.login_submit))
} else {
MGCircularProgressIndicator()
}
}
}
}
Expand Down
20 changes: 0 additions & 20 deletions iosApp/exportOptionsRelease.plist

This file was deleted.

0 comments on commit a334b98

Please sign in to comment.