This commit is contained in:
Oleksandr Turchyn
2024-09-18 19:47:47 +03:00
committed by Oleksandr Turchyn
parent 3c60fb4ee6
commit e9d728fa4a
132 changed files with 1121 additions and 600 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<%= form_for '', url: mfa_setup_path, data: { turbo_frame: :_top }, html: { id: 'mfa_form' } do |f| %>
<p class="text-center">
Use an authenticator mobile app like Google Authenticator or 1Password to scan the QR code below.
<%= t('use_an_authenticator_mobile_app_like_google_authenticator_or_1password_to_scan_the_qr_code_below') %>
</p>
<div>
<%== RQRCode::QRCode.new(@provision_url).as_svg(viewbox: true, svg_attributes: { class: 'md:w-80 md:h-80 my-4 mx-auto' }) %>
@@ -12,6 +12,6 @@
</span>
</div>
<div class="form-control mt-4">
<%= f.button button_title(title: 'Save'), class: 'base-button' %>
<%= f.button button_title(title: t('save')), class: 'base-button' %>
</div>
<% end %>
+2 -2
View File
@@ -1,4 +1,4 @@
<%= render 'shared/turbo_modal', title: 'Remove 2FA' do %>
<%= render 'shared/turbo_modal', title: t('remove_2fa') do %>
<%= form_for '', url: mfa_setup_path, method: :delete, data: { turbo_frame: :_top } do |f| %>
<div class="form-control my-6 space-y-2">
<%= f.text_field :otp_attempt, required: true, placeholder: 'XXX-XXX', class: 'base-input text-center' %>
@@ -7,7 +7,7 @@
</span>
</div>
<div class="form-control mt-4">
<%= f.button button_title(title: 'Remove 2FA'), class: 'base-button' %>
<%= f.button button_title(title: t('remove_2fa')), class: 'base-button' %>
</div>
<% end %>
<% end %>
+1 -1
View File
@@ -1,3 +1,3 @@
<%= render 'shared/turbo_modal', title: 'Setup 2FA' do %>
<%= render 'shared/turbo_modal', title: t('setup_2fa') do %>
<%= render 'mfa_setup/form' %>
<% end %>
+3 -1
View File
@@ -1,4 +1,6 @@
<div class="max-w-lg mx-auto px-2">
<h1 class="text-4xl font-bold text-center mt-8">Setup 2FA</h1>
<h1 class="text-4xl font-bold text-center mt-8">
<%= t('setup_2fa') %>
</h1>
<%= render 'mfa_setup/form' %>
</div>