mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 14:42:11 -03:00
refactor: Simplify API calls and enhance model moving functionality
This commit is contained in:
@@ -164,23 +164,6 @@ export class VirtualScroller {
|
||||
|
||||
// Calculate the left offset to center the grid within the content area
|
||||
this.leftOffset = Math.max(0, (availableContentWidth - actualGridWidth) / 2);
|
||||
|
||||
// Log layout info
|
||||
console.log('Virtual Scroll Layout:', {
|
||||
containerWidth,
|
||||
availableContentWidth,
|
||||
actualGridWidth,
|
||||
columnsCount: this.columnsCount,
|
||||
itemWidth: this.itemWidth,
|
||||
itemHeight: this.itemHeight,
|
||||
leftOffset: this.leftOffset,
|
||||
paddingLeft,
|
||||
paddingRight,
|
||||
displayDensity,
|
||||
maxColumns,
|
||||
baseCardWidth,
|
||||
rowGap: this.rowGap
|
||||
});
|
||||
|
||||
// Update grid element max-width to match available width
|
||||
this.gridElement.style.maxWidth = `${actualGridWidth}px`;
|
||||
|
||||
@@ -43,7 +43,6 @@ export async function confirmDelete() {
|
||||
export function closeDeleteModal() {
|
||||
modalManager.closeModal('deleteModal');
|
||||
pendingDeletePath = null;
|
||||
pendingModelType = null;
|
||||
}
|
||||
|
||||
// Functions for the exclude modal
|
||||
@@ -67,7 +66,6 @@ export function showExcludeModal(filePath) {
|
||||
export function closeExcludeModal() {
|
||||
modalManager.closeModal('excludeModal');
|
||||
pendingExcludePath = null;
|
||||
pendingExcludeModelType = null;
|
||||
}
|
||||
|
||||
export async function confirmExclude() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { state } from '../state/index.js';
|
||||
import { state, getCurrentPageState } from '../state/index.js';
|
||||
import { resetAndReload } from '../api/loraApi.js';
|
||||
import { getStorageItem, setStorageItem } from './storageHelpers.js';
|
||||
import { NODE_TYPES, NODE_TYPE_ICONS, DEFAULT_NODE_COLOR } from './constants.js';
|
||||
@@ -626,7 +626,8 @@ export function updateFolderTags(folders) {
|
||||
if (!folderTagsContainer) return;
|
||||
|
||||
// Keep track of currently selected folder
|
||||
const currentFolder = this.pageState.activeFolder;
|
||||
const pageState = getCurrentPageState();
|
||||
const currentFolder = pageState.activeFolder;
|
||||
|
||||
// Create HTML for folder tags
|
||||
const tagsHTML = folders.map(folder => {
|
||||
|
||||
Reference in New Issue
Block a user