mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-06 13:25:46 +01:00
Fixed proper display version of updatable plugins when in details page
This commit is contained in:
@@ -107,7 +107,8 @@ export default class Updates {
|
|||||||
|
|
||||||
Object.keys(resources).forEach(function(item) {
|
Object.keys(resources).forEach(function(item) {
|
||||||
// listing page
|
// listing page
|
||||||
let element = $(`[data-gpm-${singles[index]}="${item}"] .gpm-name`);
|
let container = $(`[data-gpm-${singles[index]}="${item}"]`);
|
||||||
|
let element = container.find('.gpm-name');
|
||||||
let url = element.find('a');
|
let url = element.find('a');
|
||||||
|
|
||||||
if (type === 'plugins' && !element.find('.badge.update').length) {
|
if (type === 'plugins' && !element.find('.badge.update').length) {
|
||||||
@@ -117,10 +118,11 @@ export default class Updates {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// details page
|
// details page
|
||||||
let details = $(`.grav-update.${singles[index]}`);
|
if (container.length) {
|
||||||
if (details.length) {
|
let details = $(`.grav-update.${singles[index]}`);
|
||||||
let releaseType = resources[item].type === 'testing' ? '<span class="gpm-testing">test release</span>' : '';
|
if (details.length) {
|
||||||
details.html(`
|
let releaseType = resources[item].type === 'testing' ? '<span class="gpm-testing">test release</span>' : '';
|
||||||
|
details.html(`
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-bullhorn"></i>
|
<i class="fa fa-bullhorn"></i>
|
||||||
<strong>v${resources[item].available}</strong> ${releaseType} ${translations.PLUGIN_ADMIN.OF_THIS} ${singles[index]} ${translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE}!
|
<strong>v${resources[item].available}</strong> ${releaseType} ${translations.PLUGIN_ADMIN.OF_THIS} ${singles[index]} ${translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE}!
|
||||||
@@ -128,8 +130,9 @@ export default class Updates {
|
|||||||
</p>
|
</p>
|
||||||
`);
|
`);
|
||||||
|
|
||||||
// display update bar for themes/plugins details
|
// display update bar for themes/plugins details
|
||||||
$(`[data-gpm-${singles[index]}="${item}"]`).css('display', 'block');
|
$(`[data-gpm-${singles[index]}="${item}"]`).css('display', 'block');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
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
Reference in New Issue
Block a user