mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Add bulk delete functionality for loras and implement model duplicates management. See #198
- Introduced a new API endpoint for bulk deleting loras. - Added ModelDuplicatesManager to handle duplicate models for loras and checkpoints. - Implemented UI components for displaying duplicates and managing selections. - Enhanced controls with a button for finding duplicates. - Updated templates to include a duplicates banner and associated actions.
This commit is contained in:
@@ -87,6 +87,11 @@ export class VirtualScroller {
|
||||
}
|
||||
|
||||
calculateLayout() {
|
||||
const pageState = getCurrentPageState();
|
||||
if (pageState.duplicatesMode) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Get container width and style information
|
||||
const containerWidth = this.containerElement.clientWidth;
|
||||
const containerStyle = getComputedStyle(this.containerElement);
|
||||
|
||||
@@ -10,3 +10,14 @@ export function formatFileSize(bytes) {
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
return (bytes / Math.pow(1024, i)).toFixed(2) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert timestamp to human readable date string
|
||||
* @param {number} modified - Timestamp in seconds
|
||||
* @returns {string} Formatted date string
|
||||
*/
|
||||
export function formatDate(modified) {
|
||||
if (!modified) return '';
|
||||
const date = new Date(modified * 1000);
|
||||
return date.toLocaleString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user