mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Improve password reset flow, normalize translations
This commit is contained in:
parent
cee9692b35
commit
f2739b79fb
22 changed files with 58 additions and 69 deletions
|
@ -101,7 +101,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@apply px-3 py-2 rounded-lg text-sm font-medium cursor-pointer;
|
@apply px-3 py-2 rounded-lg text-sm font-medium cursor-pointer focus:outline-gray-500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn--primary {
|
.btn--primary {
|
||||||
|
|
|
@ -16,7 +16,7 @@ class PasswordResetsController < ApplicationController
|
||||||
).password_reset.deliver_later
|
).password_reset.deliver_later
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to root_path, notice: t(".requested")
|
redirect_to new_password_reset_path(step: "pending")
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: ENV["EMAIL_SENDER"] if ENV["EMAIL_SENDER"].present?
|
default from: email_address_with_name(ENV.fetch("EMAIL_SENDER", "sender@maybe.local"), "Maybe Finance")
|
||||||
layout "mailer"
|
layout "mailer"
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,17 +3,8 @@
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<%= styled_form_with model: @user, url: password_reset_path(token: params[:token]), method: :patch, class: "space-y-4" do |form| %>
|
<%= styled_form_with model: @user, url: password_reset_path(token: params[:token]), method: :patch, class: "space-y-4" do |form| %>
|
||||||
<div class="relative border border-gray-100 bg-gray-25 rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
|
<%= form.password_field :password, required: true, label: true %>
|
||||||
<%= form.label :password, class: "p-4 pb-0 block text-sm font-medium text-gray-700" %>
|
<%= form.password_field :password_confirmation, required: true, label: true %>
|
||||||
<%= form.password_field :password, required: "required", class: "p-4 pt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100 w-full" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="relative border border-gray-100 bg-gray-25 rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
|
<%= form.submit %>
|
||||||
<%= form.label :password_confirmation, class: "p-4 pb-0 block text-sm font-medium text-gray-700" %>
|
|
||||||
<%= form.password_field :password_confirmation, required: "required", class: "p-4 pt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100 w-full" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<%= form.submit t(".submit"), class: "flex justify-center w-full px-4 py-3 text-sm font-medium text-white bg-black rounded-xl hover:bg-black focus:outline-none focus:ring-2 focus:ring-gray-200 shadow" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<%
|
<% header_title t(".title") %>
|
||||||
header_title t(".title")
|
|
||||||
%>
|
|
||||||
|
|
||||||
<%= styled_form_with url: password_reset_path, class: "space-y-4" do |form| %>
|
<% if params[:step] == "pending" %>
|
||||||
|
<p class="text-sm text-gray-500 text-center"><%= t(".requested") %></p>
|
||||||
|
<% else %>
|
||||||
|
<%= styled_form_with url: password_reset_path, class: "space-y-4" do |form| %>
|
||||||
<%= form.email_field :email, label: true, autofocus: false, autocomplete: "email", required: "required", placeholder: "you@example.com" %>
|
<%= form.email_field :email, label: true, autofocus: false, autocomplete: "email", required: "required", placeholder: "you@example.com" %>
|
||||||
|
|
||||||
<%= form.submit t(".submit") %>
|
<%= form.submit t(".submit") %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
---
|
||||||
en:
|
en:
|
||||||
invitation_mailer:
|
invitation_mailer:
|
||||||
invite_email:
|
invite_email:
|
||||||
subject: "%{inviter} has invited you to join their household on Maybe!"
|
subject: "%{inviter} has invited you to join their household on Maybe!"
|
||||||
greeting: "You've been invited!"
|
|
||||||
body: "%{inviter} has invited you to join their household '%{family}' as a %{role}."
|
|
||||||
accept_button: "Accept Invitation"
|
|
||||||
expiry_notice: "This invitation will expire in %{days} days."
|
|
||||||
|
|
|
@ -37,11 +37,11 @@ en:
|
||||||
other_accounts: Other accounts
|
other_accounts: Other accounts
|
||||||
new_account: New account
|
new_account: New account
|
||||||
new:
|
new:
|
||||||
|
import_accounts: Import accounts
|
||||||
method_selector:
|
method_selector:
|
||||||
connected_entry: Link account (coming soon)
|
connected_entry: Link account (coming soon)
|
||||||
manual_entry: Enter account balance
|
manual_entry: Enter account balance
|
||||||
title: How would you like to add it?
|
title: How would you like to add it?
|
||||||
import_accounts: Import accounts
|
|
||||||
title: What would you like to add?
|
title: What would you like to add?
|
||||||
show:
|
show:
|
||||||
chart:
|
chart:
|
||||||
|
|
|
@ -3,10 +3,10 @@ en:
|
||||||
credit_cards:
|
credit_cards:
|
||||||
create:
|
create:
|
||||||
success: Credit card account created
|
success: Credit card account created
|
||||||
edit:
|
|
||||||
edit: Edit %{account}
|
|
||||||
destroy:
|
destroy:
|
||||||
success: Credit card account deleted
|
success: Credit card account deleted
|
||||||
|
edit:
|
||||||
|
edit: Edit %{account}
|
||||||
form:
|
form:
|
||||||
annual_fee: Annual fee
|
annual_fee: Annual fee
|
||||||
annual_fee_placeholder: '99'
|
annual_fee_placeholder: '99'
|
||||||
|
|
|
@ -3,11 +3,11 @@ en:
|
||||||
cryptos:
|
cryptos:
|
||||||
create:
|
create:
|
||||||
success: Crypto account created
|
success: Crypto account created
|
||||||
|
destroy:
|
||||||
|
success: Crypto account deleted
|
||||||
edit:
|
edit:
|
||||||
edit: Edit %{account}
|
edit: Edit %{account}
|
||||||
new:
|
new:
|
||||||
title: Enter account balance
|
title: Enter account balance
|
||||||
update:
|
update:
|
||||||
success: Crypto account updated
|
success: Crypto account updated
|
||||||
destroy:
|
|
||||||
success: Crypto account deleted
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ en:
|
||||||
depositories:
|
depositories:
|
||||||
create:
|
create:
|
||||||
success: Depository account created
|
success: Depository account created
|
||||||
|
destroy:
|
||||||
|
success: Depository account deleted
|
||||||
edit:
|
edit:
|
||||||
edit: Edit %{account}
|
edit: Edit %{account}
|
||||||
form:
|
form:
|
||||||
|
@ -12,5 +14,3 @@ en:
|
||||||
title: Enter account balance
|
title: Enter account balance
|
||||||
update:
|
update:
|
||||||
success: Depository account updated
|
success: Depository account updated
|
||||||
destroy:
|
|
||||||
success: Depository account deleted
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ en:
|
||||||
investments:
|
investments:
|
||||||
create:
|
create:
|
||||||
success: Investment account created
|
success: Investment account created
|
||||||
|
destroy:
|
||||||
|
success: Investment account deleted
|
||||||
edit:
|
edit:
|
||||||
edit: Edit %{account}
|
edit: Edit %{account}
|
||||||
form:
|
form:
|
||||||
|
@ -14,8 +16,6 @@ en:
|
||||||
chart_title: Total value
|
chart_title: Total value
|
||||||
update:
|
update:
|
||||||
success: Investment account updated
|
success: Investment account updated
|
||||||
destroy:
|
|
||||||
success: Investment account deleted
|
|
||||||
value_tooltip:
|
value_tooltip:
|
||||||
cash: Cash
|
cash: Cash
|
||||||
holdings: Holdings
|
holdings: Holdings
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
---
|
||||||
en:
|
en:
|
||||||
invitation_mailer:
|
invitation_mailer:
|
||||||
invite_email:
|
invite_email:
|
||||||
greeting: "Welcome to Maybe!"
|
accept_button: Accept Invitation
|
||||||
body: "%{inviter} has invited you to join the %{family} family on Maybe!"
|
body: "%{inviter} has invited you to join the %{family} family on Maybe!"
|
||||||
accept_button: "Accept Invitation"
|
expiry_notice: This invitation will expire in %{days} days
|
||||||
expiry_notice: "This invitation will expire in %{days} days"
|
greeting: Welcome to Maybe!
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
|
---
|
||||||
en:
|
en:
|
||||||
invitations:
|
invitations:
|
||||||
create:
|
create:
|
||||||
success: "Invitation sent successfully"
|
failure: Could not send invitation
|
||||||
failure: "Could not send invitation"
|
success: Invitation sent successfully
|
||||||
new:
|
new:
|
||||||
title: Invite Someone
|
|
||||||
subtitle: Send an invitation to join your family account on Maybe
|
|
||||||
email_placeholder: Enter email address
|
|
||||||
email_label: Email Address
|
email_label: Email Address
|
||||||
role_member: Member
|
email_placeholder: Enter email address
|
||||||
role_admin: Administrator
|
role_admin: Administrator
|
||||||
role_label: Role
|
role_label: Role
|
||||||
|
role_member: Member
|
||||||
submit: Send Invitation
|
submit: Send Invitation
|
||||||
|
subtitle: Send an invitation to join your family account on Maybe
|
||||||
|
title: Invite Someone
|
||||||
|
|
|
@ -3,10 +3,10 @@ en:
|
||||||
loans:
|
loans:
|
||||||
create:
|
create:
|
||||||
success: Loan account created
|
success: Loan account created
|
||||||
edit:
|
|
||||||
edit: Edit %{account}
|
|
||||||
destroy:
|
destroy:
|
||||||
success: Loan account deleted
|
success: Loan account deleted
|
||||||
|
edit:
|
||||||
|
edit: Edit %{account}
|
||||||
form:
|
form:
|
||||||
interest_rate: Interest rate
|
interest_rate: Interest rate
|
||||||
interest_rate_placeholder: '5.25'
|
interest_rate_placeholder: '5.25'
|
||||||
|
|
|
@ -3,10 +3,10 @@ en:
|
||||||
other_assets:
|
other_assets:
|
||||||
create:
|
create:
|
||||||
success: Other asset account created
|
success: Other asset account created
|
||||||
edit:
|
|
||||||
edit: Edit %{account}
|
|
||||||
destroy:
|
destroy:
|
||||||
success: Other asset account deleted
|
success: Other asset account deleted
|
||||||
|
edit:
|
||||||
|
edit: Edit %{account}
|
||||||
new:
|
new:
|
||||||
title: Enter asset details
|
title: Enter asset details
|
||||||
update:
|
update:
|
||||||
|
|
|
@ -3,10 +3,10 @@ en:
|
||||||
other_liabilities:
|
other_liabilities:
|
||||||
create:
|
create:
|
||||||
success: Other liability account created
|
success: Other liability account created
|
||||||
edit:
|
|
||||||
edit: Edit %{account}
|
|
||||||
destroy:
|
destroy:
|
||||||
success: Other liability account deleted
|
success: Other liability account deleted
|
||||||
|
edit:
|
||||||
|
edit: Edit %{account}
|
||||||
new:
|
new:
|
||||||
title: Enter liability details
|
title: Enter liability details
|
||||||
update:
|
update:
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
---
|
---
|
||||||
en:
|
en:
|
||||||
password_resets:
|
password_resets:
|
||||||
create:
|
|
||||||
requested: If an account with that email exists, we have sent a link to reset
|
|
||||||
your password.
|
|
||||||
edit:
|
edit:
|
||||||
submit: Update Password
|
|
||||||
title: Reset password
|
title: Reset password
|
||||||
new:
|
new:
|
||||||
|
requested: Please check your email for a link to reset your password.
|
||||||
submit: Reset password
|
submit: Reset password
|
||||||
title: Reset password
|
title: Reset password
|
||||||
update:
|
update:
|
||||||
|
|
|
@ -3,10 +3,10 @@ en:
|
||||||
properties:
|
properties:
|
||||||
create:
|
create:
|
||||||
success: Property account created
|
success: Property account created
|
||||||
edit:
|
|
||||||
edit: Edit %{account}
|
|
||||||
destroy:
|
destroy:
|
||||||
success: Property account deleted
|
success: Property account deleted
|
||||||
|
edit:
|
||||||
|
edit: Edit %{account}
|
||||||
form:
|
form:
|
||||||
address_line1: Street address
|
address_line1: Street address
|
||||||
address_line1_placeholder: 123 Main St
|
address_line1_placeholder: 123 Main St
|
||||||
|
|
|
@ -12,12 +12,12 @@ en:
|
||||||
invalid_invite_code: Invalid invite code, please try again.
|
invalid_invite_code: Invalid invite code, please try again.
|
||||||
success: You have signed up successfully.
|
success: You have signed up successfully.
|
||||||
new:
|
new:
|
||||||
|
invitation_message: "%{inviter} has invited you to join as a %{role}"
|
||||||
|
join_family_title: Join %{family}
|
||||||
|
role_admin: administrator
|
||||||
|
role_member: member
|
||||||
submit: Create account
|
submit: Create account
|
||||||
title: Create your account
|
title: Create your account
|
||||||
join_family_title: "Join %{family}"
|
|
||||||
invitation_message: "%{inviter} has invited you to join as a %{role}"
|
|
||||||
role_member: "member"
|
|
||||||
role_admin: "administrator"
|
|
||||||
welcome_body: To get started, you must sign up for a new account. You will
|
welcome_body: To get started, you must sign up for a new account. You will
|
||||||
then be able to configure additional settings within the app.
|
then be able to configure additional settings within the app.
|
||||||
welcome_title: Welcome to Self Hosted Maybe!
|
welcome_title: Welcome to Self Hosted Maybe!
|
||||||
|
|
|
@ -41,7 +41,6 @@ en:
|
||||||
theme_title: Theme
|
theme_title: Theme
|
||||||
profiles:
|
profiles:
|
||||||
show:
|
show:
|
||||||
invite_member: "Add member"
|
|
||||||
confirm_delete:
|
confirm_delete:
|
||||||
body: Are you sure you want to permanently delete your account? This action
|
body: Are you sure you want to permanently delete your account? This action
|
||||||
is irreversible.
|
is irreversible.
|
||||||
|
@ -56,13 +55,14 @@ en:
|
||||||
household_subtitle: Invite family members, partners and other inviduals. Invitees
|
household_subtitle: Invite family members, partners and other inviduals. Invitees
|
||||||
can login to your household and access your shared accounts.
|
can login to your household and access your shared accounts.
|
||||||
household_title: Household
|
household_title: Household
|
||||||
|
invitation_link: Invitation link
|
||||||
|
invite_member: Add member
|
||||||
last_name: Last Name
|
last_name: Last Name
|
||||||
page_title: Account
|
page_title: Account
|
||||||
|
pending: Pending
|
||||||
profile_subtitle: Customize how you appear on Maybe
|
profile_subtitle: Customize how you appear on Maybe
|
||||||
profile_title: Profile
|
profile_title: Profile
|
||||||
save: Save
|
save: Save
|
||||||
pending: Pending
|
|
||||||
invitation_link: Invitation link
|
|
||||||
user_avatar_field:
|
user_avatar_field:
|
||||||
accepted_formats: JPG or PNG. 5MB max.
|
accepted_formats: JPG or PNG. 5MB max.
|
||||||
choose: Choose
|
choose: Choose
|
||||||
|
|
|
@ -3,10 +3,10 @@ en:
|
||||||
vehicles:
|
vehicles:
|
||||||
create:
|
create:
|
||||||
success: Vehicle account created
|
success: Vehicle account created
|
||||||
edit:
|
|
||||||
edit: Edit %{account}
|
|
||||||
destroy:
|
destroy:
|
||||||
success: Vehicle account deleted
|
success: Vehicle account deleted
|
||||||
|
edit:
|
||||||
|
edit: Edit %{account}
|
||||||
form:
|
form:
|
||||||
make: Make
|
make: Make
|
||||||
make_placeholder: Toyota
|
make_placeholder: Toyota
|
||||||
|
|
|
@ -13,7 +13,7 @@ class PasswordResetsControllerTest < ActionDispatch::IntegrationTest
|
||||||
test "create" do
|
test "create" do
|
||||||
assert_enqueued_emails 1 do
|
assert_enqueued_emails 1 do
|
||||||
post password_reset_path, params: { email: @user.email }
|
post password_reset_path, params: { email: @user.email }
|
||||||
assert_redirected_to root_url
|
assert_redirected_to new_password_reset_url(step: "pending")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue