File size: 17,688 Bytes
7b29271 af58743 7b29271 af58743 7b29271 af58743 7b29271 af58743 7b29271 | 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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Identity Verification | MALiPo</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.verification-gradient {
background: linear-gradient(135deg, #6e00ff 0%, #00d1ff 100%);
}
.verification-card {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.step-indicator {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
margin-right: 12px;
}
.step-active {
background: linear-gradient(135deg, #6e00ff 0%, #00d1ff 100%);
color: white;
}
.step-inactive {
background-color: #e5e7eb;
color: #6b7280;
}
.step-completed {
background-color: #10b981;
color: white;
}
.upload-area {
border: 2px dashed #d1d5db;
border-radius: 8px;
padding: 40px;
text-align: center;
transition: all 0.3s ease;
}
.upload-area:hover {
border-color: #6e00ff;
background-color: #f9fafb;
}
.camera-container {
width: 100%;
max-width: 400px;
height: 300px;
background-color: #f3f4f6;
border-radius: 8px;
overflow: hidden;
margin: 0 auto;
}
#video {
width: 100%;
height: 100%;
object-fit: cover;
}
#canvas {
display: none;
}
</style>
</head>
<body class="font-sans antialiased text-gray-900">
<!-- Navigation -->
<nav class="bg-white shadow-sm fixed w-full z-50">
<div class="max-w-7xl mx-auto px-4 sm极速:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="zap" class="h-8 w-8 text-indigo-600"></i>
<span class="ml-2 text-xl font-bold text-gray-900">MALiPo</span>
</div>
</div>
<div class="flex items-center">
<a href="index.html" class="text-gray-500 hover:text-indigo-600 px-4 py-2 text-sm font-medium">Back to Home</a>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="min-h-screen pt-20 pb-12 verification-gradient">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
<!-- Progress Steps -->
<div class="bg-white rounded-lg p-6 mb-8 verification-card">
<h2 class="text-2xl font-bold text-gray-900 mb-6">Complete Your Verification</h2>
<div class="space-y-6">
<!-- Step 1: Email Verification -->
<div class="flex items-center">
<div class="step-indicator step-completed">
<i data-feather="check" class="h-5 w-5"></i>
</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-900">Email Verification</h3>
<p class="text-sm text-gray-600">Verification email sent to your address</p>
</div>
<span class="px-3 py-1 text-xs font-semibold text-green-800 bg-green-100 rounded-full">Completed</span>
</div>
<!-- Step 2: ID Upload -->
<div class="flex items-center">
<div class="step-indicator step-active">2</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-900">ID Document Upload</h3>
<p class="text-sm text-gray-600">Upload government-issued ID</p>
</div>
<span class="px-3 py-1 text-xs font-semibold text-blue-800 bg-blue-100 rounded-full">In Progress</span>
</div>
<!-- Step 3: Facial Recognition -->
<div class="flex items-center">
<div class="step-indicator step-inactive">3</div>
<div class="flex-1">
<h3 class="font-semibold text-gray-900">Facial Recognition</h3>
<p class="text-sm text-gray-600">Verify your identity with facial recognition</p>
</div>
<span class="px-3 py-1 text-xs font-semibold text-gray-800 bg-gray-100 rounded-full">Pending</span>
</div>
</div>
</div>
<!-- ID Upload Section -->
<div class="bg-white rounded-lg p-6 verification-card">
<h3 class="text-xl font-semibold text-gray-900 mb-4">Upload Your ID Document</h3>
<p class="text-gray-600 mb-6">Please upload a clear photo of one of the following documents:</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
<div class="text-center p-4 border border-gray-200 rounded-lg hover:border-indigo-300 transition-colors">
<i data-feather="credit-card" class="h-8 w-8 text-indigo-600 mx-auto mb-2"></i>
<p class="text-sm font-medium">Passport</p>
</div>
<div class="text-center p-4 border border-gray-200 rounded-lg hover:border-indigo-300 transition-colors">
<div class="w-16 h-10 mx-auto mb-2 bg-indigo-100 rounded-md flex items-center justify-center relative">
<div class="w-12 h-8 bg-white border border-gray-300 rounded-sm flex flex-col items-center justify-center">
<div class="w-8 h-1 bg-gray-400 mb-1"></div>
<div class="w-6 h-1 bg-gray-400 mb-1"></div>
<div class="w-10 h-4 bg-indigo-200 rounded-sm flex items-center justify-center">
<div class="w-8 h-3 bg-white border border-gray-300"></div>
</div>
</div>
</div>
<p class="text-sm font-medium">Driver's License</p>
</div>
<div class="text-center p-4 border border-gray-200 rounded-lg hover:border-indigo-300 transition-colors">
<i data-feather="file-text" class="h-8极速-8 text-indigo-600 mx-auto mb-2"></i>
<p class="text-sm font-medium">National ID</p>
</div>
</div>
<!-- Upload Area -->
<div class="upload-area mb-6" id="uploadArea">
<i data-feather="upload-cloud" class="h-12 w-12 text-gray-400 mx-auto mb-4"></i>
<p class="text-lg font-medium text-gray-900 mb-2">Drag & drop your file here</p>
<p class="text-sm text-gray-600 mb-4">or click to browse</p>
<input type="file" id="idUpload" accept="image/*,.pdf" class="hidden">
<button type="button" onclick="document.getElementById('idUpload').click()" class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700">
Choose File
</button>
</div>
<!-- Upload Requirements -->
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
<h4 class="font-medium text-yellow-800 mb-2">Important Requirements:</h4>
<ul class="text-sm text-yellow-700 space-y-1">
<li>• Document must be valid and not expired</li>
<li>• All four corners must be visible</li>
<li>• Photo must be clear and readable</li>
<li>• File size must be less than 10MB</li>
<li>• Accepted formats: JPG, PNG, PDF</li>
</ul>
</div>
<!-- Preview and Submit -->
<div class="mt-6 flex justify-end space-x-4">
<button type="button" id="skipVerification" class="px-6 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50">
Skip for Now
</button>
<button type="button" id="submitId" disabled class="px极速-6 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 disabled:opacity-50 disabled:cursor-not-allowed">
Continue to Facial Recognition
</button>
</div>
</div>
<!-- Facial Recognition Section (Hidden initially) -->
<div class="bg-white rounded-lg p-6 verification-card hidden" id="facialRecognitionSection">
<h3 class="text-xl font-semibold text-gray-900 mb-4">Facial Recognition Verification</h3>
<p class="text-gray-600 mb-6">Please allow camera access to verify your identity.</p>
<div class="camera-container mb-6">
<video id="video" autoplay playsinline></video>
<canvas id="canvas"></canvas>
</div>
<div class="text-center mb-6">
<button type="button" id="startCamera" class="px-6 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700">
Start Camera
</button>
<button type="button" id="capturePhoto" class="px-6 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 hidden">
Capture Photo
</button>
<button type="button" id="retakePhoto" class="px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 hidden">
Retake
</button>
</div>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6">
<h4 class="font-medium text-blue-800 mb-2">Tips for best results:</h4>
<ul class="text-sm text-blue-700 space-y-1">
<li>• Ensure good lighting on your face</li>
<li>• Remove sunglasses or hats</li>
<li>• Look directly at the camera</li>
<li>• Keep a neutral expression</li>
</ul>
</div>
<div class="flex justify-end">
<button type="button" id="completeVerification" class="px-6 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 hidden">
Complete Verification
</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-50">
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
<div class="text-center">
<p class="text-sm text-gray-600">
© 2023 MALiPo. All rights reserved.
<a href="#" class="text-indigo-600 hover:text-indigo-500">Privacy Policy</a> •
<a href="#" class="text-indigo-600 hover:text-indigo-500">Terms of Service</a>
</p>
</div>
</div>
</footer>
<script>
feather.replace();
// File upload handling
const uploadArea = document.getElementById('uploadArea');
const idUpload = document.getElementById('idUpload');
const submitId = document.getElementById('submitId');
const facialRecognitionSection = document.getElementById('facialRecognitionSection');
idUpload.addEventListener('change', function(e) {
const file = e.target.files[0];
if (file) {
// Validate file size
if (file.size > 10 * 1024 * 1024) {
alert('File size must be less than 10MB');
return;
}
// Validate file type
const validTypes = ['image/jpeg', 'image/png', 'application/pdf'];
if (!validTypes.includes(file.type)) {
alert('Please upload a JPG, PNG, or PDF file');
return;
}
// Update UI
uploadArea.innerHTML = `
<i data-feather="check-circle" class="h-12 w-12 text-green-600 mx-auto mb-4"></i>
<p class="text-lg font-medium text-gray-900 mb-2">File Uploaded Successfully</p>
<p class="text-sm text-gray-600">${file.name}</p>
`;
feather.replace();
submitId.disabled = false;
}
});
submitId.addEventListener('click', function() {
facialRecognitionSection.classList.remove('hidden');
this.closest('.verification-card').scrollIntoView({ behavior: 'smooth' });
});
// Camera functionality
const video = document.getElementById('video');
const canvas = document.getElementById('canvas');
const startCamera = document.getElementById('startCamera');
const capturePhoto = document.getElementById('capturePhoto');
const retakePhoto = document.getElementById('retakePhoto');
const completeVerification = document.getElementById('completeVerification');
let stream = null;
startCamera.addEventListener('click', async function() {
try {
stream = await navigator.mediaDevices.getUserMedia({
video: {
facingMode: 'user',
width: { ideal: 1280 },
height: { ideal: 720 }
}
});
video.srcObject = stream;
startCamera.classList.add('hidden');
capturePhoto.classList.remove('hidden');
} catch (error) {
alert('Error accessing camera: ' + error.message);
}
});
capturePhoto.addEventListener('click', function() {
const context = canvas.getContext('2d');
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
context.drawImage(video, 0, 0, canvas.width, canvas.height);
// Stop camera stream
if (stream) {
stream.getTracks().forEach(track => track.stop());
}
capturePhoto.classList.add('hidden');
retakePhoto.classList.remove('hidden');
completeVerification.classList.remove('hidden');
});
retakePhoto.addEventListener('click', function() {
// Clear canvas
const context = canvas.getContext('2d');
context.clearRect(0, 0, canvas.width, canvas.height);
// Restart camera
startCamera.click();
retakePhoto.classList.add('hidden');
completeVerification.classList.add('hidden');
});
completeVerification.addEventListener('click', function() {
alert('Verification process completed! Your account is now being reviewed.');
// In a real application, this would submit the data to the server
window.location.href = 'index.html'; // Redirect to home after completion
});
// Skip verification handling
document.getElementById('skipVerification').addEventListener('click', function() {
if (confirm('If you skip verification now, your account will be restricted from major platform features including transactions. You can complete verification later from your account settings. Continue?')) {
alert('Account verification skipped. Your account has been created with restricted access. Please complete verification to unlock full functionality.');
window.location.href = 'index.html'; // Redirect to home
}
});
// Drag and drop functionality
uploadArea.addEventListener('dragover', function(e) {
e.preventDefault();
uploadArea.style.borderColor = '#6e00ff';
uploadArea.style.backgroundColor = '#f9fafb';
});
uploadArea.addEventListener('dragleave', function(e) {
e.preventDefault();
uploadArea.style.borderColor = '#d1d5db';
uploadArea.style.backgroundColor = 'transparent';
});
uploadArea.addEventListener('drop', function(e) {
e.preventDefault();
uploadArea.style.borderColor = '#d1d5db';
uploadArea.style.backgroundColor = 'transparent';
const files = e.dataTransfer.files;
if (files.length > 0) {
idUpload.files = files;
idUpload.dispatchEvent(new Event('change'));
}
});
</script>
</body>
</html> |