why is it that i cant log in through the exchange link - Initial Deployment
Browse files- index.html +97 -2
- prompts.txt +1 -0
index.html
CHANGED
|
@@ -175,11 +175,38 @@
|
|
| 175 |
</div>
|
| 176 |
<div class="flex items-center space-x-2 sm:space-x-6">
|
| 177 |
<div class="relative group">
|
| 178 |
-
<button class="btn btn-primary flex items-center space-x-2 px-3 py-2 rounded-lg transition min-w-[150px]">
|
| 179 |
<span class="btn-text">Connect Exchange</span>
|
| 180 |
<i class="fas fa-exchange-alt btn-icon"></i>
|
| 181 |
</button>
|
| 182 |
-
<div class="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
<a href="#" class="block px-4 py-2 hover:bg-gray-700 rounded-t-lg"><i class="fab fa-bitcoin mr-2"></i> Binance</a>
|
| 184 |
<a href="#" class="block px-4 py-2 hover:bg-gray-700"><i class="fab fa-ethereum mr-2"></i> Coinbase</a>
|
| 185 |
<a href="#" class="block px-4 py-2 hover:bg-gray-700"><i class="fas fa-chart-line mr-2"></i> Kraken</a>
|
|
@@ -888,6 +915,74 @@
|
|
| 888 |
}, 2000);
|
| 889 |
});
|
| 890 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 891 |
// Simulate real-time signal updates
|
| 892 |
const symbols = ['BTC/USDT', 'ETH/USDT', 'AAPL', 'EUR/USD', 'TSLA', 'MSFT', 'XAU/USD', 'AMZN'];
|
| 893 |
const timeframes = ['1m', '5m', '15m', '1h', '4h', '1d'];
|
|
|
|
| 175 |
</div>
|
| 176 |
<div class="flex items-center space-x-2 sm:space-x-6">
|
| 177 |
<div class="relative group">
|
| 178 |
+
<button id="connect-exchange-btn" class="btn btn-primary flex items-center space-x-2 px-3 py-2 rounded-lg transition min-w-[150px]">
|
| 179 |
<span class="btn-text">Connect Exchange</span>
|
| 180 |
<i class="fas fa-exchange-alt btn-icon"></i>
|
| 181 |
</button>
|
| 182 |
+
<div id="exchange-connect-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 183 |
+
<div class="bg-gray-800 rounded-lg p-6 w-96">
|
| 184 |
+
<h3 class="text-xl font-bold mb-4">Connect to Exchange</h3>
|
| 185 |
+
<div class="space-y-4">
|
| 186 |
+
<div>
|
| 187 |
+
<label class="block text-sm mb-1">Exchange</label>
|
| 188 |
+
<select id="exchange-select" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-3 py-2">
|
| 189 |
+
<option value="binance">Binance</option>
|
| 190 |
+
<option value="coinbase">Coinbase</option>
|
| 191 |
+
<option value="kraken">Kraken</option>
|
| 192 |
+
</select>
|
| 193 |
+
</div>
|
| 194 |
+
<div>
|
| 195 |
+
<label class="block text-sm mb-1">API Key</label>
|
| 196 |
+
<input type="text" id="api-key" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-3 py-2" placeholder="Enter API Key">
|
| 197 |
+
</div>
|
| 198 |
+
<div>
|
| 199 |
+
<label class="block text-sm mb-1">API Secret</label>
|
| 200 |
+
<input type="password" id="api-secret" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-3 py-2" placeholder="Enter API Secret">
|
| 201 |
+
</div>
|
| 202 |
+
<div class="flex space-x-3">
|
| 203 |
+
<button id="exchange-connect-submit" class="btn btn-primary flex-1 py-2">Connect</button>
|
| 204 |
+
<button id="exchange-connect-cancel" class="btn btn-danger flex-1 py-2">Cancel</button>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
</div>
|
| 209 |
+
<div class="absolute right-0 mt-2 w-64 bg-gray-800 rounded-lg shadow-xl z-40 hidden group-hover:block">
|
| 210 |
<a href="#" class="block px-4 py-2 hover:bg-gray-700 rounded-t-lg"><i class="fab fa-bitcoin mr-2"></i> Binance</a>
|
| 211 |
<a href="#" class="block px-4 py-2 hover:bg-gray-700"><i class="fab fa-ethereum mr-2"></i> Coinbase</a>
|
| 212 |
<a href="#" class="block px-4 py-2 hover:bg-gray-700"><i class="fas fa-chart-line mr-2"></i> Kraken</a>
|
|
|
|
| 915 |
}, 2000);
|
| 916 |
});
|
| 917 |
|
| 918 |
+
// Exchange Connection Handling
|
| 919 |
+
document.getElementById('connect-exchange-btn').addEventListener('click', function() {
|
| 920 |
+
document.getElementById('exchange-connect-modal').classList.remove('hidden');
|
| 921 |
+
});
|
| 922 |
+
|
| 923 |
+
document.getElementById('exchange-connect-cancel').addEventListener('click', function() {
|
| 924 |
+
document.getElementById('exchange-connect-modal').classList.add('hidden');
|
| 925 |
+
});
|
| 926 |
+
|
| 927 |
+
document.getElementById('exchange-connect-submit').addEventListener('click', async function() {
|
| 928 |
+
const exchange = document.getElementById('exchange-select').value;
|
| 929 |
+
const apiKey = document.getElementById('api-key').value;
|
| 930 |
+
const apiSecret = document.getElementById('api-secret').value;
|
| 931 |
+
|
| 932 |
+
if (!apiKey || !apiSecret) {
|
| 933 |
+
alert('Please enter both API Key and Secret');
|
| 934 |
+
return;
|
| 935 |
+
}
|
| 936 |
+
|
| 937 |
+
// Show loading state
|
| 938 |
+
this.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Connecting...';
|
| 939 |
+
this.disabled = true;
|
| 940 |
+
|
| 941 |
+
try {
|
| 942 |
+
// In a real app, this would call your backend API to verify credentials
|
| 943 |
+
// Here we simulate a successful connection
|
| 944 |
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 945 |
+
|
| 946 |
+
// Update UI to show connected state
|
| 947 |
+
document.getElementById('exchange-connect-modal').classList.add('hidden');
|
| 948 |
+
const connectBtn = document.getElementById('connect-exchange-btn');
|
| 949 |
+
connectBtn.innerHTML = `
|
| 950 |
+
<span class="btn-text">Connected to ${exchange}</span>
|
| 951 |
+
<i class="fas fa-check-circle btn-icon"></i>
|
| 952 |
+
`;
|
| 953 |
+
connectBtn.classList.add('bg-success', 'hover:bg-success');
|
| 954 |
+
connectBtn.classList.remove('btn-primary');
|
| 955 |
+
|
| 956 |
+
// Store connection status (in real app would use proper state management)
|
| 957 |
+
localStorage.setItem('exchangeConnection', JSON.stringify({
|
| 958 |
+
exchange,
|
| 959 |
+
connected: true,
|
| 960 |
+
timestamp: new Date().toISOString()
|
| 961 |
+
}));
|
| 962 |
+
} catch (error) {
|
| 963 |
+
alert('Connection failed: ' + (error.message || 'Invalid API credentials'));
|
| 964 |
+
this.innerHTML = 'Connect';
|
| 965 |
+
this.disabled = false;
|
| 966 |
+
}
|
| 967 |
+
});
|
| 968 |
+
|
| 969 |
+
// Check for existing connection on page load
|
| 970 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 971 |
+
const savedConnection = localStorage.getItem('exchangeConnection');
|
| 972 |
+
if (savedConnection) {
|
| 973 |
+
const { exchange, connected } = JSON.parse(savedConnection);
|
| 974 |
+
if (connected) {
|
| 975 |
+
const connectBtn = document.getElementById('connect-exchange-btn');
|
| 976 |
+
connectBtn.innerHTML = `
|
| 977 |
+
<span class="btn-text">Connected to ${exchange}</span>
|
| 978 |
+
<i class="fas fa-check-circle btn-icon"></i>
|
| 979 |
+
`;
|
| 980 |
+
connectBtn.classList.add('bg-success', 'hover:bg-success');
|
| 981 |
+
connectBtn.classList.remove('btn-primary');
|
| 982 |
+
}
|
| 983 |
+
}
|
| 984 |
+
});
|
| 985 |
+
|
| 986 |
// Simulate real-time signal updates
|
| 987 |
const symbols = ['BTC/USDT', 'ETH/USDT', 'AAPL', 'EUR/USD', 'TSLA', 'MSFT', 'XAU/USD', 'AMZN'];
|
| 988 |
const timeframes = ['1m', '5m', '15m', '1h', '4h', '1d'];
|
prompts.txt
CHANGED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
why is it that i cant log in through the exchange link
|