Various 2FA tweaks, fixes and enhancements

This commit is contained in:
Djamil Legato
2018-05-09 10:36:25 -07:00
parent 06fb445101
commit 36ac2a73ee
7 changed files with 139 additions and 9 deletions

View File

@@ -1,3 +1,11 @@
# v1.7.5
## XX/XX/2018
1. [](#bugfix)
* Fixed Firefox issue with the Regenerate button for 2FA. Forcing the page to reload
* Fixed jumpiness behavior for Regenerate button when on active state.
* Prevent the prompt for unsaved state when Regenerating a 2FA code and trying to reload/leave the page.
# v1.7.4
## 04/02/2018

View File

@@ -5,7 +5,8 @@ import request from '../utils/request';
const body = $('body');
// Dashboard update and Grav update
body.on('click', '[data-2fa-regenerate]', function() {
body.on('click', '[data-2fa-regenerate]', function(event) {
event.preventDefault();
let element = $(this);
let url = `${config.base_url_relative}/ajax.json/task${config.param_sep}regenerate2FASecret`;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -143,7 +143,7 @@
font-weight: bold;
}
button[data-2fa-regenerate] {
.twofa-wrapper {
margin-top: 5px;
}

View File

@@ -10,10 +10,10 @@
<div>
<span>{{ 'PLUGIN_ADMIN.2FA_SECRET'|tu }}: </span><span class="twofa-secret-code" data-2fa-secret>{{ data.secret }}</span>
</div>
<div class="danger">
<div class="danger twofa-wrapper">
<button data-hint="{{ 'PLUGIN_ADMIN.2FA_REGEN_HINT'|tu }}" class="button button-small hint--bottom" data-2fa-regenerate><i class="fa fa-fw fa-refresh"></i> {{ 'PLUGIN_ADMIN.2FA_REGENERATE'|t }}</button>
</div>
<input type="text" style="display:none;" name="{{ (scope ~ field.name)|fieldName }}" data-2fa-value value="{{ data.secret|replace({' ':''}) }}" />
<input type="text" class="no-form" style="display:none;" name="{{ (scope ~ field.name)|fieldName }}" data-2fa-value value="{{ data.secret|replace({' ':''}) }}" />
{% else %}
<div class="notice error">