增加新功能
This commit is contained in:
parent
8300d10074
commit
8e8b25e0ad
@ -1,3 +1,4 @@
|
||||
<!-- style.css -->
|
||||
body {
|
||||
font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
|
||||
max-width: 900px;
|
||||
|
||||
@ -1,27 +1,31 @@
|
||||
<!-- clients.html -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Squid代理用户管理系统</title>
|
||||
<title>用户管理 - Squid代理用户管理系统</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Squid代理用户管理系统</h1>
|
||||
<h1>用户管理</h1>
|
||||
|
||||
<div class="header-actions">
|
||||
<button id="createUserBtn" class="btn-primary">+ 添加新用户</button>
|
||||
<a href="{{ url_for('index') }}" class="btn-primary">返回首页</a>
|
||||
<button id="logoutBtn" class="btn-danger">退出系统</button>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>用户名</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{ user.name }}</td>
|
||||
<td>{{ "启用" if user.is_active else "禁用" }}</td>
|
||||
<td>
|
||||
<div class="actions">
|
||||
<label class="switch">
|
||||
@ -176,6 +180,14 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
// 增加导航按钮事件
|
||||
document.getElementById('logoutBtn').addEventListener('click', function() {
|
||||
if(confirm('确定要退出系统吗?')) {
|
||||
fetch('/logout').then(() => {
|
||||
window.location.href = '/';
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,3 +1,4 @@
|
||||
<!-- index.html -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<!-- settings.html -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user