mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-22 07:26:46 +00:00
chore: move AI settings group and rename labels
This commit is contained in:
@@ -48,7 +48,7 @@ const tabs: { id: Exclude<SettingsTab, 'insight' | 'aiFootprint'>; label: string
|
|||||||
]
|
]
|
||||||
|
|
||||||
const aiTabs: Array<{ id: Extract<SettingsTab, 'aiCommon' | 'insight' | 'aiFootprint'>; label: string }> = [
|
const aiTabs: Array<{ id: Extract<SettingsTab, 'aiCommon' | 'insight' | 'aiFootprint'>; label: string }> = [
|
||||||
{ id: 'aiCommon', label: 'AI 通用' },
|
{ id: 'aiCommon', label: '基础配置' },
|
||||||
{ id: 'insight', label: 'AI 见解' },
|
{ id: 'insight', label: 'AI 见解' },
|
||||||
{ id: 'aiFootprint', label: 'AI 足迹' }
|
{ id: 'aiFootprint', label: 'AI 足迹' }
|
||||||
]
|
]
|
||||||
@@ -3036,7 +3036,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>调试工具</label>
|
<label>调试工具</label>
|
||||||
<span className="form-hint">
|
<span className="form-hint">
|
||||||
该功能依赖「AI 通用」里的模型配置。用于验证完整链路(数据库→API→弹窗)。
|
该功能依赖「基础配置」里的模型配置。用于验证完整链路(数据库→API→弹窗)。
|
||||||
</span>
|
</span>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '12px', flexWrap: 'wrap', marginTop: '10px' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: '12px', flexWrap: 'wrap', marginTop: '10px' }}>
|
||||||
<button
|
<button
|
||||||
@@ -4520,7 +4520,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
|
|
||||||
<div className="settings-layout">
|
<div className="settings-layout">
|
||||||
<div className="settings-tabs" role="tablist" aria-label="设置项">
|
<div className="settings-tabs" role="tablist" aria-label="设置项">
|
||||||
{tabs.map(tab => (
|
{tabs.flatMap((tab) => {
|
||||||
|
const row: React.ReactNode[] = [
|
||||||
<button
|
<button
|
||||||
key={tab.id}
|
key={tab.id}
|
||||||
className={`tab-btn ${activeTab === tab.id ? 'active' : ''}`}
|
className={`tab-btn ${activeTab === tab.id ? 'active' : ''}`}
|
||||||
@@ -4529,16 +4530,18 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
<tab.icon size={16} />
|
<tab.icon size={16} />
|
||||||
<span>{tab.label}</span>
|
<span>{tab.label}</span>
|
||||||
</button>
|
</button>
|
||||||
))}
|
]
|
||||||
|
|
||||||
<div className={`tab-group ${aiGroupExpanded ? 'expanded' : ''}`}>
|
if (tab.id === 'analytics') {
|
||||||
|
row.push(
|
||||||
|
<div key="ai-settings-group" className={`tab-group ${aiGroupExpanded ? 'expanded' : ''}`}>
|
||||||
<button
|
<button
|
||||||
className={`tab-btn tab-group-trigger ${(activeTab === 'aiCommon' || activeTab === 'insight' || activeTab === 'aiFootprint') ? 'active' : ''}`}
|
className={`tab-btn tab-group-trigger ${(activeTab === 'aiCommon' || activeTab === 'insight' || activeTab === 'aiFootprint') ? 'active' : ''}`}
|
||||||
onClick={() => setAiGroupExpanded((prev) => !prev)}
|
onClick={() => setAiGroupExpanded((prev) => !prev)}
|
||||||
aria-expanded={aiGroupExpanded}
|
aria-expanded={aiGroupExpanded}
|
||||||
>
|
>
|
||||||
<Sparkles size={16} />
|
<Sparkles size={16} />
|
||||||
<span>AI 相关</span>
|
<span>AI 设置</span>
|
||||||
<ChevronDown size={14} className={`tab-group-arrow ${aiGroupExpanded ? 'expanded' : ''}`} />
|
<ChevronDown size={14} className={`tab-group-arrow ${aiGroupExpanded ? 'expanded' : ''}`} />
|
||||||
</button>
|
</button>
|
||||||
<div className={`tab-sublist-wrap ${aiGroupExpanded ? 'expanded' : 'collapsed'}`}>
|
<div className={`tab-sublist-wrap ${aiGroupExpanded ? 'expanded' : 'collapsed'}`}>
|
||||||
@@ -4557,6 +4560,11 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return row
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-body">
|
<div className="settings-body">
|
||||||
|
|||||||
Reference in New Issue
Block a user