Skip to content
Snippets Groups Projects
Commit a16bb8e7 authored by Taras's avatar Taras
Browse files

Add forgot password confirmation

parent 4963de0a
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ import org.futo.circles.auth.R
import org.futo.circles.auth.databinding.FragmentLogInBinding
import org.futo.circles.auth.feature.log_in.switch_user.list.SwitchUsersAdapter
import org.futo.circles.auth.feature.log_in.switch_user.list.SwitchUsersViewHolder
import org.futo.circles.auth.model.ForgotPassword
import org.futo.circles.auth.model.RemoveUser
import org.futo.circles.core.base.CirclesAppConfig
import org.futo.circles.core.base.NetworkObserver
......@@ -119,7 +120,9 @@ class LogInFragment : Fragment(R.layout.fragment_log_in), HasLoadingState {
findNavController().navigateSafe(LogInFragmentDirections.toSignUpFragment())
}
btnLogin.setOnClickListener { startLogin(false) }
btnForgotPassword.setOnClickListener { startLogin(true) }
btnForgotPassword.setOnClickListener {
withConfirmation(ForgotPassword()) { startLogin(true) }
}
}
}
......
......@@ -24,11 +24,17 @@ data class LogOut(
data class RemoveSession(
override val titleRes: Int = R.string.remove_session,
override val messageRes: Int = R.string.remove_session_message,
override val positiveButtonRes: Int = org.futo.circles.core.R.string.remove
override val positiveButtonRes: Int = org.futo.circles.core.R.string.remove
) : ConfirmationType(titleRes, messageRes, positiveButtonRes)
data class ResetKeys(
override val titleRes: Int = R.string.reset_keys,
override val messageRes: Int = R.string.reset_keys_message,
override val positiveButtonRes: Int = R.string.confirm
) : ConfirmationType(titleRes, messageRes, positiveButtonRes)
data class ForgotPassword(
override val titleRes: Int = R.string.forgot_password,
override val messageRes: Int = R.string.forgot_password_message,
override val positiveButtonRes: Int = R.string.confirm
) : ConfirmationType(titleRes, messageRes, positiveButtonRes)
\ No newline at end of file
......@@ -104,6 +104,7 @@
<string name="remove_session_message">In order to sign out from this session you should confirm your auth.</string>
<string name="reset_keys">Reset keys</string>
<string name="reset_keys_message">Confirm auth to reset keys and enable cross signing</string>
<string name="forgot_password_message">After verifying your email the new password and key backup will be set.\n\nWarning: With a new key backup you will not be able to see all your previous encrypted messages, this action can not be undone.</string>
<string name="confirm">Confirm</string>
<string name="failed_to_read_qr_code">Failed to read QR code</string>
<string name="current_session">Current session</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment