You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.4 KiB

{% extends "base.html" %}
{% block title %}账户设置 - 邮件系统{% endblock %}
{% block content %}
<div class="main-layout">
<div class="sidebar">
<a href="{{ url_for('inbox') }}">📥 收件箱</a>
<a href="{{ url_for('starred') }}">⭐ 星标邮件</a>
<a href="{{ url_for('sent') }}">📤 已发送</a>
<a href="{{ url_for('drafts') }}">📝 草稿箱</a>
<a href="{{ url_for('contacts') }}">📇 通讯录</a>
<a href="{{ url_for('compose') }}">✏️ 写邮件</a>
<hr style="margin: 1rem 0;">
<a href="{{ url_for('user_settings') }}" class="active">⚙️ 账户设置</a>
</div>
<div class="main-content">
<div class="card">
<h2 style="margin-bottom: 1.5rem;">账户信息</h2>
<div style="margin-bottom: 1rem;">
<div style="color: #6b7280; font-size: 0.9rem;">用户名</div>
<div style="font-size: 1.1rem;">{{ current_user.username }}</div>
</div>
<div style="margin-bottom: 1rem;">
<div style="color: #6b7280; font-size: 0.9rem;">邮箱地址</div>
<div style="font-size: 1.1rem;">{{ current_user.email }}</div>
</div>
<div>
<div style="color: #6b7280; font-size: 0.9rem;">注册时间</div>
<div style="font-size: 1.1rem;">{{ current_user.created_at.strftime('%Y-%m-%d %H:%M') }}</div>
</div>
</div>
<div class="card">
<h2 style="margin-bottom: 1.5rem;">修改密码</h2>
<form method="POST" style="max-width: 400px;">
<input type="hidden" name="action" value="password">
<div class="form-group">
<label>原密码</label>
<input type="password" name="old_password" required>
</div>
<div class="form-group">
<label>新密码</label>
<input type="password" name="new_password" required minlength="6">
</div>
<div class="form-group">
<label>确认新密码</label>
<input type="password" name="confirm_password" required minlength="6">
</div>
<button type="submit" class="btn btn-primary">修改密码</button>
</form>
</div>
</div>
</div>
{% endblock %}