mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Refactor toast notifications and improve LoraCard interactions
This commit is contained in:
@@ -66,18 +66,7 @@ export function toggleFolder(tag) {
|
||||
|
||||
export function copyTriggerWord(word) {
|
||||
navigator.clipboard.writeText(word).then(() => {
|
||||
const toast = document.createElement('div');
|
||||
toast.className = 'toast toast-copy';
|
||||
toast.textContent = 'Copied!';
|
||||
document.body.appendChild(toast);
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
toast.classList.add('show');
|
||||
setTimeout(() => {
|
||||
toast.classList.remove('show');
|
||||
setTimeout(() => toast.remove(), 300);
|
||||
}, 1000);
|
||||
});
|
||||
showToast('Trigger word copied', 'success');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user