revert and farm fix
This commit is contained in:
@@ -242,6 +242,15 @@
|
||||
<!-- Status banner -->
|
||||
<div class="status-bar" id="status-bar"></div>
|
||||
|
||||
<!-- Warehouse-full notice (hidden by default) -->
|
||||
<div id="warehouse-full-banner" style="display:none; background: linear-gradient(90deg, #5a1a00, #8b2500); border: 1px solid #ff6600; border-radius: 8px; padding: 12px 18px; margin-bottom: 1rem; display: flex; align-items: center; gap: 12px; font-weight: 600;">
|
||||
<span style="font-size: 1.4rem;">📦</span>
|
||||
<span>
|
||||
<strong style="color:#ff9933;">Αποθήκη Γεμάτη!</strong>
|
||||
Όλες οι αποθήκες είναι >95% — το bot παρακάμπτει τη λεηλασία μέχρι να αδειάσει χώρος.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Control Panel -->
|
||||
<div class="panel">
|
||||
<h2>⚙️ Ρυθμίσεις</h2>
|
||||
@@ -505,12 +514,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
// -- Warehouse full notice --
|
||||
async function checkWarehouseStatus() {
|
||||
try {
|
||||
const res = await fetch(`/api/farm_status?player_id=${PLAYER_ID}`);
|
||||
const data = await res.json();
|
||||
const banner = document.getElementById('warehouse-full-banner');
|
||||
if (banner) banner.style.display = data.warehouse_full ? 'flex' : 'none';
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
// -- Boot --
|
||||
loadSettings();
|
||||
loadFarmData();
|
||||
checkOnline();
|
||||
checkWarehouseStatus();
|
||||
setInterval(loadFarmData, 15000);
|
||||
setInterval(checkOnline, 20000);
|
||||
setInterval(checkWarehouseStatus, 20000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user