补充遗漏翻译,新增启动脚本,整理import
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<h2>API Keys Management</h2>
|
||||
<h2>{{ _('API Keys Management') }}</h2>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">Create New API Key</div>
|
||||
<div class="card-header">{{ _('Create New API Key') }}</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('admin.add_api_key') }}" method="POST" class="form-inline">
|
||||
<input type="text" name="name" class="form-control mb-2 mr-sm-2" placeholder="Key Name" required>
|
||||
<button type="submit" class="btn btn-primary mb-2">Generate Key</button>
|
||||
<input type="text" name="name" class="form-control mb-2 mr-sm-2" placeholder="{{ _('Key Name') }}" required>
|
||||
<button type="submit" class="btn btn-primary mb-2">{{ _('Generate Key') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -17,11 +17,11 @@
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>API Key</th>
|
||||
<th>Created At</th>
|
||||
<th>Action</th>
|
||||
<th>{{ _('ID') }}</th>
|
||||
<th>{{ _('API Key Name') }}</th>
|
||||
<th>{{ _('API Key') }}</th>
|
||||
<th>{{ _('Created At') }}</th>
|
||||
<th>{{ _('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -32,14 +32,14 @@
|
||||
<td><code>{{ key.key }}</code></td>
|
||||
<td>{{ key.created_at.strftime('%Y-%m-%d %H:%M:%S') }}</td>
|
||||
<td>
|
||||
<form action="{{ url_for('admin.delete_api_key', key_id=key.id) }}" method="POST" style="display:inline;">
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to delete this API Key?');">Delete</button>
|
||||
<form action="{{ url_for('admin.delete_api_key', key_id=key.id) }}" method="POST" style="display:inline;" onsubmit="event.preventDefault(); window.customConfirm('{{ _('Are you sure you want to delete this API Key?') }}', () => { this.submit(); });">
|
||||
<button type="submit" class="btn btn-danger btn-sm">{{ _('Delete') }}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">No API keys found.</td>
|
||||
<td colspan="5" class="text-center">{{ _('No API keys found.') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark {% if request.endpoint == 'admin.api_keys' %}active text-white shadow-sm{% endif %}" href="{{ url_for('admin.api_keys') }}">
|
||||
<i class="bi bi-key me-2"></i>API Keys
|
||||
<i class="bi bi-key me-2"></i>{{ _('API Keys') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user