48ea61cdcc
- Product documentation in docs/products/ - Updated MEMORY.md with product info - quiXzoom Auth Core as AAMOS Identity product
173 lines
7.8 KiB
HTML
173 lines
7.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="sv">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Logga in — quiXzoom</title>
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
<style>
|
|
:root{
|
|
--bg:#F7F7F5;
|
|
--white:#FFFFFF;
|
|
--blue:#0066FF;
|
|
--blue-dark:#0052CC;
|
|
--green:#00C853;
|
|
--text:#1a1a1a;
|
|
--text-body:#3a3a3a;
|
|
--text-muted:#6B6B6B;
|
|
--error:#ff4444;
|
|
--radius:16px;
|
|
--shadow:0 4px 24px rgba(0,0,0,.08);
|
|
}
|
|
*{box-sizing:border-box;margin:0;padding:0}
|
|
body{font-family:-apple-system,BlinkMacSystemFont,'Inter','Helvetica Neue',sans-serif;background:var(--bg);color:var(--text-body);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
|
|
|
|
.login-container{width:100%;max-width:420px}
|
|
.login-card{background:var(--white);border-radius:var(--radius);padding:40px;box-shadow:var(--shadow)}
|
|
|
|
.logo{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:32px;text-decoration:none}
|
|
.logo-icon{width:44px;height:44px;background:var(--blue);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:22px}
|
|
.logo-text{font-size:24px;font-weight:700;color:var(--text);letter-spacing:-.5px}
|
|
.logo-text span{color:var(--blue)}
|
|
|
|
h1{font-size:24px;font-weight:700;color:var(--text);text-align:center;margin-bottom:8px}
|
|
.subtitle{text-align:center;color:var(--text-muted);font-size:15px;margin-bottom:32px}
|
|
|
|
.form-group{margin-bottom:20px}
|
|
label{display:block;font-size:14px;font-weight:500;color:var(--text);margin-bottom:6px}
|
|
input{width:100%;padding:12px 16px;border:1.5px solid rgba(0,0,0,.1);border-radius:10px;font-size:15px;transition:.2s;background:var(--bg)}
|
|
input:focus{outline:none;border-color:var(--blue);background:var(--white)}
|
|
input::placeholder{color:var(--text-muted)}
|
|
|
|
.error{color:var(--error);font-size:13px;margin-top:6px;display:none}
|
|
.error.visible{display:block}
|
|
|
|
.login-btn{width:100%;padding:14px;border-radius:10px;background:var(--blue);color:#fff;border:none;font-size:16px;font-weight:600;cursor:pointer;transition:.2s;margin-top:8px}
|
|
.login-btn:hover{background:var(--blue-dark)}
|
|
.login-btn:disabled{opacity:.6;cursor:not-allowed}
|
|
|
|
.divider{display:flex;align-items:center;gap:16px;margin:24px 0;color:var(--text-muted);font-size:14px}
|
|
.divider::before,.divider::after{content:'';flex:1;height:1px;background:rgba(0,0,0,.1)}
|
|
|
|
.social-btn{width:100%;padding:12px;border-radius:10px;border:1.5px solid rgba(0,0,0,.1);background:var(--white);font-size:15px;font-weight:500;cursor:pointer;transition:.2s;display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:12px}
|
|
.social-btn:hover{background:var(--bg)}
|
|
|
|
.footer{text-align:center;margin-top:24px;font-size:14px;color:var(--text-muted)}
|
|
.footer a{color:var(--blue);text-decoration:none;font-weight:500}
|
|
.footer a:hover{text-decoration:underline}
|
|
|
|
.remember{display:flex;align-items:center;gap:8px;margin-bottom:20px}
|
|
.remember input{width:auto}
|
|
.remember label{margin:0;font-size:14px;color:var(--text-body);font-weight:400}
|
|
|
|
.forgot{text-align:right;margin-bottom:20px}
|
|
.forgot a{color:var(--blue);text-decoration:none;font-size:14px}
|
|
|
|
@media(max-width:480px){
|
|
.login-card{padding:28px 20px}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<div class="login-card">
|
|
<a href="/" class="logo">
|
|
<div class="logo-icon">Q</div>
|
|
<div class="logo-text">qui<span>X</span>zoom</div>
|
|
</a>
|
|
|
|
<h1>Välkommen tillbaka</h1>
|
|
<p class="subtitle">Logga in för att fortsätta samla verkligheten</p>
|
|
|
|
<form id="loginForm">
|
|
<div class="form-group">
|
|
<label for="email">E-post</label>
|
|
<input type="email" id="email" name="email" placeholder="din@email.com" required autofocus>
|
|
<div class="error" id="emailError">Ogiltig e-postadress</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password">Lösenord</label>
|
|
<input type="password" id="password" name="password" placeholder="Ditt lösenord" required>
|
|
<div class="error" id="passwordError">Felaktigt lösenord</div>
|
|
</div>
|
|
|
|
<div class="forgot">
|
|
<a href="/forgot-password">Glömt lösenord?</a>
|
|
</div>
|
|
|
|
<button type="submit" class="login-btn" id="loginBtn">Logga in</button>
|
|
</form>
|
|
|
|
<div class="divider">eller</div>
|
|
|
|
<button class="social-btn" onclick="loginWithApple()">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"/></svg>
|
|
Fortsätt med Apple
|
|
</button>
|
|
|
|
<button class="social-btn" onclick="loginWithGoogle()">
|
|
<svg width="20" height="20" viewBox="0 0 24 24"><path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"/><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>
|
|
Fortsätt med Google
|
|
</button>
|
|
|
|
<div class="footer">
|
|
Har du inget konto? <a href="/register">Registrera dig</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module">
|
|
import { quixzoomAuth } from './sso-client.js';
|
|
|
|
const form = document.getElementById('loginForm');
|
|
const loginBtn = document.getElementById('loginBtn');
|
|
const emailError = document.getElementById('emailError');
|
|
const passwordError = document.getElementById('passwordError');
|
|
|
|
// Get redirect URL from query params
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const redirectUrl = urlParams.get('redirect') || 'https://www.quixzoom.com/mina-sidor';
|
|
|
|
form.addEventListener('submit', async (e) => {
|
|
e.preventDefault();
|
|
|
|
const email = document.getElementById('email').value;
|
|
const password = document.getElementById('password').value;
|
|
|
|
// Reset errors
|
|
emailError.classList.remove('visible');
|
|
passwordError.classList.remove('visible');
|
|
|
|
loginBtn.disabled = true;
|
|
loginBtn.textContent = 'Loggar in...';
|
|
|
|
try {
|
|
await quixzoomAuth.login(email, password, {
|
|
userAgent: navigator.userAgent,
|
|
platform: navigator.platform,
|
|
});
|
|
|
|
// Redirect to intended page
|
|
window.location.href = redirectUrl;
|
|
} catch (error) {
|
|
console.error('Login failed:', error);
|
|
passwordError.textContent = error.message || 'Inloggning misslyckades';
|
|
passwordError.classList.add('visible');
|
|
loginBtn.disabled = false;
|
|
loginBtn.textContent = 'Logga in';
|
|
}
|
|
});
|
|
|
|
// Social login stubs
|
|
window.loginWithApple = () => {
|
|
alert('Apple Login - kommer snart');
|
|
};
|
|
|
|
window.loginWithGoogle = () => {
|
|
alert('Google Login - kommer snart');
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|