squid_ui/templates/settings.html
2025-06-24 11:06:02 +08:00

64 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>系统设置 - Squid代理管理系统</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container">
<h1>系统设置</h1>
<div class="header-actions">
<a href="{{ url_for('index') }}" class="btn-primary">返回首页</a>
<a href="{{ url_for('clients') }}" class="btn-primary">用户管理</a>
<a href="{{ url_for('logout') }}" class="btn-danger">退出登录</a>
</div>
<div class="settings-section">
<h2>修改管理员密码</h2>
<form method="POST" action="{{ url_for('settings') }}">
<input type="hidden" name="action" value="change_password">
<div class="form-group">
<label for="current_password">当前密码</label>
<input type="password" id="current_password" name="current_password" required>
</div>
<div class="form-group">
<label for="new_password">新密码</label>
<input type="password" id="new_password" name="new_password" required>
</div>
<div class="form-group">
<label for="confirm_password">确认新密码</label>
<input type="password" id="confirm_password" name="confirm_password" required>
</div>
<button type="submit" class="btn-success">修改密码</button>
</form>
</div>
<div class="settings-section">
<h2>代理服务器设置</h2>
<form method="POST" action="{{ url_for('settings') }}">
<input type="hidden" name="action" value="update_proxy">
<div class="form-group">
<label for="proxy_address">代理地址</label>
<input type="text" id="proxy_address" name="proxy_address"
value="{{ settings['proxy_address'] }}" required>
</div>
<div class="form-group">
<label for="proxy_port">代理端口</label>
<input type="text" id="proxy_port" name="proxy_port"
value="{{ settings['proxy_port'] }}" required>
</div>
<button type="submit" class="btn-success">保存设置</button>
</form>
</div>
</div>
</body>
</html>