mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 22:26:56 +02:00
Various 2FA tweaks, fixes and enhancements
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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`;
|
||||
|
||||
|
||||
4
themes/grav/css-compiled/template.css
vendored
4
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
themes/grav/js/admin.min.js
vendored
4
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -143,7 +143,7 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
button[data-2fa-regenerate] {
|
||||
.twofa-wrapper {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user