-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.html
154 lines (144 loc) · 6.06 KB
/
setup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bot Setup</title>
<link rel="stylesheet" href="styles.css">
<script src="setup.js" defer></script>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #000;
color: #fff;
margin: 0;
line-height: 1.6;
}
header {
background: #4CAF50;
color: #fff;
padding: 20px 0;
text-align: center;
}
.container {
width: 90%;
max-width: 800px;
margin: auto;
padding: 20px;
}
.section {
background: #1a1a1a;
padding: 15px;
margin: 10px 0;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.status {
font-weight: bold;
margin-top: 10px;
}
input[type="text"], select {
width: calc(100% - 20px);
padding: 10px;
margin: 5px 0;
border-radius: 5px;
border: 1px solid #4CAF50;
background: #333;
color: #fff;
}
input::placeholder {
color: #ccc;
}
button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<header>
<h1>Bot Setup</h1>
</header>
<div class="container">
<div id="setup-progress" class="status">Setup Progress: 0 out of 10</div>
<form id="bot-setup-form">
<div id="bot-sections">
<!-- 10 bot setup sections will be generated here -->
</div>
<button type="submit">Save Setup</button>
</form>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
const form = document.getElementById('bot-setup-form');
const botSections = document.getElementById('bot-sections');
const setupProgress = document.getElementById('setup-progress');
const bots = [
"Ethereum Bot 1", "Ethereum Bot 2", "Bitcoin Bot 1",
"Solana Bot 1", "Ethereum Bot 3", "Cardano Bot 1",
"Polkadot Bot 1", "Litecoin Bot 1", "Dogecoin Bot 1",
"Ripple Bot 1"
];
const exchanges = ["Binance", "Coinbase", "Kraken", "Bitfinex", "Huobi", "Bittrex", "KuCoin", "Gemini", "Gate.io", "OKEx"];
const usedBots = new Set();
for (let i = 0; i < 10; i++) {
const section = document.createElement('div');
section.className = 'section';
section.innerHTML = `
<h3>Bot Setup ${i + 1}</h3>
<label for="bot-select-${i}">Select Bot:</label>
<select id="bot-select-${i}" required>
<option value="">Select a bot</option>
${bots.map(bot => `<option value="${bot}">${bot}</option>`).join('')}
</select>
<label for="exchange-select-${i}">Select Exchange:</label>
<select id="exchange-select-${i}" required>
<option value="">Select an exchange</option>
${exchanges.map(exchange => `<option value="${exchange}">${exchange}</option>`).join('')}
</select>
<label for="api-key-${i}">API Key:</label>
<input type="text" id="api-key-${i}" placeholder="Enter API Key" required>
<label for="wallet-address-${i}">Wallet Address:</label>
<input type="text" id="wallet-address-${i}" placeholder="Enter Wallet Address" required>
<label for="receiving-wallet-${i}">Receiving Wallet Address:</label>
<input type="text" id="receiving-wallet-${i}" placeholder="Enter Receiving Wallet" required>
<label for="deposit-address-${i}">Deposit Address:</label>
<input type="text" id="deposit-address-${i}" placeholder="Enter Deposit Address" required>
<div class="status" id="status-${i}"></div>
`;
botSections.appendChild(section);
}
form.addEventListener('submit', (e) => {
e.preventDefault();
let completed = 0;
for (let i = 0; i < 10; i++) {
const botSelect = document.getElementById(`bot-select-${i}`);
const exchangeSelect = document.getElementById(`exchange-select-${i}`);
const apiKey = document.getElementById(`api-key-${i}`).value.trim();
const walletAddress = document.getElementById(`wallet-address-${i}`).value.trim();
const receivingWallet = document.getElementById(`receiving-wallet-${i}`).value.trim();
const depositAddress = document.getElementById(`deposit-address-${i}`).value.trim();
const selectedBot = botSelect.value;
const selectedExchange = exchangeSelect.value;
if (selectedBot && !usedBots.has(selectedBot) && selectedExchange) {
usedBots.add(selectedBot);
document.getElementById(`status-${i}`).innerText = `${selectedBot} setup successfully!`;
completed++;
} else {
document.getElementById(`status-${i}`).innerText = `Error: Invalid setup or bot already used.`;
}
}
setupProgress.innerText = `Setup Progress: ${completed} out of 10`;
form.reset();
});
});
</script>
</body>
</html>