mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-08-17 08:31:22 +02:00
Add files via upload
This commit is contained in:
+139
-1
@@ -6,6 +6,7 @@
|
||||
<title data-i18n="apiDocs.pageTitle">API 文档 - CyberStrikeAI</title>
|
||||
<link rel="icon" type="image/png" href="/static/logo.png">
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<script src="/static/js/theme.js"></script>
|
||||
<style>
|
||||
/* 覆盖主CSS的overflow限制,允许API文档页面滚动 */
|
||||
body {
|
||||
@@ -25,8 +26,23 @@
|
||||
position: relative;
|
||||
margin-bottom: 32px;
|
||||
padding-bottom: 24px;
|
||||
padding-right: 280px;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
}
|
||||
|
||||
.api-docs-header-actions {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.api-docs-header-actions .theme-toggle-btn,
|
||||
.api-docs-header-actions .lang-switcher-btn {
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.api-docs-header h1 {
|
||||
font-size: 2rem;
|
||||
@@ -822,6 +838,114 @@
|
||||
.empty-state p {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] body {
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-docs-container {
|
||||
background: var(--bg-secondary);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-docs-sidebar,
|
||||
html[data-theme="dark"] .auth-info-section,
|
||||
html[data-theme="dark"] .api-endpoint,
|
||||
html[data-theme="dark"] .api-endpoint-header,
|
||||
html[data-theme="dark"] .api-test-form,
|
||||
html[data-theme="dark"] .api-response-example,
|
||||
html[data-theme="dark"] .api-description pre,
|
||||
html[data-theme="dark"] .api-description-detail .code-block,
|
||||
html[data-theme="dark"] .api-description-detail .inline-code,
|
||||
html[data-theme="dark"] .api-description code {
|
||||
background: #111827;
|
||||
border-color: #263244;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-endpoint:hover {
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-group-link:hover {
|
||||
background: rgba(96, 165, 250, 0.1);
|
||||
color: var(--accent-hover);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-group-link.active {
|
||||
background: rgba(96, 165, 250, 0.16);
|
||||
color: var(--accent-hover);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-params-table th {
|
||||
background: #0f172a;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-test-input-group input,
|
||||
html[data-theme="dark"] .api-test-input-group textarea {
|
||||
background: #0f172a;
|
||||
border-color: #2b374b;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-test-input-group input:focus,
|
||||
html[data-theme="dark"] .api-test-input-group textarea:focus {
|
||||
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-test-result.success {
|
||||
background: rgba(52, 211, 153, 0.14);
|
||||
color: #6ee7b7;
|
||||
border-color: rgba(52, 211, 153, 0.28);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-test-result.error {
|
||||
background: rgba(248, 113, 113, 0.14);
|
||||
color: #fca5a5;
|
||||
border-color: rgba(248, 113, 113, 0.28);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-test-btn.secondary {
|
||||
background: #111827;
|
||||
border-color: #2b374b;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-test-btn.secondary:hover {
|
||||
background: #1f2937;
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-docs-header-actions .theme-toggle-btn,
|
||||
html[data-theme="dark"] .api-docs-header-actions .lang-switcher-btn {
|
||||
background: #111827;
|
||||
border-color: #2b374b;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .api-docs-header-actions .theme-toggle-btn:hover,
|
||||
html[data-theme="dark"] .api-docs-header-actions .lang-switcher-btn:hover {
|
||||
background: #1f2937;
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
|
||||
html[data-theme="dark"] #token-status {
|
||||
background: rgba(96, 165, 250, 0.12) !important;
|
||||
border-left-color: var(--accent-color) !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.api-docs-header {
|
||||
padding-right: 0;
|
||||
padding-bottom: 72px;
|
||||
}
|
||||
|
||||
.api-docs-header-actions {
|
||||
top: auto;
|
||||
bottom: 16px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -837,7 +961,21 @@
|
||||
<span data-i18n="apiDocs.title">API 文档</span>
|
||||
</h1>
|
||||
<p data-i18n="apiDocs.subtitle">CyberStrikeAI 平台 API 接口文档,支持在线测试</p>
|
||||
<div class="api-docs-lang-switcher" style="position: absolute; top: 24px; right: 24px;">
|
||||
<div class="api-docs-header-actions">
|
||||
<button id="theme-toggle-btn" class="theme-toggle-btn btn-secondary" type="button" onclick="window.cycleThemePreference && window.cycleThemePreference()" data-i18n="theme.toggle" data-i18n-attr="title" title="切换主题" aria-label="切换主题">
|
||||
<svg class="theme-toggle-icon theme-toggle-icon--system" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3" y="4" width="18" height="13" rx="2" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M8 21h8M12 17v4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<svg class="theme-toggle-icon theme-toggle-icon--light" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M12 2v2M12 20v2M4 12H2M22 12h-2M5 5l1.5 1.5M17.5 17.5L19 19M19 5l-1.5 1.5M6.5 17.5L5 19" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<svg class="theme-toggle-icon theme-toggle-icon--dark" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M21 14.5A8.5 8.5 0 0 1 9.5 3a7 7 0 1 0 11.5 11.5z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span id="theme-toggle-label">跟随系统</span>
|
||||
</button>
|
||||
<div class="lang-switcher">
|
||||
<button type="button" class="btn-secondary lang-switcher-btn" onclick="typeof toggleLangDropdown === 'function' && toggleLangDropdown()" title="界面语言">
|
||||
<span class="lang-switcher-icon">🌐</span>
|
||||
|
||||
@@ -6,6 +6,23 @@
|
||||
<title>CyberStrikeAI</title>
|
||||
<link rel="icon" type="image/png" href="/static/logo.png">
|
||||
<link rel="shortcut icon" type="image/png" href="/static/favicon.ico">
|
||||
<script>
|
||||
(function () {
|
||||
try {
|
||||
var stored = localStorage.getItem('cyberstrike-theme') || 'system';
|
||||
if (stored !== 'system' && stored !== 'light' && stored !== 'dark') {
|
||||
stored = 'system';
|
||||
}
|
||||
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
var resolved = stored === 'dark' || (stored !== 'light' && prefersDark) ? 'dark' : 'light';
|
||||
document.documentElement.setAttribute('data-theme-preference', stored);
|
||||
document.documentElement.setAttribute('data-theme', resolved);
|
||||
document.documentElement.style.colorScheme = resolved;
|
||||
} catch (e) {
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<link rel="stylesheet" href="/static/css/c2.css">
|
||||
<link rel="stylesheet" href="/static/vendor/xterm.css">
|
||||
@@ -57,12 +74,26 @@
|
||||
</svg>
|
||||
<span data-i18n="header.apiDocs">API 文档</span>
|
||||
</button>
|
||||
<button class="openapi-doc-btn" onclick="window.open('https://github.com/Ed1s0nZ/CyberStrikeAI', '_blank')" data-i18n="header.github" data-i18n-attr="title" data-i18n-skip-text="true" title="GitHub">
|
||||
<button class="openapi-doc-btn" onclick="window.open('https://github.com/Ed1s0nZ/CyberStrikeAI', '_blank')" data-i18n="header.github" data-i18n-attr="title" data-i18n-skip-text="true" title="GitHub">
|
||||
<svg width="16" height="16" viewBox="0 0 98 96" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"/>
|
||||
</svg>
|
||||
<span data-i18n="header.github">GitHub</span>
|
||||
</button>
|
||||
<button id="theme-toggle-btn" class="theme-toggle-btn" type="button" onclick="window.cycleThemePreference && window.cycleThemePreference()" data-i18n="theme.toggle" data-i18n-attr="title" title="切换主题" aria-label="切换主题">
|
||||
<svg class="theme-toggle-icon theme-toggle-icon--system" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3" y="4" width="18" height="13" rx="2" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M8 21h8M12 17v4" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<svg class="theme-toggle-icon theme-toggle-icon--light" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="4" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M12 2v2M12 20v2M4 12H2M22 12h-2M5 5l1.5 1.5M17.5 17.5L19 19M19 5l-1.5 1.5M6.5 17.5L5 19" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<svg class="theme-toggle-icon theme-toggle-icon--dark" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M21 14.5A8.5 8.5 0 0 1 9.5 3a7 7 0 1 0 11.5 11.5z" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span id="theme-toggle-label">跟随系统</span>
|
||||
</button>
|
||||
<div class="lang-switcher">
|
||||
<button class="btn-secondary lang-switcher-btn" onclick="toggleLangDropdown()" data-i18n="header.language" data-i18n-attr="title" data-i18n-skip-text="true" title="界面语言">
|
||||
<span class="lang-switcher-icon">🌐</span>
|
||||
@@ -4706,6 +4737,7 @@
|
||||
|
||||
<script src="/static/vendor/i18next.min.js"></script>
|
||||
<script src="/static/js/i18n.js"></script>
|
||||
<script src="/static/js/theme.js"></script>
|
||||
<script src="/static/js/builtin-tools.js"></script>
|
||||
<script src="/static/js/auth.js"></script>
|
||||
<script src="/static/js/modal.js"></script>
|
||||
@@ -4736,4 +4768,3 @@
|
||||
<script src="/static/js/c2.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user