Files
BitManager/templates/settings.html
OusmBlueNinja 4f87ec2b60 Initial commit: Implements core application
Sets up a Flask-based qBittorrent monitoring and management interface.

This commit introduces the foundational structure, including:

- User authentication with registration and login
- A setup page for initial qBittorrent configuration
- Real-time torrent data polling and display
- Basic UI with dashboards and news feeds
- Configuration settings and user management
- Version checking
2025-06-03 22:56:36 -05:00

175 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Settings</title>
<style>
body {
background: #121212;
color: #eee;
font-family: 'Segoe UI', sans-serif;
margin: 0;
padding: 2rem;
}
nav {
background: #1f1f1f;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
nav a {
color: #80dfff;
text-decoration: none;
font-weight: bold;
font-size: 1.1rem;
}
h1, h2 {
color: #00bcd4;
margin-bottom: 1rem;
}
.section {
background: #1e1e1e;
padding: 1.5rem;
margin-bottom: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
label {
display: block;
margin-top: 0.7rem;
font-size: 0.9rem;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 0.5rem;
margin-top: 0.2rem;
background: #2a2a2a;
color: #eee;
border: 1px solid #444;
border-radius: 5px;
}
button {
margin-top: 1rem;
padding: 0.6rem 1.2rem;
background: #00bcd4;
color: #000;
font-weight: bold;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background: #0097a7;
}
ul {
list-style: none;
padding-left: 0;
}
ul li {
padding: 0.5rem 0;
border-bottom: 1px solid #333;
display: flex;
justify-content: space-between;
align-items: center;
}
form.inline {
display: inline;
}
.admin-badge {
color: #ccc;
font-size: 0.85rem;
margin-left: 5px;
font-style: italic;
}
</style>
</head>
<body>
<nav>
<a href="/">Back to Home</a>
<span>Settings</span>
</nav>
<h1>Settings</h1>
<div class="section">
<h2>qBittorrent Settings</h2>
<form method="POST">
<label>Web UI URL</label>
<input name="url" type="text" value="{{ config.url }}" required>
<label>Username</label>
<input name="username" type="text" value="{{ config.username }}" required>
<label>Password</label>
<input name="password" type="password" value="{{ config.password }}" required>
<button type="submit">Update qBittorrent Config</button>
</form>
</div>
<div class="section">
<h2>Toggle Registration</h2>
<form method="POST">
<input type="hidden" name="toggle_register" value="1">
<button type="submit">
{{ 'Disable' if setting.allow_registration else 'Enable' }} Registration
</button>
</form>
</div>
<div class="section">
<h2>Create New User</h2>
<form method="POST">
<input type="hidden" name="new_user" value="1">
<label>Username</label>
<input name="new_username" type="text" required>
<label>Password</label>
<input name="new_password" type="password" required>
<label>
<input type="checkbox" name="is_admin">
Admin
</label>
<button type="submit">Create User</button>
</form>
</div>
<div class="section">
<h2>Users</h2>
<ul>
{% for user in users %}
<li>
<span>{{ user.username }}
{% if user.is_admin %}
<span class="admin-badge">(Admin)</span>
{% endif %}
</span>
{% if user.username != session['user'] %}
<form method="POST" action="/delete_user/{{ user.id }}" class="inline">
<button type="submit">Delete</button>
</form>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</body>
</html>