Merge branch 'release/1.10.31'

This commit is contained in:
Andy Miller
2022-03-14 11:32:12 -06:00
11 changed files with 33 additions and 16 deletions

View File

@@ -1,7 +1,15 @@
# v1.10.31
## 03/14/2022
1. [](#new)
* Added new local Multiavatar (local generation). **This will be default in Grav 1.8**
2. [](#bugfix)
* Patch `collection.js` [#2235](https://github.com/getgrav/grav-plugin-admin/issues/2235)
# v1.10.30.2
## 02/09/2022
1. [](#bugfix)
2. [](#bugfix)
* Fixed regression preventing new `elements` field from saving its state
# v1.10.30.1

View File

@@ -1,7 +1,7 @@
name: Admin Panel
slug: admin
type: plugin
version: 1.10.30.2
version: 1.10.31
description: Adds an advanced administration panel to manage your site
icon: empire
author:
@@ -15,7 +15,7 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
license: MIT
dependencies:
- { name: grav, version: '>=1.7.30' }
- { name: grav, version: '>=1.7.31' }
- { name: form, version: '>=5.1.0' }
- { name: login, version: '>=3.6.2' }
- { name: email, version: '>=3.1.0' }

View File

@@ -1137,3 +1137,6 @@ PLUGIN_ADMIN:
ACTIVATION_REQUIRED: "Activation required to configure"
SESSION_SECURE_HTTPS: "Secure (HTTPS)"
SESSION_SECURE_HTTPS_HELP: "Set session secure on HTTPS but not on HTTP. Has no effect if you have above Secure setting set to true. Set to false if your site jumps between HTTP and HTTPS."
AVATAR: "Avatar Generator"
AVATAR_HELP: "Multiavatar is a locally generated avatar. Gravatar is an external service that uses your email address to pull a preconfigured Avatar remotely"
AVATAR_HASH: "NOTE: Optional Avatar custom 'hash' string"

View File

@@ -218,7 +218,7 @@ export default class CollectionsField {
? observedValue
: index);
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name'].forEach((prop) => {
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name', 'data-grav-elements'].forEach((prop) => {
item.find('[' + prop + '], [_' + prop + ']').each(function() {
let element = $(this);
let indexes = [];

View File

@@ -2743,7 +2743,7 @@ table.noflex {
font-size: 1.1rem;
margin: 0;
linep-height: 1.2; }
.user-details .gravatar {
.user-details .avatar {
font-size: 0.9rem;
padding: 0; }
@media only all and (max-width: 47.938em) {

File diff suppressed because one or more lines are too long

View File

@@ -5869,7 +5869,7 @@ var CollectionsField = /*#__PURE__*/function () {
var hasCustomKey = observed.length;
var currentKey = item.data('collection-key-backup');
item.attr('data-collection-key', hasCustomKey ? observedValue : index);
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name'].forEach(function (prop) {
['name', 'data-grav-field-name', 'for', 'id', 'data-grav-file-settings', 'data-file-post-add', 'data-file-post-remove', 'data-grav-array-name', 'data-grav-elements'].forEach(function (prop) {
item.find('[' + prop + '], [_' + prop + ']').each(function () {
var element = external_jQuery_default()(this);
var indexes = [];
@@ -15265,4 +15265,4 @@ module.exports = jQuery;
/******/ Grav = __webpack_exports__;
/******/
/******/ })()
;
;

View File

@@ -1114,7 +1114,7 @@ body.sidebar-quickopen #admin-main {
linep-height: 1.2;
}
.gravatar {
.avatar {
font-size: 0.9rem;
padding: 0;
}

View File

@@ -1,2 +1,2 @@
{% set user_avatar = admin.user.getAvatarUrl() %}
<img src="{{ ('?' not in user_avatar) and (not user_avatar starts with 'data:') ? user_avatar ~ '?s=80' : user_avatar }}" />
<img src="{{ user_avatar ~ '?s=80' }}" />

View File

@@ -1 +1,10 @@
<p class="gravatar">{{ "PLUGIN_ADMIN.AVATAR_BY"|t }} <a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">gravatar.com</a>. {{ "PLUGIN_ADMIN.AVATAR_UPLOAD_OWN"|t }}</p>
<p class="avatar">
{{ "PLUGIN_ADMIN.AVATAR_BY"|t }}
{% if config.system.accounts.avatar == 'gravatar' %}
<a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">gravatar.com</a>.
{% else %}
<a href="https://multiavatar.com/" target="_blank" rel="noopener noreferrer">Multiavatar</a>.
{% endif %}
{{ "PLUGIN_ADMIN.AVATAR_UPLOAD_OWN"|t }}</p>

View File

@@ -1,5 +1,2 @@
{% if data.avatar %}
<label><img src="{{ data.getAvatarUrl() }}" /></label>
{% else %}
<label><img referrerpolicy="no-referrer" src="https://www.gravatar.com/avatar/{{ data.email|md5 }}?s=200" /></label>
{% endif %}
{% set user_avatar = data.getAvatarUrl() %}
<label><img referrerpolicy="no-referrer" src="{{ user_avatar ~ '?s=200' }}" /></label>