Initial commit: LuHost - Luanti Server Management Web Interface
A modern web interface for Luanti (Minetest) server management with ContentDB integration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
63
views/auth/login.ejs
Normal file
63
views/auth/login.ejs
Normal file
@@ -0,0 +1,63 @@
|
||||
<%
|
||||
const body = `
|
||||
<div style="max-width: 400px; margin: 2rem auto;">
|
||||
<div class="card">
|
||||
<div class="card-header" style="text-align: center;">
|
||||
<h2>Login to Luanti Server Manager</h2>
|
||||
<p style="color: var(--text-secondary); margin: 0;">Enter your credentials to access the server management interface</p>
|
||||
</div>
|
||||
|
||||
${typeof error !== 'undefined' ? `
|
||||
<div class="alert alert-danger">
|
||||
<strong>Error:</strong> ${typeof escapeHtml !== 'undefined' ? escapeHtml(error) : error}
|
||||
</div>
|
||||
` : ''}
|
||||
|
||||
${typeof req !== 'undefined' && req.query.message ? `
|
||||
<div class="alert alert-info">
|
||||
${req.query.message}
|
||||
</div>
|
||||
` : ''}
|
||||
|
||||
<form method="POST" action="/login">
|
||||
<input type="hidden" name="redirect" value="${redirectUrl || '/'}">
|
||||
${typeof csrfToken !== 'undefined' && csrfToken ? `<input type="hidden" name="_csrf" value="${csrfToken}">` : ''}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text"
|
||||
id="username"
|
||||
name="username"
|
||||
class="form-control"
|
||||
value="${typeof formData !== 'undefined' ? formData.username || '' : ''}"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password"
|
||||
id="password"
|
||||
name="password"
|
||||
class="form-control"
|
||||
required
|
||||
autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; align-items: center; margin-top: 2rem;">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Sign In
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; margin-top: 1rem; color: var(--text-secondary); font-size: 0.875rem;">
|
||||
<p>Need an account? Contact an existing administrator to create one for you.</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
%>
|
||||
|
||||
<%- include('../layout', { body: body, currentPage: 'login', title: title }) %>
|
Reference in New Issue
Block a user