add auth support
This commit is contained in:
File diff suppressed because one or more lines are too long
27
pytorrent/templates/login.html
Normal file
27
pytorrent/templates/login.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>pyTorrent login</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" rel="stylesheet">
|
||||
<link href="{{ static_url('styles.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
<body class="auth-page">
|
||||
<main class="initial-loader-card auth-card">
|
||||
<div class="initial-loader-brand"><i class="fa-solid fa-robot"></i> pyTorrent</div>
|
||||
<div class="auth-lock" aria-hidden="true"><i class="fa-solid fa-lock"></i></div>
|
||||
<h1 class="initial-loader-title">Sign in</h1>
|
||||
<p class="initial-loader-text">Authentication is enabled for this pyTorrent instance.</p>
|
||||
{% if error %}<div class="alert alert-danger auth-alert">{{ error }}</div>{% endif %}
|
||||
<form class="auth-form" method="post">
|
||||
<label class="form-label" for="username">User</label>
|
||||
<input id="username" class="form-control" name="username" autocomplete="username" autofocus>
|
||||
<label class="form-label" for="password">Password</label>
|
||||
<input id="password" class="form-control" name="password" type="password" autocomplete="current-password">
|
||||
<button class="btn btn-primary w-100" type="submit"><i class="fa-solid fa-right-to-bracket"></i> Log in</button>
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user