Spaces:
Running
Running
Génère une interface utilisateur (UI) d'application web en React pour un bot de trading. L'interface doit comporter un tableau de bord avec des graphiques de performance, un panneau de configuration des stratégies, une section de journalisation des transactions et un bouton "Démarrer/Arrêter le bot".
f4e79f0 verified Download script.js from bakusking/cryptobot-commander: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/spaces/bakusking/cryptobot-commander/resolve/main/script.js
- Command line
-
hf download hf://spaces/bakusking/cryptobot-commander/script.js
-
curl -L -o script.js https://huggingface.co/spaces/bakusking/cryptobot-commander/resolve/main/script.js
1.02 kB
| // Shared functionality can be added here | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize tooltips for all elements with data-tooltip attribute | |
| const tooltipElements = document.querySelectorAll('[data-tooltip]'); | |
| tooltipElements.forEach(el => { | |
| const tooltip = document.createElement('div'); | |
| tooltip.className = 'hidden absolute z-50 bg-gray-800 text-white text-xs rounded py-1 px-2'; | |
| tooltip.textContent = el.getAttribute('data-tooltip'); | |
| document.body.appendChild(tooltip); | |
| el.addEventListener('mouseenter', () => { | |
| const rect = el.getBoundingClientRect(); | |
| tooltip.style.left = `${rect.left + rect.width/2 - tooltip.offsetWidth/2}px`; | |
| tooltip.style.top = `${rect.top - tooltip.offsetHeight - 5}px`; | |
| tooltip.classList.remove('hidden'); | |
| }); | |
| el.addEventListener('mouseleave', () => { | |
| tooltip.classList.add('hidden'); | |
| }); | |
| }); | |
| }); |