Spaces:
Running
Running
| <html lang="ar" dir="rtl"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <!-- PWA Meta Tags --> | |
| <meta name="theme-color" content="#667eea"> | |
| <link rel="manifest" href="/manifest.json"> | |
| <!-- Apple Touch Icons --> | |
| <link rel="apple-touch-icon" sizes="152x152" href="/icons/icon-152x152.png"> | |
| <link rel="apple-touch-icon" sizes="192x192" href="/icons/icon-192x192.png"> | |
| <link rel="apple-touch-icon" sizes="512x512" href="/icons/icon-512x512.png"> | |
| <!-- Apple PWA Meta Tags --> | |
| <meta name="apple-mobile-web-app-capable" content="yes"> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | |
| <meta name="apple-mobile-web-app-title" content="ViScan"> | |
| <!-- Favicon --> | |
| <link rel="icon" type="image/png" sizes="192x192" href="/icons/icon-192x192.png"> | |
| <link rel="icon" type="image/png" sizes="512x512" href="/icons/icon-512x512.png"> | |
| <title>تسجيل الدخول - ViScan</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> | |
| <link rel="stylesheet" href="/css/style.css"> | |
| <script src="/js/config.js"></script> | |
| <style> | |
| .auth-container { | |
| min-height: 100vh; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 2rem 1rem; | |
| } | |
| .auth-card { | |
| max-width: 450px; | |
| width: 100%; | |
| } | |
| .tabs { | |
| display: flex; | |
| gap: 1rem; | |
| margin-bottom: 2rem; | |
| } | |
| .tab { | |
| flex: 1; | |
| padding: 1rem; | |
| background: rgba(255, 255, 255, 0.05); | |
| border: 2px solid rgba(255, 255, 255, 0.1); | |
| border-radius: var(--radius-md); | |
| cursor: pointer; | |
| transition: all var(--transition-base); | |
| text-align: center; | |
| font-weight: 600; | |
| } | |
| .tab.active { | |
| background: var(--primary-gradient); | |
| border-color: var(--primary); | |
| transform: translateY(-2px); | |
| } | |
| .tab-content { | |
| display: none; | |
| } | |
| .tab-content.active { | |
| display: block; | |
| animation: fadeInUp 0.5s ease; | |
| } | |
| .error-message { | |
| background: rgba(238, 90, 111, 0.1); | |
| border: 1px solid var(--danger); | |
| color: var(--danger); | |
| padding: 0.875rem; | |
| border-radius: var(--radius-md); | |
| margin-bottom: 1rem; | |
| display: none; | |
| } | |
| .success-message { | |
| background: rgba(67, 233, 123, 0.1); | |
| border: 1px solid var(--success); | |
| color: var(--success); | |
| padding: 0.875rem; | |
| border-radius: var(--radius-md); | |
| margin-bottom: 1rem; | |
| display: none; | |
| } | |
| .loading { | |
| display: none; | |
| text-align: center; | |
| margin: 1rem 0; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="auth-container"> | |
| <div class="auth-card glass-card"> | |
| <div style="text-align: center; margin-bottom: 2rem;"> | |
| <div class="logo" style="font-size: 3rem; margin-bottom: 0.5rem;">👁️ ViScan</div> | |
| <p class="text-muted">مرحباً بك في نظام تحليل القزحية</p> | |
| </div> | |
| <!-- Tabs --> | |
| <div class="tabs"> | |
| <div class="tab active" onclick="switchTab('login')">تسجيل الدخول</div> | |
| <div class="tab" onclick="switchTab('register')">حساب جديد</div> | |
| </div> | |
| <!-- Messages --> | |
| <div id="errorMessage" class="error-message"></div> | |
| <div id="successMessage" class="success-message"></div> | |
| <div id="loading" class="loading"> | |
| <div class="spinner" style="margin: 0 auto;"></div> | |
| <p style="margin-top: 1rem;">جاري المعالجة...</p> | |
| </div> | |
| <!-- Login Form --> | |
| <div id="loginTab" class="tab-content active"> | |
| <form id="loginForm" onsubmit="handleLogin(event)"> | |
| <div class="form-group"> | |
| <label for="loginEmail">البريد الإلكتروني</label> | |
| <input type="email" id="loginEmail" class="form-control" placeholder="example@domain.com" required> | |
| </div> | |
| <div class="form-group"> | |
| <label for="loginPassword">كلمة المرور</label> | |
| <input type="password" id="loginPassword" class="form-control" placeholder="••••••••" required> | |
| </div> | |
| <button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 1rem;"> | |
| 🔐 تسجيل الدخول | |
| </button> | |
| </form> | |
| <p style="text-align: center; margin-top: 1.5rem; color: var(--text-muted);"> | |
| ليس لديك حساب؟ <a href="#" onclick="switchTab('register')" style="color: var(--primary);">سجل الآن</a> | |
| </p> | |
| </div> | |
| <!-- Register Form --> | |
| <div id="registerTab" class="tab-content"> | |
| <form id="registerForm" onsubmit="handleRegister(event)"> | |
| <div class="form-group"> | |
| <label for="registerUsername">اسم المستخدم</label> | |
| <input type="text" id="registerUsername" class="form-control" placeholder="اختر اسماً فريداً" required minlength="3"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="registerEmail">البريد الإلكتروني</label> | |
| <input type="email" id="registerEmail" class="form-control" placeholder="example@domain.com" required> | |
| </div> | |
| <div class="form-group"> | |
| <label for="registerPassword">كلمة المرور</label> | |
| <input type="password" id="registerPassword" class="form-control" placeholder="6 أحرف على الأقل" required minlength="6"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="registerPasswordConfirm">تأكيد كلمة المرور</label> | |
| <input type="password" id="registerPasswordConfirm" class="form-control" placeholder="أعد إدخال كلمة المرور" required> | |
| </div> | |
| <button type="submit" class="btn btn-primary" style="width: 100%; margin-top: 1rem;"> | |
| ✨ إنشاء حساب جديد | |
| </button> | |
| </form> | |
| <p style="text-align: center; margin-top: 1.5rem; color: var(--text-muted);"> | |
| لديك حساب بالفعل؟ <a href="#" onclick="switchTab('login')" style="color: var(--primary);">سجل الدخول</a> | |
| </p> | |
| </div> | |
| <div style="text-align: center; margin-top: 2rem;"> | |
| <a href="index.html" style="color: var(--text-muted); font-size: 0.875rem;"> | |
| ← العودة للصفحة الرئيسية | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="/js/auth.js"></script> | |
| <!-- Service Worker Registration --> | |
| <script> | |
| if ('serviceWorker' in navigator) { | |
| window.addEventListener('load', () => { | |
| navigator.serviceWorker.register('/service-worker.js') | |
| .then((registration) => { | |
| console.log('✅ Service Worker registered:', registration.scope); | |
| }) | |
| .catch((error) => { | |
| console.error('❌ Service Worker registration failed:', error); | |
| }); | |
| }); | |
| } | |
| </script> | |
| </body> | |
| </html> | |