mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-20 18:51:26 -03:00
feat(ui): make app header full-width and move Doctor into header controls
- Drop the fixed max-width on .header-container so the header spans the viewport while the card grid keeps its own content width - Keep header icon click targets at 32px at all breakpoints and add role/tabindex/aria-label plus Enter/Space activation - Relocate the Doctor trigger from the page toolbar to the header icon group (also available on the statistics page and in the hamburger menu), removing the now-unused .doctor-trigger styles
This commit is contained in:
@@ -49,6 +49,18 @@ export class HeaderManager {
|
||||
initializeCommonElements() {
|
||||
this.initializeThemePopover();
|
||||
|
||||
// Header icon buttons are divs with role="button"; make Enter/Space activate them
|
||||
const headerControls = document.getElementById('headerControls');
|
||||
if (headerControls) {
|
||||
headerControls.addEventListener('keydown', (e) => {
|
||||
if (e.key !== 'Enter' && e.key !== ' ') return;
|
||||
const target = e.target.closest('[role="button"]');
|
||||
if (!target || !headerControls.contains(target)) return;
|
||||
e.preventDefault();
|
||||
target.click();
|
||||
});
|
||||
}
|
||||
|
||||
const settingsToggle = document.querySelector('.settings-toggle');
|
||||
if (settingsToggle) {
|
||||
settingsToggle.addEventListener('click', () => {
|
||||
@@ -295,6 +307,13 @@ export class HeaderManager {
|
||||
case 'notifications':
|
||||
updateService.toggleUpdateModal();
|
||||
break;
|
||||
case 'doctor': {
|
||||
const doctorToggle = document.getElementById('doctorTriggerBtn');
|
||||
if (doctorToggle) {
|
||||
doctorToggle.click();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'support':
|
||||
if (window.modalManager) {
|
||||
window.modalManager.toggleModal('supportModal');
|
||||
|
||||
Reference in New Issue
Block a user