fix: mod değişiminde her iki yönde de uyarı
This commit is contained in:
parent
49b9a95f39
commit
0505055e4d
1 changed files with 2 additions and 3 deletions
|
|
@ -263,9 +263,8 @@ function updateModeUI() {
|
|||
|
||||
async function switchMode(mode) {
|
||||
if (mode === currentMode) return;
|
||||
if (mode === 'live') {
|
||||
if (!confirm('Canlı moda geçilecek. Çalışan tüm botlar durdurulacak. Devam edilsin mi?')) return;
|
||||
}
|
||||
const label = mode === 'live' ? 'canlı' : 'testnet';
|
||||
if (!confirm(`${label.charAt(0).toUpperCase() + label.slice(1)} moda geçilecek. Çalışan tüm botlar durdurulacak. Devam edilsin mi?`)) return;
|
||||
await api('POST', '/mode', { mode });
|
||||
currentMode = mode;
|
||||
updateModeUI();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue