Add files via upload

This commit is contained in:
公明
2026-01-29 19:32:33 +08:00
committed by GitHub
parent 81fca5b2dd
commit 91230f273e
2 changed files with 44 additions and 2 deletions

View File

@@ -519,14 +519,18 @@ function renderTestSection(endpoint) {
</svg>
发送请求
</button>
<button class="api-test-btn secondary" onclick="copyCurlCommand(event, '${method}', '${escapeHtml(path)}')" title="复制curl命令">
<button class="api-test-btn copy-curl" onclick="copyCurlCommand(event, '${method}', '${escapeHtml(path)}')" title="复制curl命令">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" stroke="currentColor" stroke-width="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" stroke="currentColor" stroke-width="2"/>
</svg>
复制curl
</button>
<button class="api-test-btn secondary" onclick="clearTestResult('${escapeId(path)}-${method}')">
<button class="api-test-btn clear-result" onclick="clearTestResult('${escapeId(path)}-${method}')" title="清除测试结果">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="3 6 5 6 21 6"/>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
</svg>
清除结果
</button>
</div>

View File

@@ -690,6 +690,44 @@
background: var(--bg-secondary);
}
/* 复制curl按钮 - 黄色主题 */
.api-test-btn.copy-curl {
background: #ffc107;
color: white;
border: 1px solid #ffb300;
}
.api-test-btn.copy-curl:hover {
background: #ffb300;
border-color: #ffa000;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}
.api-test-btn.copy-curl:active {
transform: translateY(0);
box-shadow: 0 1px 4px rgba(255, 193, 7, 0.2);
}
/* 清除结果按钮 - 红色/橙色主题 */
.api-test-btn.clear-result {
background: #ff6b6b;
color: white;
border: 1px solid #ff5252;
}
.api-test-btn.clear-result:hover {
background: #ff5252;
border-color: #ff4444;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.api-test-btn.clear-result:active {
transform: translateY(0);
box-shadow: 0 1px 4px rgba(255, 107, 107, 0.2);
}
.api-test-result {
margin-top: 20px;
padding: 16px;