Skip to content

Commit

Permalink
Merge branch 'release/1.10.31'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Mar 14, 2022
2 parents 506415f + f529307 commit b75e6d6
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 16 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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' }
Expand Down
3 changes: 3 additions & 0 deletions languages/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion themes/grav/app/forms/fields/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
2 changes: 1 addition & 1 deletion themes/grav/css-compiled/template.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/grav/css-compiled/template.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions themes/grav/js/admin.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -15265,4 +15265,4 @@ module.exports = jQuery;
/******/ Grav = __webpack_exports__;
/******/
/******/ })()
;
;
2 changes: 1 addition & 1 deletion themes/grav/scss/template/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ body.sidebar-quickopen #admin-main {
linep-height: 1.2;
}

.gravatar {
.avatar {
font-size: 0.9rem;
padding: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion themes/grav/templates/partials/nav-user-avatar.html.twig
Original file line number Diff line number Diff line change
@@ -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' }}" />
11 changes: 10 additions & 1 deletion themes/grav/templates/partials/userinfo-avatar-credit.html.twig
Original file line number Diff line number Diff line change
@@ -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>
7 changes: 2 additions & 5 deletions themes/grav/templates/partials/userinfo-avatar.html.twig
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit b75e6d6

Please sign in to comment.