为后台管理添加菜单栏

This commit is contained in:
2024-01-11 22:57:14 +08:00
parent 8e086129b7
commit dc9d9d9369
9 changed files with 311 additions and 235 deletions

View File

@@ -4,6 +4,8 @@
<head>
<meta charset="UTF-8">
<title>列出密钥</title>
<link rel="stylesheet" type="text/css" href="../static/menu.css">
<script src="../static/echarts.min.js"></script>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -37,32 +39,43 @@
</head>
<body>
<div class="container">
<h2>列出密钥</h2>
<table>
<thead>
<tr>
<th>Key</th>
<th>剩余Tokens</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for item in data %}
<tr>
<td>{{item[0]}}</td>
<td>{{item[1]}}</td>
<td><a href="/admin/operate?type=del&target={{item[0]}}">删除</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<div id="global-blur"></div>
<div id="sidebar" onmouseover="openNav()" onmouseout="closeNav()">
<a href="/admin" class="nodecoration">仪表盘</a>
<a href="/admin/list" class="nodecoration">列出所有Key</a>
<a href="/admin/lookupkey" class="nodecoration">查询密钥</a>
<a href="/admin/createkey" class="nodecoration">创建密钥</a>
<a href="/admin/log?show=500" class="nodecoration">查看日志</a>
<!-- 添加更多菜单项 -->
</div>
<hr/>
<script>
// 在这里可以添加一些交互逻辑例如点击某个状态显示更多信息
</script>
<div id="main">
<div class="container">
<h2>列出密钥</h2>
<table>
<thead>
<tr>
<th>Key</th>
<th>剩余Tokens</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for item in data %}
<tr>
<td>{{item[0]}}</td>
<td>{{item[1]}}</td>
<td><a href="/admin/operate?type=del&target={{item[0]}}">删除</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<hr />
</div>
<script src="../static/menu.js"></script>
</body>
</html>