captcha block fix ?
This commit is contained in:
@@ -275,8 +275,11 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="save-btn" id="save-btn" onclick="saveSettings()">💾 Αποθήκευση</button>
|
||||
<span class="save-status" id="save-status">✓ Αποθηκεύτηκε</span>
|
||||
<div style="display: flex; gap: 1rem; align-items: center;">
|
||||
<button class="save-btn" id="save-btn" onclick="saveSettings()">💾 Αποθήκευση</button>
|
||||
<button class="save-btn" id="manual-loot-btn" onclick="triggerManualLoot()" style="background: linear-gradient(135deg, #2a5a7a, #4a9ccc);">🌾 Λεηλασία Τώρα</button>
|
||||
<span class="save-status" id="save-status">✓ Στάλθηκε</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Farm Upgrade Panel -->
|
||||
@@ -475,6 +478,33 @@
|
||||
});
|
||||
}
|
||||
|
||||
// -- Trigger Manual Loot --
|
||||
function triggerManualLoot() {
|
||||
const btn = document.getElementById('manual-loot-btn');
|
||||
const originalText = btn.innerText;
|
||||
btn.innerText = '⏳ Αποστολή...';
|
||||
btn.disabled = true;
|
||||
|
||||
fetch('/dashboard/commands', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
player_id: PLAYER_ID,
|
||||
town_id: 0,
|
||||
type: 'farm_loot',
|
||||
payload: { loot_option: selectedOption }
|
||||
})
|
||||
})
|
||||
.then(r => r.json())
|
||||
.then(() => {
|
||||
btn.innerText = '✓ Εστάλη!';
|
||||
setTimeout(() => {
|
||||
btn.innerText = originalText;
|
||||
btn.disabled = false;
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
// -- Boot --
|
||||
loadSettings();
|
||||
loadFarmData();
|
||||
|
||||
Reference in New Issue
Block a user