mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-12 23:32:40 +02:00
Fixed issue that would force a page reload when failing to install/update a plugin or theme.
# Conflicts: # CHANGELOG.md # themes/grav/js/admin.min.js # themes/grav/js/vendor.min.js
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
1. [](#bugfix)
|
||||
* More multi-site routing fixes
|
||||
* Fixed issue that would force a page reload when failing to install/update a plugin or theme.
|
||||
|
||||
# v1.10.0-rc.16
|
||||
## 09/01/2020
|
||||
|
||||
@@ -280,12 +280,16 @@ class Packages {
|
||||
let url = Packages.getInstallPackageUrl(type);
|
||||
|
||||
Promise.all(slugs.map((slug) => {
|
||||
return request(url, {
|
||||
method: 'post',
|
||||
body: {
|
||||
package: slug,
|
||||
type: type
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
request(url, {
|
||||
method: 'post',
|
||||
body: {
|
||||
package: slug,
|
||||
type: type
|
||||
}
|
||||
}, (response) => {
|
||||
resolve(response);
|
||||
});
|
||||
});
|
||||
})).then(callbackSuccess);
|
||||
|
||||
@@ -409,8 +413,10 @@ class Packages {
|
||||
$('[data-packages-modal] .installing-package').addClass('hidden');
|
||||
$('[data-packages-modal] .installation-complete').removeClass('hidden');
|
||||
|
||||
if (response.status === 'error') {
|
||||
let remodal = $.remodal.lookup[$('[data-packages-modal]').data('remodal')];
|
||||
const errors = Array.from(response).filter((r) => r.status === 'error');
|
||||
|
||||
if (errors && errors.length) {
|
||||
let remodal = $.remodal.lookup[$('[data-packages-modal].remodal-is-opened').data('remodal')];
|
||||
remodal.close();
|
||||
|
||||
return;
|
||||
|
||||
39
themes/grav/js/admin.min.js
vendored
39
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
324
themes/grav/js/vendor.min.js
vendored
324
themes/grav/js/vendor.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user