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,90 @@
{% extends "base.html" %}
{% block title %}个人信息 - PT Manager{% endblock %}
{% block page_title %}个人信息{% endblock %}
{% block content %}
<div class="bg-white rounded-lg shadow-md p-6">
<!-- 站点选择器 -->
{% if sites and sites|length > 1 %}
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-1">选择站点</label>
<div class="flex flex-wrap gap-2">
{% for site in sites %}
<a href="{{ url_for('site.profile', site_id=site.id) }}"
class="px-3 py-1 rounded text-sm {% if site.id == current_site_id %}bg-blue-600 text-white{% else %}bg-gray-200 text-gray-700 hover:bg-gray-300{% endif %}">
{{ site.name }}
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% if error %}
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4">
{{ error }}
</div>
<a href="{{ url_for('site.site_index') }}"
class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded">
返回站点管理
</a>
{% elif profile %}
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 class="text-lg font-medium mb-4">基本信息</h3>
<div class="space-y-3">
<div class="flex">
<span class="w-32 text-gray-600">用户名:</span>
<span class="font-medium">{{ profile.data.data.username }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">用户ID:</span>
<span class="font-medium">{{ profile.data.data.id }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">注册时间:</span>
<span class="font-medium">{{ profile.data.data.added_human }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">上传量:</span>
<span class="font-medium">{{ profile.data.data.uploaded_text }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">下载量:</span>
<span class="font-medium">{{ profile.data.data.downloaded_text }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">分享率:</span>
<span class="font-medium">{{ profile.data.data.share_ratio }}</span>
</div>
</div>
</div>
<div>
<h3 class="text-lg font-medium mb-4">统计数据</h3>
<div class="space-y-3">
<!-- <div class="flex">
<span class="w-32 text-gray-600">做种数:</span>
<span class="font-medium">{{ profile.data.data.seeding }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">下载数:</span>
<span class="font-medium">{{ profile.data.data.leeching }}</span>
</div>
<div class="flex">
<span class="w-32 text-gray-600">完成数:</span>
<span class="font-medium">{{ profile.data.data.completed }}</span>
</div> -->
<div class="flex">
<span class="w-32 text-gray-600">魔力值:</span>
<span class="font-medium">{{ profile.data.data.bonus }}</span>
</div>
</div>
</div>
</div>
{% else %}
<p>暂无个人信息数据</p>
{% endif %}
</div>
{% endblock %}