mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 03:16:02 +03:00
Merge pull request #3545 from vector-im/feature/bma/password_reveal
Password reveal
This commit is contained in:
commit
7257736691
62 changed files with 276 additions and 1047 deletions
1
changelog.d/3545.feature
Normal file
1
changelog.d/3545.feature
Normal file
|
@ -0,0 +1 @@
|
|||
Reveal password: use facility from com.google.android.material.textfield.TextInputLayout instead of manual handling.
|
|
@ -17,6 +17,8 @@
|
|||
package im.vector.lib.ui.styles.debug
|
||||
|
||||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import android.widget.EditText
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import im.vector.lib.ui.styles.databinding.ActivityDebugTextViewBinding
|
||||
|
||||
|
@ -27,5 +29,20 @@ abstract class DebugVectorTextViewActivity : AppCompatActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
val views = ActivityDebugTextViewBinding.inflate(layoutInflater)
|
||||
setContentView(views.root)
|
||||
|
||||
views.debugShowPassword.setOnClickListener {
|
||||
views.debugTextInputEditText.showPassword(true)
|
||||
}
|
||||
views.debugHidePassword.setOnClickListener {
|
||||
views.debugTextInputEditText.showPassword(false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun EditText.showPassword(visible: Boolean) {
|
||||
if (visible) {
|
||||
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
|
||||
} else {
|
||||
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
tools:ignore="HardcodedText">
|
||||
|
||||
<TextView
|
||||
|
@ -65,4 +67,34 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="Default (TextAppearance.Vector.Body)\nline 2" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/debugTextInputLayout"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="Password"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/debugTextInputEditText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/debugShowPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Show password" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/debugHidePassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hide password" />
|
||||
|
||||
</LinearLayout>
|
|
@ -4,6 +4,11 @@
|
|||
<!-- Default style for TextInputLayout -->
|
||||
<style name="Widget.Vector.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
|
||||
|
||||
<style name="Widget.Vector.TextInputLayout.Password">
|
||||
<item name="endIconMode">password_toggle</item>
|
||||
<item name="endIconTint">?vctr_content_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Vector.EditText.Composer" parent="Widget.AppCompat.EditText">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:inputType">textCapSentences|textMultiLine</item>
|
||||
|
|
|
@ -20,14 +20,11 @@ import android.app.Activity
|
|||
import android.text.Editable
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.SimpleTextWatcher
|
||||
import im.vector.app.databinding.DialogExportE2eKeysBinding
|
||||
|
||||
class ExportKeysDialog {
|
||||
|
||||
private var passwordVisible = false
|
||||
|
||||
fun show(activity: Activity, exportKeyDialogListener: ExportKeyDialogListener) {
|
||||
val dialogLayout = activity.layoutInflater.inflate(R.layout.dialog_export_e2e_keys, null)
|
||||
val views = DialogExportE2eKeysBinding.bind(dialogLayout)
|
||||
|
@ -57,13 +54,6 @@ class ExportKeysDialog {
|
|||
views.exportDialogEt.addTextChangedListener(textWatcher)
|
||||
views.exportDialogEtConfirm.addTextChangedListener(textWatcher)
|
||||
|
||||
views.exportDialogShowPassword.setOnClickListener {
|
||||
passwordVisible = !passwordVisible
|
||||
views.exportDialogEt.showPassword(passwordVisible)
|
||||
views.exportDialogEtConfirm.showPassword(passwordVisible)
|
||||
views.exportDialogShowPassword.render(passwordVisible)
|
||||
}
|
||||
|
||||
val exportDialog = builder.show()
|
||||
|
||||
views.exportDialogSubmit.setOnClickListener {
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* Copyright 2020 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.core.dialogs
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.DialogInterface
|
||||
import android.text.Editable
|
||||
import android.view.KeyEvent
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.SimpleTextWatcher
|
||||
import im.vector.app.databinding.DialogPromptPasswordBinding
|
||||
|
||||
class PromptPasswordDialog {
|
||||
|
||||
private var passwordVisible = false
|
||||
|
||||
fun show(activity: Activity, listener: (String) -> Unit) {
|
||||
val dialogLayout = activity.layoutInflater.inflate(R.layout.dialog_prompt_password, null)
|
||||
val views = DialogPromptPasswordBinding.bind(dialogLayout)
|
||||
val textWatcher = object : SimpleTextWatcher() {
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
views.promptPasswordTil.error = null
|
||||
}
|
||||
}
|
||||
views.promptPassword.addTextChangedListener(textWatcher)
|
||||
|
||||
views.promptPasswordPasswordReveal.setOnClickListener {
|
||||
passwordVisible = !passwordVisible
|
||||
views.promptPassword.showPassword(passwordVisible)
|
||||
views.promptPasswordPasswordReveal.render(passwordVisible)
|
||||
}
|
||||
|
||||
MaterialAlertDialogBuilder(activity)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setTitle(R.string.devices_delete_dialog_title)
|
||||
.setView(dialogLayout)
|
||||
.setPositiveButton(R.string.auth_submit, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setOnKeyListener(DialogInterface.OnKeyListener { dialog, keyCode, event ->
|
||||
if (event.action == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
dialog.cancel()
|
||||
return@OnKeyListener true
|
||||
}
|
||||
false
|
||||
})
|
||||
.setOnDismissListener {
|
||||
dialogLayout.hideKeyboard()
|
||||
}
|
||||
.create()
|
||||
.apply {
|
||||
setOnShowListener {
|
||||
getButton(AlertDialog.BUTTON_POSITIVE)
|
||||
.setOnClickListener {
|
||||
if (views.promptPassword.text.toString().isEmpty()) {
|
||||
views.promptPasswordTil.error = activity.getString(R.string.error_empty_field_your_password)
|
||||
} else {
|
||||
listener.invoke(views.promptPassword.text.toString())
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.show()
|
||||
}
|
||||
}
|
|
@ -40,13 +40,8 @@ fun SearchView.withoutLeftMargin() {
|
|||
}
|
||||
}
|
||||
|
||||
fun EditText.showPassword(visible: Boolean, updateCursor: Boolean = true) {
|
||||
if (visible) {
|
||||
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
|
||||
} else {
|
||||
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD
|
||||
}
|
||||
if (updateCursor) setSelection(text?.length ?: 0)
|
||||
fun EditText.hidePassword() {
|
||||
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
|
||||
}
|
||||
|
||||
fun View.getMeasurements(): Pair<Int, Int> {
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.core.ui.views
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import im.vector.app.R
|
||||
|
||||
class RevealPasswordImageView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : AppCompatImageView(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
render(false)
|
||||
}
|
||||
|
||||
fun render(isPasswordShown: Boolean) {
|
||||
if (isPasswordShown) {
|
||||
contentDescription = context.getString(R.string.a11y_hide_password)
|
||||
setImageResource(R.drawable.ic_eye_closed)
|
||||
} else {
|
||||
contentDescription = context.getString(R.string.a11y_show_password)
|
||||
setImageResource(R.drawable.ic_eye)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,7 +24,6 @@ import androidx.core.view.isVisible
|
|||
import com.airbnb.mvrx.activityViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentReauthConfirmBinding
|
||||
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
|
||||
|
@ -41,13 +40,6 @@ class PromptFragment : VectorBaseFragment<FragmentReauthConfirmBinding>() {
|
|||
views.reAuthConfirmButton.debouncedClicks {
|
||||
onButtonClicked()
|
||||
}
|
||||
views.passwordReveal.debouncedClicks {
|
||||
viewModel.handle(ReAuthActions.StartSSOFallback)
|
||||
}
|
||||
|
||||
views.passwordReveal.debouncedClicks {
|
||||
viewModel.handle(ReAuthActions.TogglePassVisibility)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onButtonClicked() = withState(viewModel) { state ->
|
||||
|
@ -74,11 +66,11 @@ class PromptFragment : VectorBaseFragment<FragmentReauthConfirmBinding>() {
|
|||
override fun invalidate() = withState(viewModel) {
|
||||
when (it.flowType) {
|
||||
LoginFlowTypes.SSO -> {
|
||||
views.passwordContainer.isVisible = false
|
||||
views.passwordFieldTil.isVisible = false
|
||||
views.reAuthConfirmButton.text = getString(R.string.auth_login_sso)
|
||||
}
|
||||
LoginFlowTypes.PASSWORD -> {
|
||||
views.passwordContainer.isVisible = true
|
||||
views.passwordFieldTil.isVisible = true
|
||||
views.reAuthConfirmButton.text = getString(R.string._continue)
|
||||
}
|
||||
else -> {
|
||||
|
@ -86,9 +78,6 @@ class PromptFragment : VectorBaseFragment<FragmentReauthConfirmBinding>() {
|
|||
}
|
||||
}
|
||||
|
||||
views.passwordField.showPassword(it.passwordVisible)
|
||||
views.passwordReveal.render(it.passwordVisible)
|
||||
|
||||
if (it.lastErrorCode != null) {
|
||||
when (it.flowType) {
|
||||
LoginFlowTypes.SSO -> {
|
||||
|
|
|
@ -22,6 +22,5 @@ sealed class ReAuthActions : VectorViewModelAction {
|
|||
object StartSSOFallback : ReAuthActions()
|
||||
object FallBackPageLoaded : ReAuthActions()
|
||||
object FallBackPageClosed : ReAuthActions()
|
||||
object TogglePassVisibility : ReAuthActions()
|
||||
data class ReAuthWithPass(val password: String) : ReAuthActions()
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ data class ReAuthState(
|
|||
val session: String? = null,
|
||||
val flowType: String? = null,
|
||||
val ssoFallbackPageWasShown: Boolean = false,
|
||||
val passwordVisible: Boolean = false,
|
||||
val lastErrorCode: String? = null,
|
||||
val resultKeyStoreAlias: String = ""
|
||||
) : MvRxState {
|
||||
|
|
|
@ -65,13 +65,6 @@ class ReAuthViewModel @AssistedInject constructor(
|
|||
ReAuthActions.FallBackPageClosed -> {
|
||||
// Should we do something here?
|
||||
}
|
||||
ReAuthActions.TogglePassVisibility -> {
|
||||
setState {
|
||||
copy(
|
||||
passwordVisible = !state.passwordVisible
|
||||
)
|
||||
}
|
||||
}
|
||||
is ReAuthActions.ReAuthWithPass -> {
|
||||
val safeForIntentCypher = ByteArrayOutputStream().also {
|
||||
it.use {
|
||||
|
|
|
@ -25,7 +25,6 @@ import android.view.inputmethod.EditorInfo
|
|||
import androidx.core.text.set
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentKeysBackupRestoreFromPassphraseBinding
|
||||
|
||||
|
@ -40,10 +39,6 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
|||
private lateinit var viewModel: KeysBackupRestoreFromPassphraseViewModel
|
||||
private lateinit var sharedViewModel: KeysBackupRestoreSharedViewModel
|
||||
|
||||
private fun toggleVisibilityMode() {
|
||||
viewModel.showPasswordMode.value = !(viewModel.showPasswordMode.value ?: false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
|
@ -56,12 +51,6 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
|||
|
||||
views.helperTextWithLink.text = spannableStringForHelperText()
|
||||
|
||||
viewModel.showPasswordMode.observe(viewLifecycleOwner) {
|
||||
val shouldBeVisible = it ?: false
|
||||
views.keysBackupPassphraseEnterEdittext.showPassword(shouldBeVisible)
|
||||
views.keysBackupViewShowPassword.render(shouldBeVisible)
|
||||
}
|
||||
|
||||
views.keysBackupPassphraseEnterEdittext.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
onRestoreBackup()
|
||||
|
@ -70,7 +59,6 @@ class KeysBackupRestoreFromPassphraseFragment @Inject constructor() : VectorBase
|
|||
return@setOnEditorActionListener false
|
||||
}
|
||||
|
||||
views.keysBackupViewShowPassword.setOnClickListener { toggleVisibilityMode() }
|
||||
views.helperTextWithLink.setOnClickListener { onUseRecoveryKey() }
|
||||
views.keysBackupRestoreWithPassphraseSubmit.setOnClickListener { onRestoreBackup() }
|
||||
views.keysBackupPassphraseEnterEdittext.doOnTextChanged { text, _, _, _ -> onPassphraseTextEditChange(text) }
|
||||
|
|
|
@ -30,12 +30,10 @@ class KeysBackupRestoreFromPassphraseViewModel @Inject constructor(
|
|||
|
||||
var passphrase: MutableLiveData<String> = MutableLiveData()
|
||||
var passphraseErrorText: MutableLiveData<String> = MutableLiveData()
|
||||
var showPasswordMode: MutableLiveData<Boolean> = MutableLiveData()
|
||||
|
||||
init {
|
||||
passphrase.value = null
|
||||
passphraseErrorText.value = null
|
||||
showPasswordMode.value = false
|
||||
}
|
||||
|
||||
// ========= Actions =========
|
||||
|
|
|
@ -64,7 +64,6 @@ class KeysBackupSetupSharedViewModel @Inject constructor() : ViewModel() {
|
|||
var confirmPassphraseError: MutableLiveData<String> = MutableLiveData()
|
||||
|
||||
var passwordStrength: MutableLiveData<Strength> = MutableLiveData()
|
||||
var showPasswordMode: MutableLiveData<Boolean> = MutableLiveData()
|
||||
|
||||
// Step 3
|
||||
// Var to ignore events from previous request(s) to generate a recovery key
|
||||
|
@ -80,7 +79,6 @@ class KeysBackupSetupSharedViewModel @Inject constructor() : ViewModel() {
|
|||
var loadingStatus: MutableLiveData<WaitingViewData> = MutableLiveData()
|
||||
|
||||
init {
|
||||
showPasswordMode.value = false
|
||||
recoveryKey.value = null
|
||||
isCreatingBackupVersion.value = false
|
||||
prepareRecoverFailError.value = null
|
||||
|
@ -97,9 +95,6 @@ class KeysBackupSetupSharedViewModel @Inject constructor() : ViewModel() {
|
|||
currentRequestId.value = System.currentTimeMillis()
|
||||
isCreatingBackupVersion.value = true
|
||||
|
||||
// Ensure passphrase is hidden during the process
|
||||
showPasswordMode.value = false
|
||||
|
||||
recoveryKey.value = null
|
||||
prepareRecoverFailError.value = null
|
||||
session.let { mxSession ->
|
||||
|
|
|
@ -25,7 +25,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import androidx.transition.TransitionManager
|
||||
import com.nulabinc.zxcvbn.Zxcvbn
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentKeysBackupSetupStep2Binding
|
||||
import im.vector.app.features.settings.VectorLocale
|
||||
|
@ -113,13 +113,6 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment<Fr
|
|||
|
||||
views.keysBackupSetupStep2PassphraseConfirmEditText.setText(viewModel.confirmPassphrase.value)
|
||||
|
||||
viewModel.showPasswordMode.observe(viewLifecycleOwner) {
|
||||
val shouldBeVisible = it ?: false
|
||||
views.keysBackupSetupStep2PassphraseEnterEdittext.showPassword(shouldBeVisible)
|
||||
views.keysBackupSetupStep2PassphraseConfirmEditText.showPassword(shouldBeVisible)
|
||||
views.keysBackupSetupStep2ShowPassword.render(shouldBeVisible)
|
||||
}
|
||||
|
||||
viewModel.confirmPassphraseError.observe(viewLifecycleOwner) {
|
||||
TransitionManager.beginDelayedTransition(views.keysBackupRoot)
|
||||
views.keysBackupSetupStep2PassphraseConfirmTil.error = it
|
||||
|
@ -135,7 +128,6 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment<Fr
|
|||
}
|
||||
|
||||
private fun setupViews() {
|
||||
views.keysBackupSetupStep2ShowPassword.setOnClickListener { toggleVisibilityMode() }
|
||||
views.keysBackupSetupStep2Button.setOnClickListener { doNext() }
|
||||
views.keysBackupSetupStep2SkipButton.setOnClickListener { skipPassphrase() }
|
||||
|
||||
|
@ -143,10 +135,6 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment<Fr
|
|||
views.keysBackupSetupStep2PassphraseConfirmEditText.doOnTextChanged { _, _, _, _ -> onConfirmPassphraseChanged() }
|
||||
}
|
||||
|
||||
private fun toggleVisibilityMode() {
|
||||
viewModel.showPasswordMode.value = !(viewModel.showPasswordMode.value ?: false)
|
||||
}
|
||||
|
||||
private fun doNext() {
|
||||
when {
|
||||
viewModel.passphrase.value.isNullOrEmpty() -> {
|
||||
|
@ -161,6 +149,9 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment<Fr
|
|||
else -> {
|
||||
viewModel.megolmBackupCreationInfo = null
|
||||
|
||||
// Ensure passphrase is hidden during the process
|
||||
views.keysBackupSetupStep2PassphraseEnterEdittext.hidePassword()
|
||||
views.keysBackupSetupStep2PassphraseConfirmEditText.hidePassword()
|
||||
viewModel.prepareRecoveryKey(requireActivity(), viewModel.passphrase.value)
|
||||
}
|
||||
}
|
||||
|
@ -172,6 +163,9 @@ class KeysBackupSetupStep2Fragment @Inject constructor() : VectorBaseFragment<Fr
|
|||
// Generate a recovery key for the user
|
||||
viewModel.megolmBackupCreationInfo = null
|
||||
|
||||
// Ensure passphrase is hidden during the process
|
||||
views.keysBackupSetupStep2PassphraseEnterEdittext.hidePassword()
|
||||
views.keysBackupSetupStep2PassphraseConfirmEditText.hidePassword()
|
||||
viewModel.prepareRecoveryKey(requireActivity(), null)
|
||||
}
|
||||
else -> {
|
||||
|
|
|
@ -21,8 +21,6 @@ import im.vector.app.core.platform.VectorViewModelAction
|
|||
import im.vector.app.core.platform.WaitingViewData
|
||||
|
||||
sealed class SharedSecureStorageAction : VectorViewModelAction {
|
||||
|
||||
object TogglePasswordVisibility : SharedSecureStorageAction()
|
||||
object UseKey : SharedSecureStorageAction()
|
||||
object Back : SharedSecureStorageAction()
|
||||
object Cancel : SharedSecureStorageAction()
|
||||
|
|
|
@ -50,7 +50,6 @@ import java.io.ByteArrayOutputStream
|
|||
data class SharedSecureStorageViewState(
|
||||
val ready: Boolean = false,
|
||||
val hasPassphrase: Boolean = true,
|
||||
val passphraseVisible: Boolean = false,
|
||||
val checkingSSSSAction: Async<Unit> = Uninitialized,
|
||||
val step: Step = Step.EnterPassphrase,
|
||||
val activeDeviceCount: Int = 0,
|
||||
|
@ -128,7 +127,6 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
|
||||
override fun handle(action: SharedSecureStorageAction) = withState {
|
||||
when (action) {
|
||||
is SharedSecureStorageAction.TogglePasswordVisibility -> handleTogglePasswordVisibility()
|
||||
is SharedSecureStorageAction.Cancel -> handleCancel()
|
||||
is SharedSecureStorageAction.SubmitPassphrase -> handleSubmitPassphrase(action)
|
||||
SharedSecureStorageAction.UseKey -> handleUseKey()
|
||||
|
@ -319,14 +317,6 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
_viewEvents.post(SharedSecureStorageViewEvent.Dismiss)
|
||||
}
|
||||
|
||||
private fun handleTogglePasswordVisibility() {
|
||||
setState {
|
||||
copy(
|
||||
passphraseVisible = !passphraseVisible
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
companion object : MvRxViewModelFactory<SharedSecureStorageViewModel, SharedSecureStorageViewState> {
|
||||
|
||||
@JvmStatic
|
||||
|
|
|
@ -23,11 +23,9 @@ import android.view.ViewGroup
|
|||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.core.text.toSpannable
|
||||
import com.airbnb.mvrx.activityViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import com.jakewharton.rxbinding3.widget.editorActionEvents
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.databinding.FragmentSsssAccessFromPassphraseBinding
|
||||
|
@ -92,7 +90,6 @@ class SharedSecuredStoragePassphraseFragment @Inject constructor(
|
|||
|
||||
views.ssssPassphraseSubmit.debouncedClicks { submit() }
|
||||
views.ssssPassphraseUseKey.debouncedClicks { sharedViewModel.handle(SharedSecureStorageAction.UseKey) }
|
||||
views.ssssViewShowPassword.debouncedClicks { sharedViewModel.handle(SharedSecureStorageAction.TogglePasswordVisibility) }
|
||||
}
|
||||
|
||||
fun submit() {
|
||||
|
@ -101,10 +98,4 @@ class SharedSecuredStoragePassphraseFragment @Inject constructor(
|
|||
views.ssssPassphraseSubmit.isEnabled = false
|
||||
sharedViewModel.handle(SharedSecureStorageAction.SubmitPassphrase(text))
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(sharedViewModel) { state ->
|
||||
val shouldBeVisible = state.passphraseVisible
|
||||
views.ssssPassphraseEnterEdittext.showPassword(shouldBeVisible)
|
||||
views.ssssViewShowPassword.render(shouldBeVisible)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ sealed class BootstrapActions : VectorViewModelAction {
|
|||
|
||||
data class DoInitialize(val passphrase: String) : BootstrapActions()
|
||||
object DoInitializeGeneratedKey : BootstrapActions()
|
||||
object TogglePasswordVisibility : BootstrapActions()
|
||||
data class UpdateCandidatePassphrase(val pass: String) : BootstrapActions()
|
||||
data class UpdateConfirmCandidatePassphrase(val pass: String) : BootstrapActions()
|
||||
// data class ReAuth(val pass: String) : BootstrapActions()
|
||||
|
|
|
@ -28,7 +28,6 @@ import com.jakewharton.rxbinding3.widget.editorActionEvents
|
|||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentBootstrapEnterPassphraseBinding
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
|
@ -84,7 +83,6 @@ class BootstrapConfirmPassphraseFragment @Inject constructor()
|
|||
// }
|
||||
}
|
||||
|
||||
views.ssssViewShowPassword.debouncedClicks { sharedViewModel.handle(BootstrapActions.TogglePasswordVisibility) }
|
||||
views.bootstrapSubmit.debouncedClicks { submit() }
|
||||
}
|
||||
|
||||
|
@ -104,12 +102,4 @@ class BootstrapConfirmPassphraseFragment @Inject constructor()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun invalidate() = withState(sharedViewModel) { state ->
|
||||
if (state.step is BootstrapStep.ConfirmPassphrase) {
|
||||
val isPasswordVisible = state.step.isPasswordVisible
|
||||
views.ssssPassphraseEnterEdittext.showPassword(isPasswordVisible, updateCursor = false)
|
||||
views.ssssViewShowPassword.render(isPasswordVisible)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import com.airbnb.mvrx.withState
|
|||
import com.jakewharton.rxbinding3.widget.editorActionEvents
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.databinding.FragmentBootstrapEnterPassphraseBinding
|
||||
import im.vector.app.features.settings.VectorLocale
|
||||
|
@ -80,7 +79,6 @@ class BootstrapEnterPassphraseFragment @Inject constructor()
|
|||
// }
|
||||
}
|
||||
|
||||
views.ssssViewShowPassword.debouncedClicks { sharedViewModel.handle(BootstrapActions.TogglePasswordVisibility) }
|
||||
views.bootstrapSubmit.debouncedClicks { submit() }
|
||||
}
|
||||
|
||||
|
@ -101,10 +99,6 @@ class BootstrapEnterPassphraseFragment @Inject constructor()
|
|||
|
||||
override fun invalidate() = withState(sharedViewModel) { state ->
|
||||
if (state.step is BootstrapStep.SetupPassphrase) {
|
||||
val isPasswordVisible = state.step.isPasswordVisible
|
||||
views.ssssPassphraseEnterEdittext.showPassword(isPasswordVisible, updateCursor = false)
|
||||
views.ssssViewShowPassword.render(isPasswordVisible)
|
||||
|
||||
state.passphraseStrength.invoke()?.let { strength ->
|
||||
val score = strength.score
|
||||
views.ssssPassphraseSecurityProgress.strength = score
|
||||
|
|
|
@ -34,7 +34,6 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.VectorBaseFragment
|
||||
import im.vector.app.core.resources.ColorProvider
|
||||
import im.vector.app.core.utils.colorizeMatchingText
|
||||
|
@ -84,7 +83,6 @@ class BootstrapMigrateBackupFragment @Inject constructor(
|
|||
|
||||
// sharedViewModel.observeViewEvents {}
|
||||
views.bootstrapMigrateContinueButton.debouncedClicks { submit() }
|
||||
views.bootstrapMigrateShowPassword.debouncedClicks { sharedViewModel.handle(BootstrapActions.TogglePasswordVisibility) }
|
||||
views.bootstrapMigrateForgotPassphrase.debouncedClicks { sharedViewModel.handle(BootstrapActions.HandleForgotBackupPassphrase) }
|
||||
views.bootstrapMigrateUseFile.debouncedClicks { startImportTextFromFileIntent(requireContext(), importFileStartForActivityResult) }
|
||||
}
|
||||
|
@ -116,7 +114,6 @@ class BootstrapMigrateBackupFragment @Inject constructor(
|
|||
val isEnteringKey = getBackupSecretForMigration.useKey()
|
||||
|
||||
if (isEnteringKey) {
|
||||
views.bootstrapMigrateShowPassword.isVisible = false
|
||||
views.bootstrapMigrateEditText.inputType = TYPE_CLASS_TEXT or TYPE_TEXT_VARIATION_VISIBLE_PASSWORD or TYPE_TEXT_FLAG_MULTI_LINE
|
||||
|
||||
val recKey = getString(R.string.bootstrap_migration_backup_recovery_key)
|
||||
|
@ -128,14 +125,6 @@ class BootstrapMigrateBackupFragment @Inject constructor(
|
|||
views.bootstrapMigrateForgotPassphrase.isVisible = false
|
||||
views.bootstrapMigrateUseFile.isVisible = true
|
||||
} else {
|
||||
views.bootstrapMigrateShowPassword.isVisible = true
|
||||
|
||||
if (state.step is BootstrapStep.GetBackupSecretPassForMigration) {
|
||||
val isPasswordVisible = state.step.isPasswordVisible
|
||||
views.bootstrapMigrateEditText.showPassword(isPasswordVisible, updateCursor = false)
|
||||
views.bootstrapMigrateShowPassword.render(isPasswordVisible)
|
||||
}
|
||||
|
||||
views.bootstrapDescriptionText.text = getString(R.string.bootstrap_migration_enter_backup_password)
|
||||
|
||||
views.bootstrapMigrateEditText.hint = getString(R.string.passphrase_enter_passphrase)
|
||||
|
|
|
@ -139,7 +139,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
private fun handleStartMigratingKeyBackup() {
|
||||
if (isBackupCreatedFromPassphrase) {
|
||||
setState {
|
||||
copy(step = BootstrapStep.GetBackupSecretPassForMigration(isPasswordVisible = false, useKey = false))
|
||||
copy(step = BootstrapStep.GetBackupSecretPassForMigration(useKey = false))
|
||||
}
|
||||
} else {
|
||||
setState {
|
||||
|
@ -151,29 +151,6 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
override fun handle(action: BootstrapActions) = withState { state ->
|
||||
when (action) {
|
||||
is BootstrapActions.GoBack -> queryBack()
|
||||
BootstrapActions.TogglePasswordVisibility -> {
|
||||
when (state.step) {
|
||||
is BootstrapStep.SetupPassphrase -> {
|
||||
setState {
|
||||
copy(step = state.step.copy(isPasswordVisible = !state.step.isPasswordVisible))
|
||||
}
|
||||
}
|
||||
is BootstrapStep.ConfirmPassphrase -> {
|
||||
setState {
|
||||
copy(step = state.step.copy(isPasswordVisible = !state.step.isPasswordVisible))
|
||||
}
|
||||
}
|
||||
is BootstrapStep.AccountReAuth -> {
|
||||
// nop
|
||||
}
|
||||
is BootstrapStep.GetBackupSecretPassForMigration -> {
|
||||
setState {
|
||||
copy(step = state.step.copy(isPasswordVisible = !state.step.isPasswordVisible))
|
||||
}
|
||||
}
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
BootstrapActions.StartKeyBackupMigration -> {
|
||||
handleStartMigratingKeyBackup()
|
||||
}
|
||||
|
@ -193,9 +170,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
setState {
|
||||
copy(
|
||||
passphrase = action.passphrase,
|
||||
step = BootstrapStep.ConfirmPassphrase(
|
||||
isPasswordVisible = (state.step as? BootstrapStep.SetupPassphrase)?.isPasswordVisible ?: false
|
||||
)
|
||||
step = BootstrapStep.ConfirmPassphrase
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -255,7 +230,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
BootstrapActions.HandleForgotBackupPassphrase -> {
|
||||
if (state.step is BootstrapStep.GetBackupSecretPassForMigration) {
|
||||
setState {
|
||||
copy(step = BootstrapStep.GetBackupSecretPassForMigration(state.step.isPasswordVisible, true))
|
||||
copy(step = BootstrapStep.GetBackupSecretPassForMigration(true))
|
||||
}
|
||||
} else return@withState
|
||||
}
|
||||
|
@ -293,7 +268,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
if (action.userWantsToEnterPassphrase) {
|
||||
setState {
|
||||
copy(
|
||||
step = BootstrapStep.SetupPassphrase(isPasswordVisible = false)
|
||||
step = BootstrapStep.SetupPassphrase
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
@ -493,7 +468,6 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
setState {
|
||||
copy(
|
||||
step = BootstrapStep.GetBackupSecretPassForMigration(
|
||||
isPasswordVisible = state.step.isPasswordVisible,
|
||||
useKey = false
|
||||
)
|
||||
)
|
||||
|
@ -524,9 +498,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
is BootstrapStep.ConfirmPassphrase -> {
|
||||
setState {
|
||||
copy(
|
||||
step = BootstrapStep.SetupPassphrase(
|
||||
isPasswordVisible = state.step.isPasswordVisible
|
||||
)
|
||||
step = BootstrapStep.SetupPassphrase
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,13 +91,13 @@ sealed class BootstrapStep {
|
|||
// Use will be asked to choose between passphrase or recovery key, or to start process if a key backup exists
|
||||
data class FirstForm(val keyBackUpExist: Boolean, val reset: Boolean = false) : BootstrapStep()
|
||||
|
||||
data class SetupPassphrase(val isPasswordVisible: Boolean) : BootstrapStep()
|
||||
data class ConfirmPassphrase(val isPasswordVisible: Boolean) : BootstrapStep()
|
||||
object SetupPassphrase : BootstrapStep()
|
||||
object ConfirmPassphrase : BootstrapStep()
|
||||
|
||||
data class AccountReAuth(val failure: String? = null) : BootstrapStep()
|
||||
|
||||
abstract class GetBackupSecretForMigration : BootstrapStep()
|
||||
data class GetBackupSecretPassForMigration(val isPasswordVisible: Boolean, val useKey: Boolean) : GetBackupSecretForMigration()
|
||||
data class GetBackupSecretPassForMigration(val useKey: Boolean) : GetBackupSecretForMigration()
|
||||
object GetBackupSecretKeyForMigration : GetBackupSecretForMigration()
|
||||
|
||||
object Initializing : BootstrapStep()
|
||||
|
|
|
@ -32,7 +32,7 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.databinding.FragmentLoginBinding
|
||||
import io.reactivex.Observable
|
||||
|
@ -53,7 +53,6 @@ import javax.inject.Inject
|
|||
*/
|
||||
class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLoginBinding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
private var isSignupMode = false
|
||||
|
||||
// Temporary patch for https://github.com/vector-im/riotX-android/issues/1410,
|
||||
|
@ -69,7 +68,6 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog
|
|||
|
||||
setupSubmitButton()
|
||||
setupForgottenPasswordButton()
|
||||
setupPasswordReveal()
|
||||
|
||||
views.passwordField.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
|
@ -247,23 +245,6 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog
|
|||
loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnForgetPasswordClicked))
|
||||
}
|
||||
|
||||
private fun setupPasswordReveal() {
|
||||
passwordShown = false
|
||||
|
||||
views.passwordReveal.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
private fun renderPasswordField() {
|
||||
views.passwordField.showPassword(passwordShown)
|
||||
views.passwordReveal.render(passwordShown)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
loginViewModel.handle(LoginAction.ResetLogin)
|
||||
}
|
||||
|
@ -290,8 +271,7 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog
|
|||
when (state.asyncLoginAction) {
|
||||
is Loading -> {
|
||||
// Ensure password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
is Fail -> {
|
||||
val error = state.asyncLoginAction.error
|
||||
|
@ -317,8 +297,7 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog
|
|||
when (state.asyncRegistration) {
|
||||
is Loading -> {
|
||||
// Ensure password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
// Success is handled by the LoginActivity
|
||||
is Success -> Unit
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.isEmail
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.databinding.FragmentLoginResetPasswordBinding
|
||||
import io.reactivex.Observable
|
||||
|
@ -41,8 +41,6 @@ import javax.inject.Inject
|
|||
*/
|
||||
class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment<FragmentLoginResetPasswordBinding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
// Show warning only once
|
||||
private var showWarning = true
|
||||
|
||||
|
@ -54,7 +52,6 @@ class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment<F
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
setupSubmitButton()
|
||||
setupPasswordReveal()
|
||||
}
|
||||
|
||||
private fun setupUi(state: LoginViewState) {
|
||||
|
@ -112,23 +109,6 @@ class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment<F
|
|||
views.passwordFieldTil.error = null
|
||||
}
|
||||
|
||||
private fun setupPasswordReveal() {
|
||||
passwordShown = false
|
||||
|
||||
views.passwordReveal.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
private fun renderPasswordField() {
|
||||
views.passwordField.showPassword(passwordShown)
|
||||
views.passwordReveal.render(passwordShown)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
loginViewModel.handle(LoginAction.ResetResetPassword)
|
||||
}
|
||||
|
@ -139,8 +119,7 @@ class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment<F
|
|||
when (state.asyncResetPassword) {
|
||||
is Loading -> {
|
||||
// Ensure new password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
is Fail -> {
|
||||
views.resetPasswordEmailTil.error = errorFormatter.toHumanReadable(state.asyncResetPassword.error)
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.airbnb.mvrx.Fail
|
|||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.databinding.FragmentLoginSigninPassword2Binding
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
|
@ -47,8 +47,6 @@ class LoginFragmentSigninPassword2 @Inject constructor(
|
|||
private val avatarRenderer: AvatarRenderer
|
||||
) : AbstractSSOLoginFragment2<FragmentLoginSigninPassword2Binding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSigninPassword2Binding {
|
||||
return FragmentLoginSigninPassword2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
@ -58,7 +56,6 @@ class LoginFragmentSigninPassword2 @Inject constructor(
|
|||
|
||||
setupSubmitButton()
|
||||
setupForgottenPasswordButton()
|
||||
setupPasswordReveal()
|
||||
setupAutoFill()
|
||||
|
||||
views.passwordField.setOnEditorActionListener { _, actionId, _ ->
|
||||
|
@ -135,23 +132,6 @@ class LoginFragmentSigninPassword2 @Inject constructor(
|
|||
loginViewModel.handle(LoginAction2.PostViewEvent(LoginViewEvents2.OpenResetPasswordScreen))
|
||||
}
|
||||
|
||||
private fun setupPasswordReveal() {
|
||||
passwordShown = false
|
||||
|
||||
views.passwordReveal.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
private fun renderPasswordField() {
|
||||
views.passwordField.showPassword(passwordShown)
|
||||
views.passwordReveal.render(passwordShown)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
// loginViewModel.handle(LoginAction2.ResetSignin)
|
||||
}
|
||||
|
@ -169,8 +149,7 @@ class LoginFragmentSigninPassword2 @Inject constructor(
|
|||
|
||||
if (state.isLoading) {
|
||||
// Ensure password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import androidx.autofill.HintConstants
|
|||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.databinding.FragmentLoginSignupPassword2Binding
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import javax.inject.Inject
|
||||
|
@ -37,8 +37,6 @@ import javax.inject.Inject
|
|||
*/
|
||||
class LoginFragmentSignupPassword2 @Inject constructor() : AbstractLoginFragment2<FragmentLoginSignupPassword2Binding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSignupPassword2Binding {
|
||||
return FragmentLoginSignupPassword2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
@ -48,7 +46,6 @@ class LoginFragmentSignupPassword2 @Inject constructor() : AbstractLoginFragment
|
|||
|
||||
setupSubmitButton()
|
||||
setupAutoFill()
|
||||
setupPasswordReveal()
|
||||
|
||||
views.passwordField.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||
|
@ -97,23 +94,6 @@ class LoginFragmentSignupPassword2 @Inject constructor() : AbstractLoginFragment
|
|||
.disposeOnDestroyView()
|
||||
}
|
||||
|
||||
private fun setupPasswordReveal() {
|
||||
passwordShown = false
|
||||
|
||||
views.passwordReveal.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
private fun renderPasswordField() {
|
||||
views.passwordReveal.render(passwordShown)
|
||||
views.passwordField.showPassword(passwordShown)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
// loginViewModel.handle(LoginAction2.ResetSignup)
|
||||
}
|
||||
|
@ -127,8 +107,7 @@ class LoginFragmentSignupPassword2 @Inject constructor() : AbstractLoginFragment
|
|||
|
||||
if (state.isLoading) {
|
||||
// Ensure password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import androidx.core.view.isVisible
|
|||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.databinding.FragmentLoginSigninToAny2Binding
|
||||
import im.vector.app.features.login.LoginMode
|
||||
|
@ -48,8 +48,6 @@ import javax.inject.Inject
|
|||
*/
|
||||
class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<FragmentLoginSigninToAny2Binding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSigninToAny2Binding {
|
||||
return FragmentLoginSigninToAny2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
@ -59,7 +57,6 @@ class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<Frag
|
|||
|
||||
setupSubmitButton()
|
||||
setupForgottenPasswordButton()
|
||||
setupPasswordReveal()
|
||||
setupAutoFill()
|
||||
setupSocialLoginButtons()
|
||||
|
||||
|
@ -159,23 +156,6 @@ class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<Frag
|
|||
loginViewModel.handle(LoginAction2.PostViewEvent(LoginViewEvents2.OpenResetPasswordScreen))
|
||||
}
|
||||
|
||||
private fun setupPasswordReveal() {
|
||||
passwordShown = false
|
||||
|
||||
views.passwordReveal.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
private fun renderPasswordField() {
|
||||
views.passwordField.showPassword(passwordShown)
|
||||
views.passwordReveal.render(passwordShown)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
// loginViewModel.handle(LoginAction2.ResetSignin)
|
||||
}
|
||||
|
@ -208,8 +188,7 @@ class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<Frag
|
|||
|
||||
if (state.isLoading) {
|
||||
// Ensure password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,13 +28,12 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.isEmail
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.core.utils.autoResetTextInputLayoutErrors
|
||||
import im.vector.app.databinding.FragmentLoginResetPassword2Binding
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
|
@ -42,8 +41,6 @@ import javax.inject.Inject
|
|||
*/
|
||||
class LoginResetPasswordFragment2 @Inject constructor() : AbstractLoginFragment2<FragmentLoginResetPassword2Binding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
// Show warning only once
|
||||
private var showWarning = true
|
||||
|
||||
|
@ -55,7 +52,6 @@ class LoginResetPasswordFragment2 @Inject constructor() : AbstractLoginFragment2
|
|||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
setupSubmitButton()
|
||||
setupPasswordReveal()
|
||||
setupAutoFill()
|
||||
|
||||
autoResetTextInputLayoutErrors(listOf(views.resetPasswordEmailTil, views.passwordFieldTil))
|
||||
|
@ -148,23 +144,6 @@ class LoginResetPasswordFragment2 @Inject constructor() : AbstractLoginFragment2
|
|||
views.passwordFieldTil.error = null
|
||||
}
|
||||
|
||||
private fun setupPasswordReveal() {
|
||||
passwordShown = false
|
||||
|
||||
views.passwordReveal.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
renderPasswordField()
|
||||
}
|
||||
|
||||
private fun renderPasswordField() {
|
||||
views.passwordField.showPassword(passwordShown)
|
||||
views.passwordReveal.render(passwordShown)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
loginViewModel.handle(LoginAction2.ResetResetPassword)
|
||||
}
|
||||
|
@ -178,8 +157,7 @@ class LoginResetPasswordFragment2 @Inject constructor() : AbstractLoginFragment2
|
|||
|
||||
if (state.isLoading) {
|
||||
// Ensure new password is hidden
|
||||
passwordShown = false
|
||||
renderPasswordField()
|
||||
views.passwordField.hidePassword()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
import im.vector.app.R
|
||||
import im.vector.app.core.dialogs.GalleryOrCameraDialogHelper
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.hidePassword
|
||||
import im.vector.app.core.intent.getFilenameFromUri
|
||||
import im.vector.app.core.platform.SimpleTextWatcher
|
||||
import im.vector.app.core.preference.UserAvatarPreference
|
||||
|
@ -66,7 +66,7 @@ import javax.inject.Inject
|
|||
|
||||
class VectorSettingsGeneralFragment @Inject constructor(
|
||||
colorProvider: ColorProvider
|
||||
):
|
||||
) :
|
||||
VectorSettingsBaseFragment(),
|
||||
GalleryOrCameraDialogHelper.Listener {
|
||||
|
||||
|
@ -347,18 +347,6 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
|||
val view: ViewGroup = activity.layoutInflater.inflate(R.layout.dialog_change_password, null) as ViewGroup
|
||||
val views = DialogChangePasswordBinding.bind(view)
|
||||
|
||||
var passwordShown = false
|
||||
|
||||
views.changePasswordShowPasswords.setOnClickListener {
|
||||
passwordShown = !passwordShown
|
||||
|
||||
views.changePasswordOldPwdText.showPassword(passwordShown)
|
||||
views.changePasswordNewPwdText.showPassword(passwordShown)
|
||||
views.changePasswordConfirmNewPwdText.showPassword(passwordShown)
|
||||
|
||||
views.changePasswordShowPasswords.render(passwordShown)
|
||||
}
|
||||
|
||||
val dialog = MaterialAlertDialogBuilder(activity)
|
||||
.setView(view)
|
||||
.setCancelable(false)
|
||||
|
@ -377,13 +365,8 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
|||
fun updateUi() {
|
||||
val oldPwd = views.changePasswordOldPwdText.text.toString()
|
||||
val newPwd = views.changePasswordNewPwdText.text.toString()
|
||||
val newConfirmPwd = views.changePasswordConfirmNewPwdText.text.toString()
|
||||
|
||||
updateButton.isEnabled = oldPwd.isNotEmpty() && newPwd.isNotEmpty() && newPwd == newConfirmPwd
|
||||
|
||||
if (newPwd.isNotEmpty() && newConfirmPwd.isNotEmpty() && newPwd != newConfirmPwd) {
|
||||
views.changePasswordConfirmNewPwdTil.error = getString(R.string.passwords_do_not_match)
|
||||
}
|
||||
updateButton.isEnabled = oldPwd.isNotEmpty() && newPwd.isNotEmpty()
|
||||
}
|
||||
|
||||
views.changePasswordOldPwdText.addTextChangedListener(object : SimpleTextWatcher() {
|
||||
|
@ -395,32 +378,20 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
|||
|
||||
views.changePasswordNewPwdText.addTextChangedListener(object : SimpleTextWatcher() {
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
views.changePasswordConfirmNewPwdTil.error = null
|
||||
updateUi()
|
||||
}
|
||||
})
|
||||
|
||||
views.changePasswordConfirmNewPwdText.addTextChangedListener(object : SimpleTextWatcher() {
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
views.changePasswordConfirmNewPwdTil.error = null
|
||||
updateUi()
|
||||
}
|
||||
})
|
||||
|
||||
fun showPasswordLoadingView(toShow: Boolean) {
|
||||
if (toShow) {
|
||||
views.changePasswordShowPasswords.isEnabled = false
|
||||
views.changePasswordOldPwdText.isEnabled = false
|
||||
views.changePasswordNewPwdText.isEnabled = false
|
||||
views.changePasswordConfirmNewPwdText.isEnabled = false
|
||||
views.changePasswordLoader.isVisible = true
|
||||
updateButton.isEnabled = false
|
||||
cancelButton.isEnabled = false
|
||||
} else {
|
||||
views.changePasswordShowPasswords.isEnabled = true
|
||||
views.changePasswordOldPwdText.isEnabled = true
|
||||
views.changePasswordNewPwdText.isEnabled = true
|
||||
views.changePasswordConfirmNewPwdText.isEnabled = true
|
||||
views.changePasswordLoader.isVisible = false
|
||||
updateButton.isEnabled = true
|
||||
cancelButton.isEnabled = true
|
||||
|
@ -428,10 +399,9 @@ class VectorSettingsGeneralFragment @Inject constructor(
|
|||
}
|
||||
|
||||
updateButton.setOnClickListener {
|
||||
if (passwordShown) {
|
||||
// Hide passwords during processing
|
||||
views.changePasswordShowPasswords.performClick()
|
||||
}
|
||||
// Hide passwords during processing
|
||||
views.changePasswordOldPwdText.hidePassword()
|
||||
views.changePasswordNewPwdText.hidePassword()
|
||||
|
||||
view.hideKeyboard()
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ import im.vector.app.core.di.ActiveSessionHolder
|
|||
import im.vector.app.core.dialogs.ExportKeysDialog
|
||||
import im.vector.app.core.extensions.queryExportKeys
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.intent.ExternalIntentData
|
||||
import im.vector.app.core.intent.analyseIntent
|
||||
import im.vector.app.core.intent.getFilenameFromUri
|
||||
|
@ -451,14 +450,6 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
|||
.setTitle(R.string.encryption_import_room_keys)
|
||||
.setView(dialogLayout)
|
||||
|
||||
var passwordVisible = false
|
||||
|
||||
views.importDialogShowPassword.setOnClickListener {
|
||||
passwordVisible = !passwordVisible
|
||||
views.dialogE2eKeysPassphraseEditText.showPassword(passwordVisible)
|
||||
views.importDialogShowPassword.render(passwordVisible)
|
||||
}
|
||||
|
||||
views.dialogE2eKeysPassphraseEditText.addTextChangedListener(object : SimpleTextWatcher() {
|
||||
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
views.dialogE2eKeysImportButton.isEnabled = !views.dialogE2eKeysPassphraseEditText.text.isNullOrEmpty()
|
||||
|
|
|
@ -19,7 +19,6 @@ package im.vector.app.features.settings.account.deactivation
|
|||
import im.vector.app.core.platform.VectorViewModelAction
|
||||
|
||||
sealed class DeactivateAccountAction : VectorViewModelAction {
|
||||
object TogglePassword : DeactivateAccountAction()
|
||||
data class DeactivateAccount(val eraseAllData: Boolean) : DeactivateAccountAction()
|
||||
|
||||
object SsoAuthDone: DeactivateAccountAction()
|
||||
|
|
|
@ -41,7 +41,7 @@ import kotlin.coroutines.resume
|
|||
import kotlin.coroutines.resumeWithException
|
||||
|
||||
data class DeactivateAccountViewState(
|
||||
val passwordShown: Boolean = false
|
||||
val dummy: Boolean = false
|
||||
) : MvRxState
|
||||
|
||||
class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private val initialState: DeactivateAccountViewState,
|
||||
|
@ -58,7 +58,6 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v
|
|||
|
||||
override fun handle(action: DeactivateAccountAction) {
|
||||
when (action) {
|
||||
DeactivateAccountAction.TogglePassword -> handleTogglePassword()
|
||||
is DeactivateAccountAction.DeactivateAccount -> handleDeactivateAccount(action)
|
||||
DeactivateAccountAction.SsoAuthDone -> {
|
||||
Timber.d("## UIA - FallBack success")
|
||||
|
@ -87,12 +86,6 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v
|
|||
}.exhaustive
|
||||
}
|
||||
|
||||
private fun handleTogglePassword() = withState {
|
||||
setState {
|
||||
copy(passwordShown = !passwordShown)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleDeactivateAccount(action: DeactivateAccountAction.DeactivateAccount) {
|
||||
_viewEvents.post(DeactivateAccountViewEvents.Loading())
|
||||
|
||||
|
|
|
@ -72,12 +72,6 @@ class ThreePidsSettingsFragment @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
// private fun askUserPassword() {
|
||||
// PromptPasswordDialog().show(requireActivity()) { password ->
|
||||
// viewModel.handle(ThreePidsSettingsAction.AccountPassword(password))
|
||||
// }
|
||||
// }
|
||||
|
||||
private fun askAuthentication(event: ThreePidsSettingsViewEvents.RequestReAuth) {
|
||||
ReAuthActivity.newIntent(requireContext(),
|
||||
event.registrationFlowResponse,
|
||||
|
|
|
@ -25,7 +25,6 @@ sealed class SoftLogoutAction : VectorViewModelAction {
|
|||
|
||||
// For password entering management
|
||||
data class PasswordChanged(val password: String) : SoftLogoutAction()
|
||||
object TogglePassword : SoftLogoutAction()
|
||||
data class SignInAgain(val password: String) : SoftLogoutAction()
|
||||
|
||||
// For signing again with SSO
|
||||
|
|
|
@ -114,11 +114,9 @@ class SoftLogoutController @Inject constructor(
|
|||
id("passwordForm")
|
||||
stringProvider(host.stringProvider)
|
||||
passwordValue(state.enteredPassword)
|
||||
passwordShown(state.passwordShown)
|
||||
submitEnabled(state.enteredPassword.isNotEmpty())
|
||||
onPasswordEdited { host.listener?.passwordEdited(it) }
|
||||
errorText((state.asyncLoginAction as? Fail)?.error?.let { host.errorFormatter.toHumanReadable(it) })
|
||||
passwordRevealClickListener { host.listener?.revealPasswordClicked() }
|
||||
forgetPasswordClickListener { host.listener?.forgetPasswordClicked() }
|
||||
submitClickListener { host.listener?.submit() }
|
||||
}
|
||||
|
@ -169,6 +167,5 @@ class SoftLogoutController @Inject constructor(
|
|||
fun signinFallbackSubmit()
|
||||
fun clearData()
|
||||
fun forgetPasswordClicked()
|
||||
fun revealPasswordClicked()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,10 +147,6 @@ class SoftLogoutFragment @Inject constructor(
|
|||
loginViewModel.handle(LoginAction.PostViewEvent(LoginViewEvents.OnForgetPasswordClicked))
|
||||
}
|
||||
|
||||
override fun revealPasswordClicked() {
|
||||
softLogoutViewModel.handle(SoftLogoutAction.TogglePassword)
|
||||
}
|
||||
|
||||
override fun resetViewModel() {
|
||||
// No op
|
||||
}
|
||||
|
|
|
@ -122,7 +122,6 @@ class SoftLogoutViewModel @AssistedInject constructor(
|
|||
when (action) {
|
||||
is SoftLogoutAction.RetryLoginFlow -> getSupportedLoginFlow()
|
||||
is SoftLogoutAction.PasswordChanged -> handlePasswordChange(action)
|
||||
is SoftLogoutAction.TogglePassword -> handleTogglePassword()
|
||||
is SoftLogoutAction.SignInAgain -> handleSignInAgain(action)
|
||||
is SoftLogoutAction.WebLoginSuccess -> handleWebLoginSuccess(action)
|
||||
is SoftLogoutAction.ClearData -> handleClearData()
|
||||
|
@ -143,16 +142,6 @@ class SoftLogoutViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun handleTogglePassword() {
|
||||
withState {
|
||||
setState {
|
||||
copy(
|
||||
passwordShown = !this.passwordShown
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWebLoginSuccess(action: SoftLogoutAction.WebLoginSuccess) {
|
||||
// User may have been connected with SSO with another userId
|
||||
// We have to check this
|
||||
|
@ -188,9 +177,7 @@ class SoftLogoutViewModel @AssistedInject constructor(
|
|||
private fun handleSignInAgain(action: SoftLogoutAction.SignInAgain) {
|
||||
setState {
|
||||
copy(
|
||||
asyncLoginAction = Loading(),
|
||||
// Ensure password is hidden
|
||||
passwordShown = false
|
||||
asyncLoginAction = Loading()
|
||||
)
|
||||
}
|
||||
viewModelScope.launch {
|
||||
|
|
|
@ -31,7 +31,6 @@ data class SoftLogoutViewState(
|
|||
val deviceId: String,
|
||||
val userDisplayName: String,
|
||||
val hasUnsavedKeys: Boolean,
|
||||
val passwordShown: Boolean = false,
|
||||
val enteredPassword: String = ""
|
||||
) : MvRxState {
|
||||
|
||||
|
|
|
@ -32,20 +32,16 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
|
|||
import im.vector.app.core.epoxy.addTextChangedListenerOnce
|
||||
import im.vector.app.core.epoxy.onClick
|
||||
import im.vector.app.core.epoxy.setValueOnce
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.platform.SimpleTextWatcher
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
|
||||
@EpoxyModelClass(layout = R.layout.item_login_password_form)
|
||||
abstract class LoginPasswordFormItem : VectorEpoxyModel<LoginPasswordFormItem.Holder>() {
|
||||
|
||||
@EpoxyAttribute var passwordValue: String = ""
|
||||
@EpoxyAttribute var passwordShown: Boolean = false
|
||||
@EpoxyAttribute var submitEnabled: Boolean = false
|
||||
@EpoxyAttribute var errorText: String? = null
|
||||
@EpoxyAttribute lateinit var stringProvider: StringProvider
|
||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var passwordRevealClickListener: ClickListener? = null
|
||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var forgetPasswordClickListener: ClickListener? = null
|
||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var submitClickListener: ClickListener? = null
|
||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var onPasswordEdited: TextListener? = null
|
||||
|
@ -61,8 +57,6 @@ abstract class LoginPasswordFormItem : VectorEpoxyModel<LoginPasswordFormItem.Ho
|
|||
|
||||
setupAutoFill(holder)
|
||||
holder.passwordFieldTil.error = errorText
|
||||
renderPasswordField(holder)
|
||||
holder.passwordReveal.onClick(passwordRevealClickListener)
|
||||
holder.forgetPassword.onClick(forgetPasswordClickListener)
|
||||
holder.submit.isEnabled = submitEnabled
|
||||
holder.submit.onClick(submitClickListener)
|
||||
|
@ -81,15 +75,9 @@ abstract class LoginPasswordFormItem : VectorEpoxyModel<LoginPasswordFormItem.Ho
|
|||
}
|
||||
}
|
||||
|
||||
private fun renderPasswordField(holder: Holder) {
|
||||
holder.passwordField.showPassword(passwordShown)
|
||||
holder.passwordReveal.render(passwordShown)
|
||||
}
|
||||
|
||||
class Holder : VectorEpoxyHolder() {
|
||||
val passwordField by bind<TextInputEditText>(R.id.itemLoginPasswordFormPasswordField)
|
||||
val passwordFieldTil by bind<TextInputLayout>(R.id.itemLoginPasswordFormPasswordFieldTil)
|
||||
val passwordReveal by bind<RevealPasswordImageView>(R.id.itemLoginPasswordFormPasswordReveal)
|
||||
val forgetPassword by bind<Button>(R.id.itemLoginPasswordFormForgetPasswordButton)
|
||||
val submit by bind<Button>(R.id.itemLoginPasswordFormSubmit)
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="25dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="25"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M22.7361,9.9197C23.6693,11.1729 23.6895,12.8384 22.7728,14.1036C21.0553,16.4739 17.6416,20 12.5317,20C7.4217,20 4.008,16.4739 2.2906,14.1036C1.3738,12.8384 1.394,11.1729 2.3273,9.9197C4.0926,7.5494 7.5651,4 12.5317,4C17.4982,4 20.9708,7.5494 22.7361,9.9197ZM17.8334,12C17.8334,14.9455 15.4456,17.3333 12.5001,17.3333C9.5546,17.3333 7.1668,14.9455 7.1668,12C7.1668,9.0545 9.5546,6.6667 12.5001,6.6667C15.4456,6.6667 17.8334,9.0545 17.8334,12ZM12.5001,14.6667C13.9729,14.6667 15.1668,13.4728 15.1668,12C15.1668,10.5272 13.9729,9.3333 12.5001,9.3333C11.0274,9.3333 9.8335,10.5272 9.8335,12C9.8335,13.4728 11.0274,14.6667 12.5001,14.6667Z"
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
|
@ -1,7 +0,0 @@
|
|||
<vector android:autoMirrored="true" android:height="24dp"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff" android:fillType="evenOdd" android:pathData="M5.4447,6.2731C3.8736,7.4199 2.6604,8.8011 1.8273,9.9197C0.894,11.1729 0.8738,12.8384 1.7906,14.1036C3.508,16.4739 6.9217,20 12.0317,20C14.2012,20 16.065,19.3644 17.623,18.4514L15.3344,16.1628C14.4212,16.8952 13.2618,17.3333 12.0002,17.3333C9.0546,17.3333 6.6668,14.9455 6.6668,12C6.6668,10.7383 7.1049,9.5789 7.8373,8.6657L5.4447,6.2731ZM17.3119,12.4834C17.3262,12.3242 17.3335,12.163 17.3335,12C17.3335,9.0545 14.9457,6.6667 12.0002,6.6667C11.8372,6.6667 11.6759,6.674 11.5167,6.6883L9.2201,4.3917C10.0958,4.1434 11.0336,4 12.0317,4C16.9982,4 20.4708,7.5494 22.2361,9.9197C23.1693,11.1729 23.1895,12.8384 22.2728,14.1036C21.8639,14.6678 21.359,15.2975 20.758,15.9296L17.3119,12.4834ZM9.7461,10.5745C9.4848,10.9868 9.3335,11.4757 9.3335,12C9.3335,13.4728 10.5274,14.6667 12.0002,14.6667C12.5244,14.6667 13.0133,14.5154 13.4257,14.2541L9.7461,10.5745Z"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M1,1L23,23"
|
||||
android:strokeColor="#ffffff" android:strokeLineCap="round" android:strokeWidth="2"/>
|
||||
</vector>
|
|
@ -9,33 +9,19 @@
|
|||
android:paddingTop="12dp"
|
||||
android:paddingEnd="?dialogPreferredPadding">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/Base.DialogWindowTitle.AppCompat"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/settings_change_password" />
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/change_password_show_passwords"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
style="@style/Base.DialogWindowTitle.AppCompat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/settings_change_password" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/change_password_old_pwd_til"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_vertical_margin"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
|
@ -48,6 +34,7 @@
|
|||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
|
@ -62,22 +49,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/change_password_confirm_new_pwd_til"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/change_password_confirm_new_pwd_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/settings_confirm_password"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/change_password_loader"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -19,27 +19,12 @@
|
|||
android:textColor="?vctr_content_primary"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/exportDialogShowPassword"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/exportDialogTil"
|
||||
app:layout_constraintTop_toTopOf="@id/exportDialogTil"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/exportDialogTil"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/exportDialogShowPassword"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/exportDialogText">
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/exportDialogEt"
|
||||
|
@ -53,13 +38,11 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/exportDialogTilConfirm"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toEndOf="@+id/exportDialogTil"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/exportDialogTil">
|
||||
app:errorEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/exportDialogEtConfirm"
|
||||
|
@ -81,4 +64,4 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/exportDialogTilConfirm" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
|
@ -1,10 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="?dialogPreferredPadding"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="?dialogPreferredPadding"
|
||||
|
@ -19,14 +20,13 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:textColor="?vctr_content_primary"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/import_e2e_keys_from_file"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/importDialogTil"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toStartOf="@+id/importDialogShowPassword"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -41,18 +41,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/importDialogShowPassword"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/importDialogTil"
|
||||
app:layout_constraintTop_toTopOf="@id/importDialogTil"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/dialog_e2e_keys_import_button"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -60,8 +48,6 @@
|
|||
android:layout_gravity="end"
|
||||
android:layout_marginTop="10dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/encryption_import_import"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/importDialogTil" />
|
||||
android:text="@string/encryption_import_import" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="?dialogPreferredPadding"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="?dialogPreferredPadding">
|
||||
|
||||
<TextView
|
||||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/devices_delete_dialog_text" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/promptPasswordTil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/soft_logout_signin_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/promptPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry"
|
||||
tools:text="abc" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/promptPasswordPasswordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
|
@ -20,12 +20,13 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/bootstrapAccountPasswordTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bootstrapPasswordButton"
|
||||
app:layout_constraintEnd_toStartOf="@id/ssss_view_show_password"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bootstrapDescriptionText">
|
||||
|
||||
|
@ -36,26 +37,10 @@
|
|||
android:imeOptions="actionDone"
|
||||
android:maxLines="3"
|
||||
android:singleLine="false"
|
||||
tools:hint="@string/passphrase_enter_passphrase"
|
||||
tools:inputType="textPassword" />
|
||||
tools:hint="@string/passphrase_enter_passphrase" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ssss_view_show_password"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:contentDescription="@string/a11y_show_password"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_eye"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/bootstrapAccountPasswordTil"
|
||||
app:layout_constraintTop_toTopOf="@+id/bootstrapAccountPasswordTil"
|
||||
app:tint="?colorSecondary"
|
||||
tools:ignore="MissingPrefix" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bootstrapPasswordButton"
|
||||
style="@style/Widget.Vector.Button.Text"
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/ssss_passphrase_enter_til"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/ssss_view_show_password"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bootstrapDescriptionText">
|
||||
|
||||
|
@ -34,8 +35,7 @@
|
|||
android:imeOptions="actionDone"
|
||||
android:maxLines="3"
|
||||
android:singleLine="false"
|
||||
tools:hint="@string/passphrase_enter_passphrase"
|
||||
tools:inputType="textPassword" />
|
||||
tools:hint="@string/passphrase_enter_passphrase" />
|
||||
|
||||
<!-- This is inside the TIL, if not the keyboard will hide it when in bottomsheet -->
|
||||
|
||||
|
@ -62,18 +62,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/ssss_view_show_password"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ssss_passphrase_enter_til"
|
||||
app:layout_constraintTop_toTopOf="@+id/ssss_passphrase_enter_til"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bootstrapSubmit"
|
||||
style="@style/Widget.Vector.Button.Text"
|
||||
|
|
|
@ -20,12 +20,13 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/bootstrapRecoveryKeyEnterTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/bootstrapMigrateShowPassword"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bootstrapDescriptionText">
|
||||
|
||||
|
@ -36,8 +37,7 @@
|
|||
android:imeOptions="actionDone"
|
||||
android:maxLines="3"
|
||||
android:singleLine="false"
|
||||
tools:hint="@string/keys_backup_restore_key_enter_hint"
|
||||
tools:inputType="textPassword" />
|
||||
tools:hint="@string/keys_backup_restore_key_enter_hint" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bootstrapMigrateUseFile"
|
||||
|
@ -60,18 +60,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/bootstrapMigrateShowPassword"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/bootstrapRecoveryKeyEnterTil"
|
||||
app:layout_constraintTop_toTopOf="@+id/bootstrapRecoveryKeyEnterTil"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bootstrapMigrateContinueButton"
|
||||
style="@style/Widget.Vector.Button.Text"
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
android:id="@+id/keys_backup_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:colorBackground">
|
||||
android:background="?android:colorBackground"
|
||||
android:paddingStart="@dimen/layout_horizontal_margin"
|
||||
android:paddingEnd="@dimen/layout_horizontal_margin">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -29,7 +31,7 @@
|
|||
style="@style/Widget.Vector.TextView.Subtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/keys_backup_restore_with_passphrase"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?vctr_content_primary"
|
||||
|
@ -40,12 +42,12 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/keys_backup_passphrase_enter_til"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/keys_backup_view_show_password"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/keys_backup_restore_with_passphrase">
|
||||
|
||||
|
@ -55,29 +57,16 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:hint="@string/passphrase_enter_passphrase"
|
||||
android:maxLines="3"
|
||||
android:singleLine="false"
|
||||
tools:inputType="textPassword" />
|
||||
android:singleLine="false" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/keys_backup_view_show_password"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/keys_backup_passphrase_enter_til"
|
||||
app:layout_constraintTop_toTopOf="@+id/keys_backup_passphrase_enter_til"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helperTextWithLink"
|
||||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?vctr_content_secondary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -90,7 +79,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_vertical_margin_big"
|
||||
android:layout_marginEnd="@dimen/layout_horizontal_margin"
|
||||
android:layout_marginBottom="@dimen/layout_vertical_margin_big"
|
||||
android:minWidth="200dp"
|
||||
android:text="@string/keys_backup_unlock_button"
|
||||
|
|
|
@ -11,17 +11,16 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/keys_backup_setup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/layout_horizontal_margin"
|
||||
android:paddingEnd="@dimen/layout_horizontal_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/keys_backup_setup_step2_text_title"
|
||||
style="@style/Widget.Vector.TextView.HeadlineMedium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/keys_backup_setup_step2_text_title"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?vctr_content_primary"
|
||||
|
@ -35,10 +34,7 @@
|
|||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/keys_backup_setup_step2_text_description"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?vctr_content_secondary"
|
||||
|
@ -48,12 +44,12 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/keys_backup_setup_step2_passphrase_enter_til"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/keys_backup_setup_step2_show_password"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/keys_backup_setup_step2_text_description">
|
||||
|
||||
|
@ -66,18 +62,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/keys_backup_setup_step2_show_password"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/keys_backup_setup_step2_passphrase_enter_til"
|
||||
app:layout_constraintTop_toTopOf="@id/keys_backup_setup_step2_passphrase_enter_til"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
<im.vector.app.core.ui.views.PasswordStrengthBar
|
||||
android:id="@+id/keys_backup_setup_step2_passphrase_strength_level"
|
||||
android:layout_width="0dp"
|
||||
|
@ -86,16 +70,14 @@
|
|||
app:layout_constraintStart_toStartOf="@id/keys_backup_setup_step2_passphrase_enter_til"
|
||||
app:layout_constraintTop_toBottomOf="@id/keys_backup_setup_step2_passphrase_enter_til" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/keys_backup_setup_step2_passphrase_confirm_til"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="4dp"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/keys_backup_setup_step2_show_password"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/keys_backup_setup_step2_passphrase_strength_level">
|
||||
|
||||
|
@ -113,7 +95,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/keys_backup_setup_step2_button_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/keys_backup_setup_step2_passphrase_confirm_til" />
|
||||
|
@ -123,9 +104,7 @@
|
|||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/keys_backup_setup_step1_recovery_key_alternative"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?vctr_content_primary"
|
||||
|
@ -136,8 +115,6 @@
|
|||
style="@style/Widget.Vector.Button.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="@dimen/layout_vertical_margin"
|
||||
android:maxWidth="@dimen/button_max_width"
|
||||
android:text="@string/keys_backup_setup_step2_skip_button_title"
|
||||
|
|
|
@ -60,44 +60,28 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loginPasswordNotice"
|
||||
|
|
|
@ -49,43 +49,29 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/login_reset_password_password_hint"
|
||||
app:endIconContentDescription=""
|
||||
app:endIconMode="password_toggle"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_reset_password_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/resetPasswordSubmit"
|
||||
|
|
|
@ -68,44 +68,28 @@
|
|||
android:text="@string/login_choose_a_new_password"
|
||||
android:textColor="?vctr_content_primary" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/login_reset_password_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_reset_password_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/resetPasswordSubmit"
|
||||
|
|
|
@ -52,44 +52,28 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -41,44 +41,28 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -58,44 +58,28 @@
|
|||
android:text="@string/login_choose_a_password"
|
||||
android:textColor="?vctr_content_primary" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp">
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/loginSubmit"
|
||||
|
|
|
@ -24,45 +24,29 @@
|
|||
app:layout_constraintVertical_bias="0"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/passwordContainer"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null"
|
||||
app:layout_constraintTop_toBottomOf="@id/reAuthConfirmText">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/passwordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/login_signup_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/passwordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/passwordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/loginPasswordNotice"-->
|
||||
|
@ -88,7 +72,7 @@
|
|||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/passwordContainer"
|
||||
app:layout_constraintTop_toBottomOf="@id/passwordFieldTil"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
android:id="@+id/ssss_shield"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginStart="@dimen/layout_horizontal_margin"
|
||||
android:importantForAccessibility="no"
|
||||
android:src="@drawable/ic_security_phrase_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ssss_restore_with_passphrase"
|
||||
|
@ -53,12 +53,14 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/ssss_passphrase_enter_til"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginStart="@dimen/layout_horizontal_margin"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="@dimen/layout_horizontal_margin"
|
||||
app:errorEnabled="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/ssss_view_show_password"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ssss_restore_with_passphrase_warning_text">
|
||||
|
||||
|
@ -74,18 +76,6 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/ssss_view_show_password"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="@dimen/layout_horizontal_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/ssss_passphrase_enter_til"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/ssss_passphrase_submit"
|
||||
style="@style/Widget.Vector.Button.Text"
|
||||
|
|
|
@ -9,41 +9,26 @@
|
|||
android:paddingStart="36dp"
|
||||
android:paddingEnd="36dp">
|
||||
|
||||
<FrameLayout
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/itemLoginPasswordFormPasswordFieldTil"
|
||||
style="@style/Widget.Vector.TextInputLayout.Password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/soft_logout_signin_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/itemLoginPasswordFormPasswordFieldTil"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/itemLoginPasswordFormPasswordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/soft_logout_signin_password_hint"
|
||||
app:errorEnabled="true"
|
||||
app:errorIconDrawable="@null">
|
||||
android:ems="10"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/itemLoginPasswordFormPasswordField"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="48dp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<im.vector.app.core.ui.views.RevealPasswordImageView
|
||||
android:id="@+id/itemLoginPasswordFormPasswordReveal"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
app:tint="?colorSecondary" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue