mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
feat: implement disabled state for header search on statistics page with appropriate styling and functionality adjustments
This commit is contained in:
@@ -130,9 +130,24 @@ export class HeaderManager {
|
||||
const headerSearch = document.getElementById('headerSearch');
|
||||
|
||||
if (this.currentPage === 'statistics' && headerSearch) {
|
||||
headerSearch.style.display = 'none';
|
||||
headerSearch.classList.add('disabled');
|
||||
// Disable search functionality
|
||||
const searchInput = headerSearch.querySelector('#searchInput');
|
||||
const searchButtons = headerSearch.querySelectorAll('button');
|
||||
if (searchInput) {
|
||||
searchInput.disabled = true;
|
||||
searchInput.placeholder = 'Search not available on statistics page';
|
||||
}
|
||||
searchButtons.forEach(btn => btn.disabled = true);
|
||||
} else if (headerSearch) {
|
||||
headerSearch.style.display = 'flex';
|
||||
headerSearch.classList.remove('disabled');
|
||||
// Re-enable search functionality
|
||||
const searchInput = headerSearch.querySelector('#searchInput');
|
||||
const searchButtons = headerSearch.querySelectorAll('button');
|
||||
if (searchInput) {
|
||||
searchInput.disabled = false;
|
||||
}
|
||||
searchButtons.forEach(btn => btn.disabled = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user