diff --git a/agent.user.js b/agent.user.js index 2f0f1d1..fa5d052 100644 --- a/agent.user.js +++ b/agent.user.js @@ -633,7 +633,7 @@ GM_log('[TL] 🏁 Welcome to Binance Alpha Farm Agent.'); statusDisplay = '▶️ Running'; break; default: - statusDisplay = '❓ Unknown'; + statusDisplay = AppSettings.getBotStatus(); } // Get server info @@ -663,13 +663,13 @@ GM_log('[TL] 🏁 Welcome to Binance Alpha Farm Agent.'); 🐛 Debug: ${AppSettings.getDebug() ? '✔️ ON' : '❌ OFF'}
- Bot Status: ${statusDisplay} + 🤖 Bot Status: ${statusDisplay}
🌐 Server: ${serverLabel} ${serverConnected}
- 👤 Login:${loginStatus} + 👤 Login: ${loginStatus}
Page: ${pageDisplay} @@ -714,6 +714,18 @@ GM_log('[TL] 🏁 Welcome to Binance Alpha Farm Agent.'); }; } + // Add event listener for bot status toggle button + const botStatusToggleBtn = contentDiv.querySelector('#bot-status-toggle-btn'); + if (botStatusToggleBtn) { + botStatusToggleBtn.onclick = () => { + const currentBotStatus = AppSettings.getBotStatus(); + const newBotStatus = currentBotStatus === AppEnums.BOT_STATUS.IDLE ? AppEnums.BOT_STATUS.RUNNING : AppEnums.BOT_STATUS.IDLE; + AppSettings.setBotStatus(newBotStatus); + // Update the content to reflect the change + AppUi.dashboardOverlay.updateContent(); + }; + } + // Add event listener for server toggle button const serverToggleBtn = contentDiv.querySelector('#server-toggle-btn'); if (serverToggleBtn) {