Add endpoint to remove TOTP to UI and fix typos

This commit is contained in:
syeopite 2021-07-16 14:28:26 -07:00
parent 194d248342
commit d51d53e04b
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
2 changed files with 8 additions and 4 deletions

View File

@ -485,8 +485,8 @@
"channel_tab_playlists_label": "Playlists",
"channel_tab_community_label": "Community",
"channel_tab_channels_label": "Channels",
"setup_totp_form_header": "Setup two factor authenticiation (TOTP)",
"setup_totp_instructions_download_auth": "Install an authenticator app (or anything that supports totp) on your device",
"setup_totp_form_header": "Setup two-factor authentication (TOTP)",
"setup_totp_instructions_download_auth": "Install an authenticator app (or anything that supports TOTP) on your device",
"setup_totp_instructions_enter_code": "Enter the following <strong>secret</strong> code:",
"setup_totp_instructions_validate_code": "Enter the 6 digit number on your screen. Be sure to do it under thirty seconds!",
"setup_totp_submit_button": "Setup TOTP",
@ -495,5 +495,5 @@
"general_totp_enter_code_field": "6 digit number",
"general_totp_enter_code_header": "Two-factor authentication",
"general_totp_verify_button": "Verify",
"remove_totp_header": "Remove two-factor authentication",
"remove_totp_header": "Remove two-factor authentication (TOTP)",
"remove_totp_confirm_message": "Are you sure you would like to remove two-factor-authentication?"}

View File

@ -346,7 +346,11 @@
</div>
<div class="pure-control-group">
<a href="/2fa/setup?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "setup_totp_form_header") %></a>
<% if env.get?("user").as(User).totp_secret %>
<a href="/2fa/remove?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "remove_totp_header") %></a>
<% else %>
<a href="/2fa/setup?referer=<%= URI.encode_www_form(referer) %>"><%= translate(locale, "setup_totp_form_header") %></a>
<% end %>
</div>
<div class="pure-control-group">