Files
mailova/app/templates/settings.html

43 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block title %}用户设置 - Postcard Manager{% endblock %}
{% block content %}
<div class="section-header">
<h1>用户设置</h1>
</div>
{% if success %}
<div class="alert alert-success">{{ success }}</div>
{% endif %}
{% if error %}
<div class="alert alert-error">{{ error }}</div>
{% endif %}
<div class="form-card" style="max-width:400px">
<h3 style="margin-bottom:.75rem">修改用户名</h3>
<form method="post" action="/settings/change-username">
<label>当前用户名</label>
<input type="text" value="{{ user.username }}" disabled>
<label>新用户名</label>
<input type="text" name="new_username" required maxlength="64" placeholder="输入新用户名">
<div class="form-actions">
<button type="submit" class="btn btn-primary">修改用户名</button>
</div>
</form>
</div>
<div class="form-card" style="max-width:400px;margin-top:1.5rem">
<h3 style="margin-bottom:.75rem">修改密码</h3>
<form method="post" action="/settings/change-password">
<label>当前密码</label>
<input type="password" name="old_password" required placeholder="输入当前密码">
<label>新密码</label>
<input type="password" name="new_password" required placeholder="输入新密码">
<label>确认新密码</label>
<input type="password" name="confirm_password" required placeholder="再次输入新密码">
<div class="form-actions">
<button type="submit" class="btn btn-primary">修改密码</button>
</div>
</form>
</div>
{% endblock %}