mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: Add drag-and-drop support with visual feedback for sidebar nodes
This commit implements drag-and-drop functionality for sidebar nodes, adding visual feedback via highlight styling when dragging over valid drop targets. The CSS introduces new classes to style drop indicators using the lora-accent color scheme, while the JS adds event handlers to manage drag operations and update the UI state accordingly. This improves user interaction by providing clear visual cues for valid drop areas during file operations.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { modalManager } from '../managers/ModalManager.js';
|
||||
import { getModelApiClient } from '../api/modelApiFactory.js';
|
||||
|
||||
const apiClient = getModelApiClient();
|
||||
|
||||
let pendingDeletePath = null;
|
||||
let pendingExcludePath = null;
|
||||
|
||||
@@ -27,7 +25,7 @@ export async function confirmDelete() {
|
||||
if (!pendingDeletePath) return;
|
||||
|
||||
try {
|
||||
await apiClient.deleteModel(pendingDeletePath);
|
||||
await getModelApiClient().deleteModel(pendingDeletePath);
|
||||
|
||||
closeDeleteModal();
|
||||
|
||||
@@ -72,7 +70,7 @@ export async function confirmExclude() {
|
||||
if (!pendingExcludePath) return;
|
||||
|
||||
try {
|
||||
await apiClient.excludeModel(pendingExcludePath);
|
||||
await getModelApiClient().excludeModel(pendingExcludePath);
|
||||
|
||||
closeExcludeModal();
|
||||
|
||||
@@ -82,4 +80,4 @@ export async function confirmExclude() {
|
||||
} catch (error) {
|
||||
console.error('Error excluding model:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user