Spaces:
Running
Running
Upload 2 files
Browse files
templates/components/alerts.html
CHANGED
|
@@ -20,14 +20,32 @@
|
|
| 20 |
{% endmacro %}
|
| 21 |
|
| 22 |
{# 错误日志提示 #}
|
| 23 |
-
{% macro error_alert(error_count) %}
|
| 24 |
{% if error_count > 0 %}
|
| 25 |
-
<div class="alert alert-error">
|
| 26 |
<div class="alert-icon">🚨</div>
|
| 27 |
<div class="alert-content">
|
| 28 |
<strong>检测到 {{ error_count }} 条错误日志</strong>
|
| 29 |
-
<a href="/
|
|
|
|
| 30 |
</div>
|
|
|
|
| 31 |
</div>
|
| 32 |
{% endif %}
|
| 33 |
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
{% endmacro %}
|
| 21 |
|
| 22 |
{# 错误日志提示 #}
|
| 23 |
+
{% macro error_alert(error_count, admin_path_segment) %}
|
| 24 |
{% if error_count > 0 %}
|
| 25 |
+
<div class="alert alert-error" id="error-alert">
|
| 26 |
<div class="alert-icon">🚨</div>
|
| 27 |
<div class="alert-content">
|
| 28 |
<strong>检测到 {{ error_count }} 条错误日志</strong>
|
| 29 |
+
<a href="/{{ admin_path_segment }}/log/html" class="alert-link" target="_blank">查看详情 →</a>
|
| 30 |
+
<div class="alert-desc">建议及时查看并处理错误日志,确保系统正常运行</div>
|
| 31 |
</div>
|
| 32 |
+
<button class="alert-close" onclick="document.getElementById('error-alert').style.display='none'" title="关闭">×</button>
|
| 33 |
</div>
|
| 34 |
{% endif %}
|
| 35 |
{% endmacro %}
|
| 36 |
+
|
| 37 |
+
{# 无账户提示 #}
|
| 38 |
+
{% macro no_accounts_alert() %}
|
| 39 |
+
<div class="alert alert-info">
|
| 40 |
+
<div class="alert-icon">💡</div>
|
| 41 |
+
<div class="alert-content">
|
| 42 |
+
<strong>暂无账户配置</strong>
|
| 43 |
+
<div class="alert-desc" style="margin-top: 8px; line-height: 1.6;">
|
| 44 |
+
请添加 Gemini Business 账户以开始使用 API 服务。支持以下方式:<br>
|
| 45 |
+
<strong style="margin-top: 6px; display: inline-block;">1. 使用浏览器脚本自动提取</strong> - 安装 <code style="font-size: 11px;">script/copy-config.js</code> 或 <code style="font-size: 11px;">script/download-config.js</code> 到 Tampermonkey,访问 Gemini Business 页面自动提取配置<br>
|
| 46 |
+
<strong>2. 批量上传</strong> - 点击上方"📥 批量上传"按钮,上传 JSON 配置文件<br>
|
| 47 |
+
<strong>3. 手动编辑</strong> - 点击上方"✏️ 编辑配置"按钮,直接编辑 JSON 配置
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
</div>
|
| 51 |
+
{% endmacro %}
|