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

Change password to passphrase

parent 8701e5fd
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class PasswordFragment :
private fun setupViews() {
with(binding) {
btnLogin.apply {
setText(getString(if (isSignupMode()) R.string.set_password else R.string.log_in))
setText(getString(if (isSignupMode()) R.string.set_passphrase else R.string.log_in))
setOnClickListener {
startLoading(btnLogin)
viewModel.processPasswordStage(
......@@ -55,6 +55,8 @@ class PasswordFragment :
)
}
}
tvPasswordTitle.text =
getString(if (isSignupMode()) R.string.choose_a_passphrase else R.string.enter_your_passphrase)
tilPassword.editText?.apply {
doAfterTextChanged {
if (isSignupMode()) vPasswordStrength.calculateStrength(tilPassword.getText())
......
......@@ -36,7 +36,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:text="@string/enter_your_password"
app:layout_constraintBottom_toTopOf="@id/tilPassword"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -48,7 +47,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="@string/password"
android:hint="@string/passphrase"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvPasswordTitle"
......@@ -79,7 +78,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:hint="@string/repeat_password"
android:hint="@string/repeat_passphrase"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -9,7 +9,7 @@
<string name="session_sync">Session sync</string>
<string name="unsupported_login_method">Unsupported login method</string>
<string name="discard_current_auth_progress">Discard current auth progress?</string>
<string name="set_password">Set password</string>
<string name="set_passphrase">Set passphrase</string>
<string name="log_in">Log In</string>
<string name="wrong_signup_config">Wrong signup config!</string>
<string name="sign_up">Sign Up</string>
......@@ -50,9 +50,9 @@
<string name="user_id_separator">:</string>
<string name="not_a_member">Not a member?</string>
<string name="resume_session">Resume session:</string>
<string name="enter_your_password">Enter your password</string>
<string name="password">Password</string>
<string name="repeat_password">Repeat password</string>
<string name="choose_a_passphrase">Choose a passphrase</string>
<string name="enter_your_passphrase">Enter your passphrase</string>
<string name="repeat_passphrase">Repeat passphrase</string>
<string name="server">Server</string>
<string name="sign_up_with_subscription">Sign up with subscription</string>
<string name="sign_up_for_free">Sign up for free</string>
......
......@@ -46,7 +46,7 @@
<string name="describe_your_problem_here">Describe your problem here</string>
<string name="save">Save</string>
<string name="select_items_from_list_below">Select items from list below</string>
<string name="password_changed">Password changed</string>
<string name="passphrase_changed">Passphrase changed</string>
<string name="email_added">Email added</string>
<string name="remove">Remove</string>
<string name="choose_gallery">Choose gallery</string>
......
......@@ -55,7 +55,7 @@ class ChangePasswordDialogFragment :
private fun setupObservers() {
viewModel.responseLiveData.observeResponse(this,
success = {
showSuccess(getString(org.futo.circles.core.R.string.password_changed))
showSuccess(getString(org.futo.circles.core.R.string.passphrase_changed))
onBackPressed()
},
error = { message ->
......
......@@ -73,7 +73,7 @@ class SettingsFragment :
}
}
tvSwitchUser.setOnClickListener { withConfirmation(SwitchUser()) { (activity as? SessionHolderActivity)?.stopSyncAndRestart() } }
tvChangePassword.setOnClickListener {
tvChangePassphrase.setOnClickListener {
if (showNoInternetConnection()) return@setOnClickListener
viewModel.handleChangePasswordFlow()
}
......@@ -121,7 +121,7 @@ class SettingsFragment :
onRequestInvoked = { loadingDialog.dismiss() }
)
viewModel.changePasswordResponseLiveData.observeResponse(this,
success = { showSuccess(getString(org.futo.circles.core.R.string.password_changed)) },
success = { showSuccess(getString(org.futo.circles.core.R.string.passphrase_changed)) },
error = { message -> showError(message) },
onRequestInvoked = { loadingDialog.dismiss() }
)
......
......@@ -112,11 +112,11 @@
<org.futo.circles.core.view.SettingsMenuItemView
android:id="@+id/tvChangePassword"
android:id="@+id/tvChangePassphrase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:optionIcon="@drawable/ic_lock"
app:optionName="@string/change_password" />
app:optionName="@string/change_passphrase" />
<org.futo.circles.core.view.SettingsMenuItemView
android:id="@+id/tvAddEmail"
......
......@@ -2,6 +2,7 @@
<resources>
<string name="shared_circles_space_not_found">Shared Circles space not found</string>
<string name="active_login_sessions">Active login sessions</string>
<string name="change_passphrase">Change passphrase</string>
<string name="change_password">Change password</string>
<string name="new_password">New password</string>
<string name="old_password">Old Password</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