Assorted UX improvements (#1077)
* CredentialFinder: allow seeing password when retrying Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * GitOperation: bail out early when SSH key is missing Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * OnboardingActivity: finish all activities in onBackPressed Signed-off-by: Harsh Shandilya <me@msfjarvis.dev> * Update CHANGELOG Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
4214b7fbb4
commit
0d2c6654d3
4 changed files with 13 additions and 1 deletions
|
@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
- Git server protocol and authentication mode are only updated when explicitly saved
|
||||
- Remember HTTPS password during a sync operation
|
||||
- Unable to use show/hide password option for password/passphrase after first attempt was wrong
|
||||
|
||||
## [1.11.3] - 2020-08-27
|
||||
|
||||
|
|
|
@ -81,6 +81,10 @@ class OnboardingActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
finishAffinity()
|
||||
}
|
||||
|
||||
/**
|
||||
* Clones a remote Git repository to the app's private directory
|
||||
*/
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
|||
import android.view.LayoutInflater
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.core.content.edit
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import com.google.android.material.checkbox.MaterialCheckBox
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
|
@ -61,8 +62,11 @@ class CredentialFinder(
|
|||
editCredential.setHint(hintRes)
|
||||
val rememberCredential = dialogView.findViewById<MaterialCheckBox>(R.id.git_auth_remember_credential)
|
||||
rememberCredential.setText(rememberRes)
|
||||
if (isRetry)
|
||||
if (isRetry) {
|
||||
credentialLayout.error = callingActivity.resources.getString(errorRes)
|
||||
// Reset error when user starts entering a password
|
||||
editCredential.doOnTextChanged { _, _, _, _ -> credentialLayout.error = null }
|
||||
}
|
||||
MaterialAlertDialogBuilder(callingActivity).run {
|
||||
setTitle(R.string.passphrase_dialog_title)
|
||||
setMessage(messageRes)
|
||||
|
|
|
@ -176,6 +176,9 @@ abstract class GitOperation(protected val callingActivity: FragmentActivity) {
|
|||
}
|
||||
} else {
|
||||
onMissingSshKeyFile()
|
||||
// This would correctly cancel the operation but won't surface a user-visible
|
||||
// error, allowing users to make the SSH key selection.
|
||||
return Err(SSHException(DisconnectReason.AUTH_CANCELLED_BY_USER))
|
||||
}
|
||||
AuthMode.OpenKeychain -> registerAuthProviders(SshAuthData.OpenKeychain(callingActivity))
|
||||
AuthMode.Password -> {
|
||||
|
|
Loading…
Reference in a new issue