Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "node scripts/check-i18n.mjs && tsc -b && vite build",
"build": "node scripts/check-i18n.mjs && node scripts/check-dark-mode.mjs && tsc -b && vite build",
"check:i18n": "node scripts/check-i18n.mjs",
"check:dark": "node scripts/check-dark-mode.mjs",
"test:chat-stream": "esbuild scripts/test-chat-stream-segments.ts --bundle --platform=node --format=esm --outfile=node_modules/.tmp/test-chat-stream-segments.mjs && node node_modules/.tmp/test-chat-stream-segments.mjs",
"lint": "eslint .",
"preview": "vite preview"
Expand Down
406 changes: 406 additions & 0 deletions src/frontend/scripts/check-dark-mode.mjs

Large diffs are not rendered by default.

262 changes: 262 additions & 0 deletions src/frontend/scripts/dark-mode-baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
{
"src/AdminApp.tsx": {
"js-inline-color": 9
},
"src/ApiDocApp.tsx": {
"js-inline-color": 1
},
"src/ConfigApp.tsx": {
"js-inline-color": 1
},
"src/components/admin/AdminAgentManager.tsx": {
"js-inline-color": 1
},
"src/components/admin/AppConfigEditor.tsx": {
"js-inline-color": 1
},
"src/components/admin/DataSourceManager.tsx": {
"js-inline-color": 1
},
"src/components/admin/IconPicker.tsx": {
"js-inline-color": 2
},
"src/components/admin/KnowledgeBaseManager.tsx": {
"js-inline-color": 10
},
"src/components/admin/LoginView.tsx": {
"js-inline-color": 1
},
"src/components/admin/ManualEditor.tsx": {
"js-inline-color": 2
},
"src/components/admin/McpServersEditor.tsx": {
"js-inline-color": 4
},
"src/components/admin/ModelsEditor.tsx": {
"js-inline-color": 5
},
"src/components/admin/PageConfigEditor.tsx": {
"js-inline-color": 3
},
"src/components/admin/PluginsEditor.tsx": {
"js-inline-color": 2
},
"src/components/admin/PromptVersionsEditor.tsx": {
"js-inline-color": 1
},
"src/components/admin/PromptsEditor.tsx": {
"js-inline-color": 2
},
"src/components/admin/SandboxDepsManager.tsx": {
"js-inline-color": 6
},
"src/components/admin/ServiceConfigsEditor.tsx": {
"js-inline-color": 2
},
"src/components/admin/SkillsEditor.tsx": {
"js-inline-color": 4
},
"src/components/agent/AgentFormFields.tsx": {
"js-inline-color": 1
},
"src/components/agent/AgentMarketplaceModal.tsx": {
"js-inline-color": 1
},
"src/components/agent/AgentPanel.tsx": {
"js-inline-color": 1
},
"src/components/apidoc/ApiDocPanel.tsx": {
"js-inline-color": 6
},
"src/components/batch/BatchProgressPanel.tsx": {
"js-inline-color": 1
},
"src/components/catalog/CatalogPanel.tsx": {
"js-inline-color": 2
},
"src/components/catalog/LarkAppInitCard.tsx": {
"js-inline-color": 1
},
"src/components/catalog/McpPage.tsx": {
"js-inline-color": 2
},
"src/components/catalog/PluginIconPicker.tsx": {
"js-inline-color": 1
},
"src/components/catalog/PluginsPage.tsx": {
"js-inline-color": 11
},
"src/components/catalog/SkillMarketplaceModal.tsx": {
"js-inline-color": 1
},
"src/components/catalog/SkillsPage.tsx": {
"js-inline-color": 2
},
"src/components/chat/PromptHubPanel.tsx": {
"js-inline-color": 1
},
"src/components/common/DshIcons.tsx": {
"js-inline-color": 4
},
"src/components/common/MarketPickerModal.tsx": {
"js-inline-color": 1
},
"src/components/config/ChatHistoryPanel.tsx": {
"js-inline-color": 5
},
"src/components/config/ConfigLoginView.tsx": {
"js-inline-color": 1
},
"src/components/config/SandboxInstanceManager.tsx": {
"js-inline-color": 1
},
"src/components/config/SecurityAuditLogsPanel.tsx": {
"js-inline-color": 2
},
"src/components/config/SkillCallLogsPanel.tsx": {
"js-inline-color": 1
},
"src/components/config/SubAgentLogsPanel.tsx": {
"js-inline-color": 1
},
"src/components/config/SystemHealthPanel.tsx": {
"js-inline-color": 4
},
"src/components/config/UsageLogsPanel.tsx": {
"js-inline-color": 1
},
"src/components/kb/ConceptGraph.tsx": {
"js-inline-color": 2
},
"src/components/kb/ReindexModal.tsx": {
"js-inline-color": 1
},
"src/components/kb/wikiGraphTheme.ts": {
"js-inline-color": 14
},
"src/components/lab/AutomationDetailPage.tsx": {
"js-inline-color": 3
},
"src/components/loop/loop.css": {
"css-literal-color": 4
},
"src/components/memory/FactsList.tsx": {
"js-inline-color": 4
},
"src/components/onboarding/FirstRunSetup.tsx": {
"js-inline-color": 1
},
"src/components/ontology/OntologyManager.tsx": {
"js-inline-color": 1
},
"src/components/projects/ProjectMemoriesModal.tsx": {
"js-inline-color": 1
},
"src/components/settings/SettingsModal.tsx": {
"js-inline-color": 5
},
"src/components/share/ShareRecordsPage.tsx": {
"js-inline-color": 1
},
"src/components/sidebar/SearchModal.tsx": {
"js-inline-color": 1
},
"src/components/sidebar/Sidebar.tsx": {
"js-inline-color": 2
},
"src/components/tool/ToolOutputRenderer.tsx": {
"js-inline-color": 8
},
"src/components/tool/ToolResultPanel.tsx": {
"js-inline-color": 2
},
"src/components/tool/renderers/KBRenderer.tsx": {
"js-inline-color": 1
},
"src/components/tool/renderers/MySpaceRenderer.tsx": {
"js-inline-color": 4
},
"src/components/tool/renderers/SearchRenderer.tsx": {
"js-inline-color": 1
},
"src/edition-ee/myspace/ImageGrid.tsx": {
"js-inline-color": 2
},
"src/edition-ee/myspace/TeamScopeTree.tsx": {
"js-inline-color": 1
},
"src/edition-ee/settings/TeamsSection.tsx": {
"js-inline-color": 1
},
"src/stores/authStore.ts": {
"js-inline-color": 1
},
"src/styles/admin.css": {
"css-literal-color": 1
},
"src/styles/automation-timeline.css": {
"css-literal-color": 6
},
"src/styles/automation.css": {
"css-literal-color": 8
},
"src/styles/canvas.css": {
"css-literal-color": 16
},
"src/styles/catalog.css": {
"css-literal-color": 115
},
"src/styles/chat.css": {
"css-literal-color": 89
},
"src/styles/common.css": {
"css-literal-color": 8
},
"src/styles/evolution.css": {
"css-literal-color": 7
},
"src/styles/kb-wiki.css": {
"css-literal-color": 5
},
"src/styles/mcp.css": {
"css-literal-color": 3
},
"src/styles/mobile.css": {
"css-literal-color": 34,
"css-var-literal-color": 1
},
"src/styles/myspace.css": {
"css-literal-color": 37
},
"src/styles/onboarding.css": {
"css-literal-color": 35
},
"src/styles/ontology.css": {
"css-literal-color": 36
},
"src/styles/plan.css": {
"css-literal-color": 9
},
"src/styles/search-modal.css": {
"css-literal-color": 4
},
"src/styles/settings.css": {
"css-literal-color": 22
},
"src/styles/sidebar.css": {
"css-literal-color": 34
},
"src/styles/sites.css": {
"css-literal-color": 1
},
"src/styles/skill-distill.css": {
"css-literal-color": 2
},
"src/styles/team-folder.css": {
"css-literal-color": 10
},
"src/styles/tool.css": {
"css-literal-color": 47,
"css-var-literal-color": 5
}
}
6 changes: 3 additions & 3 deletions src/frontend/src/ApiDocApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function ApiDocApp() {
return (
<Layout style={{ minHeight: '100vh' }}>
<Header style={{
background: '#fff',
background: 'var(--color-bg-container)',
borderBottom: '1px solid #E3E6EA',
display: 'flex',
alignItems: 'center',
Expand All @@ -32,7 +32,7 @@ export default function ApiDocApp() {
}}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<Title level={5} style={{ margin: 0 }}>
<ProfileOutlined style={{ marginRight: 8, color: '#126DFF' }} />
<ProfileOutlined style={{ marginRight: 8, color: 'var(--color-primary)' }} />
{docTitle}
</Title>
<Divider type="vertical" />
Expand Down Expand Up @@ -69,7 +69,7 @@ export default function ApiDocApp() {
</Button>
</div>
</Header>
<Content style={{ background: '#fff', height: 'calc(100vh - 64px)', overflow: 'hidden' }}>
<Content style={{ background: 'var(--color-bg-container)', height: 'calc(100vh - 64px)', overflow: 'hidden' }}>
<ApiDocPanel onReloadRef={reloadRef} />
</Content>
</Layout>
Expand Down
18 changes: 9 additions & 9 deletions src/frontend/src/components/apidoc/ApiDocPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -670,17 +670,17 @@ function AuthGuide() {
return (
<Collapse
defaultActiveKey={['guide']}
style={{ margin: '12px 16px 0', background: '#F5F8FF', border: '1px solid #D6E4FF' }}
style={{ margin: '12px 16px 0', background: 'var(--color-primary-light)', border: '1px solid #D6E4FF' }}
items={[{
key: 'guide',
label: (
<Space>
<KeyOutlined style={{ color: '#126DFF' }} />
<KeyOutlined style={{ color: 'var(--color-primary)' }} />
<Text strong>{t('接入指南 · 认证与调用约定')}</Text>
</Space>
),
children: (
<div style={{ fontSize: 13, color: '#4D4D4D' }}>
<div style={{ fontSize: 13, color: 'var(--color-text-secondary)' }}>
<Paragraph style={{ marginBottom: 8 }}>
所有 <Text code>/v1/*</Text> 接口都需要身份认证。支持两种方式,二者皆无(或无效)时返回 <Tag color="orange">401</Tag>,
<b>绝不会匿名放行</b>。
Expand Down Expand Up @@ -867,7 +867,7 @@ export function ApiDocPanel({ onReloadRef }: ApiDocPanelProps = {}) {
const components = spec?.components || {};

return (
<div style={{ display: 'flex', flexDirection: 'column', height: '100%', background: '#fff' }}>
<div style={{ display: 'flex', flexDirection: 'column', height: '100%', background: 'var(--color-bg-container)' }}>
{/* Access guide: authentication and call conventions */}
<AuthGuide />

Expand All @@ -878,7 +878,7 @@ export function ApiDocPanel({ onReloadRef }: ApiDocPanelProps = {}) {
gap: 12,
padding: '12px 16px',
borderBottom: '1px solid #E3E6EA',
background: '#fff',
background: 'var(--color-bg-container)',
flexShrink: 0,
}}>
<Input
Expand Down Expand Up @@ -916,7 +916,7 @@ export function ApiDocPanel({ onReloadRef }: ApiDocPanelProps = {}) {
width: 240,
borderRight: '1px solid #E3E6EA',
overflow: 'auto',
background: '#FAFAFA',
background: 'var(--color-bg-gray)',
flexShrink: 0,
}}>
{groups.map(g => (
Expand All @@ -943,7 +943,7 @@ export function ApiDocPanel({ onReloadRef }: ApiDocPanelProps = {}) {
width: 420,
borderRight: '1px solid #E3E6EA',
overflow: 'auto',
background: '#fff',
background: 'var(--color-bg-container)',
flexShrink: 0,
}}>
{groupEndpoints.map(ep => (
Expand Down Expand Up @@ -974,7 +974,7 @@ export function ApiDocPanel({ onReloadRef }: ApiDocPanelProps = {}) {
<div style={{
marginTop: 4,
marginLeft: 64,
color: '#4D4D4D',
color: 'var(--color-text-secondary)',
fontSize: 12,
overflow: 'hidden',
textOverflow: 'ellipsis',
Expand All @@ -993,7 +993,7 @@ export function ApiDocPanel({ onReloadRef }: ApiDocPanelProps = {}) {
</div>

{/* Right: detail */}
<div style={{ flex: 1, overflow: 'auto', padding: 24, background: '#fff', minWidth: 0 }}>
<div style={{ flex: 1, overflow: 'auto', padding: 24, background: 'var(--color-bg-container)', minWidth: 0 }}>
{activeEndpoint ? (
/* Detail-switch keyed enter: animation plays only once on the outer container */
<motion.div key={activeEndpoint.id} {...DETAIL_ENTER}>
Expand Down
Loading
Loading