mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-09-04 17:16:36 +02:00
refactor: migrate to modular tool-based architecture
- Implement tool registry system with individual tool modules - Reorganize transformers into categorized source modules - Remove emojiLibrary.js, consolidate into EmojiUtils and emojiData - Fix mobile close button and tooltip functionality - Add build system for transforms and emoji data - Migrate from Python backend to pure JavaScript - Add comprehensive documentation and testing - Improve code organization and maintainability - Ignore generated files (transforms-bundle.js, emojiData.js)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
window.NotificationUtils = {
|
||||
showNotification(message, type = 'success', iconClass = null) {
|
||||
const existing = document.querySelector('.copy-notification');
|
||||
if (existing) {
|
||||
existing.remove();
|
||||
}
|
||||
|
||||
const notification = document.createElement('div');
|
||||
notification.className = `copy-notification ${type || 'success'}`;
|
||||
|
||||
if (iconClass) {
|
||||
const icon = document.createElement('i');
|
||||
icon.className = iconClass;
|
||||
notification.appendChild(icon);
|
||||
}
|
||||
|
||||
const text = document.createElement('span');
|
||||
text.textContent = message;
|
||||
notification.appendChild(text);
|
||||
|
||||
document.body.appendChild(notification);
|
||||
|
||||
setTimeout(() => {
|
||||
notification.classList.add('fade-out');
|
||||
setTimeout(() => {
|
||||
if (notification.parentNode) {
|
||||
notification.parentNode.removeChild(notification);
|
||||
}
|
||||
}, 300);
|
||||
}, 3000);
|
||||
},
|
||||
|
||||
showCopiedPopup() {
|
||||
this.showNotification('Copied!', 'success', 'fas fa-check');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user