diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-08 18:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-08 18:09:45 +0300 |
commit | 4f0f7d580907e598013ad4b445db60ceacaa4724 (patch) | |
tree | 96f8b3224f962ff7011611cfdfa65bdbe079c5cd /app/assets/javascripts/pages | |
parent | 148b75b329294f6b6ae409bbf8d70590e63c6bc9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/profiles/accounts/show/index.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/pages/profiles/two_factor_auths/index.js | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/pages/profiles/accounts/show/index.js b/app/assets/javascripts/pages/profiles/accounts/show/index.js index 96c3d725780..6c1e953aa83 100644 --- a/app/assets/javascripts/pages/profiles/accounts/show/index.js +++ b/app/assets/javascripts/pages/profiles/accounts/show/index.js @@ -1,3 +1,6 @@ import initProfileAccount from '~/profile/account'; +import { initClose2faSuccessMessage } from '~/authentication/two_factor_auth'; document.addEventListener('DOMContentLoaded', initProfileAccount); + +initClose2faSuccessMessage(); diff --git a/app/assets/javascripts/pages/profiles/two_factor_auths/index.js b/app/assets/javascripts/pages/profiles/two_factor_auths/index.js index 1aeba6669ee..24dbc312dd2 100644 --- a/app/assets/javascripts/pages/profiles/two_factor_auths/index.js +++ b/app/assets/javascripts/pages/profiles/two_factor_auths/index.js @@ -1,9 +1,10 @@ import { parseBoolean } from '~/lib/utils/common_utils'; import { mount2faRegistration } from '~/authentication/mount_2fa'; +import { initRecoveryCodes } from '~/authentication/two_factor_auth'; document.addEventListener('DOMContentLoaded', () => { const twoFactorNode = document.querySelector('.js-two-factor-auth'); - const skippable = parseBoolean(twoFactorNode.dataset.twoFactorSkippable); + const skippable = twoFactorNode ? parseBoolean(twoFactorNode.dataset.twoFactorSkippable) : false; if (skippable) { const button = `<a class="btn btn-sm btn-warning float-right" data-qa-selector="configure_it_later_button" data-method="patch" href="${twoFactorNode.dataset.two_factor_skip_url}">Configure it later</a>`; @@ -13,3 +14,5 @@ document.addEventListener('DOMContentLoaded', () => { mount2faRegistration(); }); + +initRecoveryCodes(); |