Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Bank Status Dashboard</title> | |
<style> | |
body { font-family: Arial, sans-serif; } | |
#dashboard { margin: 20px; padding: 20px; border: 1px solid #ddd; } | |
.value { font-size: 24px; font-weight: bold; color: #333; } | |
</style> | |
</head> | |
<body> | |
<div id="dashboard"> | |
<h2>Bank Status</h2> | |
<p>Total Earnings: <span id="total_earnings" class="value">0</span> Credits</p> | |
<p>Bank Balance: <span id="bank_balance" class="value">0</span> Credits</p> | |
</div> | |
<script> | |
async function fetchBankStatus() { | |
const response = await fetch('/api/bank_status'); | |
const data = await response.json(); | |
document.getElementById('total_earnings').innerText = data.total_earnings; | |
document.getElementById('bank_balance').innerText = data.bank_balance; | |
} | |
// Lade die Daten alle 5 Sekunden neu | |
setInterval(fetchBankStatus, 5000); | |
fetchBankStatus(); | |
</script> | |
</body> | |
</html> | |