mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat(ui): enhance settings modal styling and add priority tags tabs
- Rename `.settings-open-location-button` to `.settings-action-link` for better semantic meaning - Add enhanced hover/focus states with accent colors and border transitions - Implement tabbed interface for priority tags with LoRA, checkpoint, and embedding sections - Improve input styling with consistent error states and example code formatting - Remove deprecated grid layout in favor of tab-based organization - Add responsive tab navigation with proper focus management and visual feedback
This commit is contained in:
@@ -6,7 +6,7 @@ import { getStorageItem, setStorageItem } from '../utils/storageHelpers.js';
|
||||
export class HelpManager {
|
||||
constructor() {
|
||||
this.lastViewedTimestamp = getStorageItem('help_last_viewed', 0);
|
||||
this.latestContentTimestamp = new Date('2025-07-09').getTime(); // Will be updated from server or config
|
||||
this.latestContentTimestamp = new Date('2025-10-11').getTime(); // Will be updated from server or config
|
||||
this.isInitialized = false;
|
||||
|
||||
// Default latest content data - could be fetched from server
|
||||
|
||||
@@ -197,7 +197,7 @@ export class SettingsManager {
|
||||
button.addEventListener('click', () => this.toggleInputVisibility(button));
|
||||
});
|
||||
|
||||
const openSettingsLocationButton = document.querySelector('.settings-open-location-button');
|
||||
const openSettingsLocationButton = document.querySelector('.settings-open-location-trigger');
|
||||
if (openSettingsLocationButton) {
|
||||
openSettingsLocationButton.addEventListener('click', () => {
|
||||
const filePath = openSettingsLocationButton.dataset.settingsPath;
|
||||
@@ -350,7 +350,8 @@ export class SettingsManager {
|
||||
}
|
||||
|
||||
textarea.addEventListener('input', () => this.handlePriorityTagInput(modelType));
|
||||
textarea.addEventListener('blur', () => this.handlePriorityTagBlur(modelType));
|
||||
textarea.addEventListener('blur', () => this.handlePriorityTagSave(modelType));
|
||||
textarea.addEventListener('keydown', (event) => this.handlePriorityTagKeyDown(event, modelType));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -378,7 +379,20 @@ export class SettingsManager {
|
||||
this.displayPriorityTagValidation(modelType, validation.valid, validation.errors);
|
||||
}
|
||||
|
||||
async handlePriorityTagBlur(modelType) {
|
||||
handlePriorityTagKeyDown(event, modelType) {
|
||||
if (event.key !== 'Enter') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.shiftKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
this.handlePriorityTagSave(modelType);
|
||||
}
|
||||
|
||||
async handlePriorityTagSave(modelType) {
|
||||
const textarea = document.getElementById(`${modelType}PriorityTagsInput`);
|
||||
if (!textarea) {
|
||||
return;
|
||||
@@ -423,7 +437,7 @@ export class SettingsManager {
|
||||
}
|
||||
|
||||
if (isValid || errors.length === 0) {
|
||||
textarea.classList.remove('input-error');
|
||||
textarea.classList.remove('settings-input-error');
|
||||
if (errorElement) {
|
||||
errorElement.textContent = '';
|
||||
errorElement.style.display = 'none';
|
||||
@@ -431,7 +445,7 @@ export class SettingsManager {
|
||||
return;
|
||||
}
|
||||
|
||||
textarea.classList.add('input-error');
|
||||
textarea.classList.add('settings-input-error');
|
||||
if (errorElement) {
|
||||
const message = this.getPriorityTagErrorMessage(errors[0]);
|
||||
errorElement.textContent = message;
|
||||
|
||||
Reference in New Issue
Block a user