121 lines
4.3 KiB
HTML
121 lines
4.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Login — vSphere Backup Manager{% endblock %}
|
|
|
|
{% block head %}
|
|
<style>
|
|
body { align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, #171b2a 0%, var(--bg-base) 70%); }
|
|
.login-wrap {
|
|
width: 100%;
|
|
max-width: 460px;
|
|
padding: 24px;
|
|
animation: fadeUp .5s cubic-bezier(0.16, 1, 0.3, 1);
|
|
}
|
|
@keyframes fadeUp {
|
|
from { opacity: 0; transform: translateY(24px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
.login-header { text-align: center; margin-bottom: 36px; }
|
|
.login-icon {
|
|
width: 72px; height: 72px;
|
|
background: var(--accent-gradient);
|
|
border-radius: 20px;
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 36px;
|
|
margin: 0 auto 20px;
|
|
box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
.login-wrap:hover .login-icon {
|
|
transform: scale(1.05) rotate(3deg);
|
|
}
|
|
.login-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
|
|
.login-header p { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
|
|
.login-card {
|
|
background: rgba(14, 17, 26, 0.45);
|
|
border: 1px solid var(--border);
|
|
border-radius: 20px;
|
|
padding: 32px 36px;
|
|
backdrop-filter: blur(24px);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.divider {
|
|
height: 1px;
|
|
background: var(--border);
|
|
margin: 24px 0;
|
|
}
|
|
.login-footer { text-align: center; margin-top: 24px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
|
|
.btn-login {
|
|
width: 100%;
|
|
justify-content: center;
|
|
padding: 12px;
|
|
font-size: 15px;
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="login-wrap">
|
|
<div class="login-header">
|
|
<div class="login-icon">
|
|
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="color: #ffffff; display: block;">
|
|
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
|
|
<path d="M8 11a4 4 0 0 1 6-3.46M16 13a4 4 0 0 1-6 3.46"/>
|
|
<path d="M12 6h2v2"/>
|
|
<path d="M12 18H10v-2"/>
|
|
</svg>
|
|
</div>
|
|
<h1>vSphere Backup Manager</h1>
|
|
<p>Connect to your vCenter or ESXi host to get started</p>
|
|
</div>
|
|
|
|
<div class="login-card">
|
|
<form method="post" action="/login" id="loginForm">
|
|
<div class="form-group">
|
|
<label class="form-label" for="host">vCenter / ESXi Host</label>
|
|
<input id="host" class="form-control" type="text" name="host"
|
|
placeholder="e.g. 192.168.1.10 or vcenter.corp.local"
|
|
value="{{ request.form.get('host', '') }}" required autocomplete="off" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label" for="user">Username</label>
|
|
<input id="user" class="form-control" type="text" name="user"
|
|
placeholder="e.g. administrator@vsphere.local"
|
|
value="{{ request.form.get('user', '') }}" required autocomplete="username" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label" for="password">Password</label>
|
|
<input id="password" class="form-control" type="password" name="password"
|
|
placeholder="••••••••••" required autocomplete="current-password" />
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<div class="form-check">
|
|
<input type="checkbox" id="no_verify_ssl" name="no_verify_ssl"
|
|
{% if request.form.get('no_verify_ssl') %}checked{% endif %} />
|
|
<label for="no_verify_ssl">Skip SSL certificate verification</label>
|
|
</div>
|
|
|
|
<button id="loginBtn" type="submit" class="btn btn-primary btn-login" style="margin-top:20px;">
|
|
<span id="loginBtnText">🔐 Connect to vCenter</span>
|
|
<span id="loginBtnSpinner" class="spinner" style="display:none;"></span>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="login-footer">Credentials are stored only in your browser session</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
document.getElementById('loginForm').addEventListener('submit', function() {
|
|
document.getElementById('loginBtnText').textContent = 'Connecting…';
|
|
document.getElementById('loginBtnSpinner').style.display = 'inline-block';
|
|
document.getElementById('loginBtn').disabled = true;
|
|
});
|
|
</script>
|
|
{% endblock %}
|