mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 21:30:30 +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');
|
||||
return alerts.error(err);
|
||||
}
|
||||
|
||||
ajaxify.refresh();
|
||||
function removeAndUpdateBadge(section) {
|
||||
$(`${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({
|
||||
alert_id: 'plugin_toggled',
|
||||
|
||||
Reference in New Issue
Block a user