mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
feat: show an informative message when no plugins are found after filtering
fixes #10771
This commit is contained in:
@@ -162,6 +162,15 @@ define('admin/extend/plugins', [
|
||||
const pluginId = $(this).attr('data-plugin-id');
|
||||
$(this).toggleClass('hide', pluginId && pluginId.indexOf(term) === -1);
|
||||
});
|
||||
|
||||
const tabEls = document.querySelectorAll('.plugins .tab-pane');
|
||||
tabEls.forEach((tabEl) => {
|
||||
const remaining = tabEl.querySelectorAll('li:not(.hide)').length;
|
||||
const noticeEl = tabEl.querySelector('.no-plugins');
|
||||
if (noticeEl) {
|
||||
noticeEl.classList.toggle('hide', remaining !== 0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#plugin-submit-usage').on('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user