mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 16:41:21 +01:00
fix: #11944, dont refresh page when uninstalling
This commit is contained in:
@@ -309,8 +309,16 @@ define('admin/extend/plugins', [
|
|||||||
btn.removeAttr('disabled');
|
btn.removeAttr('disabled');
|
||||||
return alerts.error(err);
|
return alerts.error(err);
|
||||||
}
|
}
|
||||||
|
function removeAndUpdateBadge(section) {
|
||||||
ajaxify.refresh();
|
$(`${section} [data-plugin-id="${pluginID}"]`).remove();
|
||||||
|
const count = $(`${section} [data-plugin-id]`).length;
|
||||||
|
$(`[data-bs-target="${section}"] .badge`).text(count);
|
||||||
|
}
|
||||||
|
if (!pluginData.installed) {
|
||||||
|
['#installed', '#active', '#deactive', '#upgrade'].forEach(removeAndUpdateBadge);
|
||||||
|
} else {
|
||||||
|
ajaxify.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
alerts.alert({
|
alerts.alert({
|
||||||
alert_id: 'plugin_toggled',
|
alert_id: 'plugin_toggled',
|
||||||
|
|||||||
Reference in New Issue
Block a user