This commit is contained in:
DengDai
2025-12-08 14:31:21 +08:00
commit ad2c65affb
35 changed files with 3500 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
{% extends "base.html" %}
{% block title %}修改密码 - PT Manager{% endblock %}
{% block page_title %}修改密码{% endblock %}
{% block content %}
<div class="bg-white rounded-lg shadow-md p-6 max-w-2xl mx-auto">
<h2 class="text-xl font-semibold mb-6">修改账户密码</h2>
{% if error %}
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4">
{{ error }}
</div>
{% endif %}
<form method="POST">
<div class="mb-4">
<label for="current_password" class="block text-gray-700 text-sm font-bold mb-2">当前密码</label>
<input type="password" id="current_password" name="current_password" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-4">
<label for="new_password" class="block text-gray-700 text-sm font-bold mb-2">新密码</label>
<input type="password" id="new_password" name="new_password" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label for="confirm_password" class="block text-gray-700 text-sm font-bold mb-2">确认新密码</label>
<input type="password" id="confirm_password" name="confirm_password" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="flex items-center justify-between">
<button type="submit"
class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
修改密码
</button>
<a href="{{ url_for('main.index') }}"
class="inline-block align-baseline font-bold text-sm text-blue-600 hover:text-blue-800">
返回首页
</a>
</div>
</form>
</div>
{% endblock %}

37
templates/auth/login.html Normal file
View File

@@ -0,0 +1,37 @@
{% extends "base.html" %}
{% block title %}登录 - PT Manager{% endblock %}
{% block content %}
<div class="flex items-center justify-center min-h-full">
<div class="bg-white p-8 rounded-lg shadow-md w-full max-w-md">
<div class="text-center mb-6">
<h1 class="text-2xl font-bold text-gray-800">PT Manager</h1>
<p class="text-gray-600">请登录您的账户</p>
</div>
{% if error %}
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4">
{{ error }}
</div>
{% endif %}
<form method="POST">
<div class="mb-4">
<label for="username" class="block text-gray-700 text-sm font-bold mb-2">用户名</label>
<input type="text" id="username" name="username" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="mb-6">
<label for="password" class="block text-gray-700 text-sm font-bold mb-2">密码</label>
<input type="password" id="password" name="password" required
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button type="submit"
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
登录
</button>
</form>
</div>
</div>
{% endblock %}