feat: 添加 API 密钥菜单和文档链接

- 侧边栏添加 API 密钥菜单项
- API 密钥列表页添加 API 文档链接
- 添加 /docs/ 路由服务文档文件

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jowe
2026-03-23 23:19:48 +08:00
parent 946e7197ae
commit 76ae3cbb5a
3 changed files with 36 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{% extends 'admin/model/list.html' %}
{% block tail %}
{% block head_css %}
{{ super() }}
<style>
.api-key-cell {
@@ -13,5 +13,25 @@
.api-key-masked {
color: #6c757d;
}
.api-doc-link {
margin-bottom: 15px;
}
.api-doc-link a {
color: #007bff;
text-decoration: none;
}
.api-doc-link a:hover {
text-decoration: underline;
}
</style>
{% endblock %}
{% block list_cards %}
{{ super() }}
<div class="api-doc-link">
<a href="{{ url_for('serve_doc', filename='API_DOC.md') }}" target="_blank">
<span class="material-symbols-outlined" style="vertical-align: middle;">description</span>
查看 API 文档
</a>
</div>
{% endblock %}