mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Add file name copy functionality to Lora modal
This commit is contained in:
@@ -149,7 +149,10 @@ export function showLoraModal(lora) {
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<label>File Name</label>
|
||||
<span id="file-name">${lora.file_name || 'N/A'}</span>
|
||||
<div class="file-name-wrapper" onclick="copyFileName('${lora.file_name}')">
|
||||
<span id="file-name">${lora.file_name || 'N/A'}</span>
|
||||
<i class="fas fa-copy" title="Copy file name"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<label>Location</label>
|
||||
@@ -206,6 +209,17 @@ export function showLoraModal(lora) {
|
||||
setupShowcaseScroll(); // Add this line
|
||||
}
|
||||
|
||||
// 添加复制文件名的函数
|
||||
window.copyFileName = async function(fileName) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(fileName);
|
||||
showToast('File name copied', 'success');
|
||||
} catch (err) {
|
||||
console.error('Copy failed:', err);
|
||||
showToast('Copy failed', 'error');
|
||||
}
|
||||
};
|
||||
|
||||
function setupEditableFields() {
|
||||
const editableFields = document.querySelectorAll('.editable-field [contenteditable]');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user