merge: 合入总仓库 weiyuan(bfdfb339) web/ 新功能,保留 ui-optimization 的 UI 重构
来源:luoguang/monkey-ai weiyuan@bfdfb339 的 web/(经 sync/main-weiyuan-web-bfdfb339 同步)
同步基准:总仓库 a2ca13cb = 本仓库初始导入 d8f3aee2
冲突处理原则:保留 ui-optimization 的 UI(样式/结构/组件),嫁接 weiyuan 的功能逻辑。
- i18n:按键三方合并;ours 的「令牌→密钥」改名键上移植 theirs 的术语修订
- task-logs / OrgLogs:ours 已手工移植同一功能(6ad95e2),保留 ours
- 删除:OrgCreate(theirs 下线 /org/create)、旧 image 组件与 VideoRegenerateModal(theirs 体验中心重写)、
OrgAvatarSection / PricingBentoPage / CommissionConsole(ours 重构中已移除)
- 测试:users-pagination 的 i18next mock 补 t();theirs 新增文件补 license header
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
} from '@/components/ui/icons';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
import { DEFAULT_LOGIN_REDIRECT } from '../../helpers/data';
|
||||
import { isMiniProgramWebView } from '../../helpers/miniProgram';
|
||||
import VideoTutorial from './components/VideoTutorial';
|
||||
import './styles.css';
|
||||
|
||||
@@ -668,13 +669,23 @@ source ~/.bashrc`,
|
||||
},
|
||||
];
|
||||
|
||||
// WeyAi 小程序里不出现充值步骤(helpers/miniProgram.js)。其余步骤保留原编号,
|
||||
// 与标题里的「第四步」等一致。
|
||||
const inMiniProgram = isMiniProgramWebView();
|
||||
const visibleSteps = steps
|
||||
.map((step, index) => ({ ...step, number: index + 1 }))
|
||||
.filter((step) => !(inMiniProgram && step.key === 'recharge'));
|
||||
const visibleStepComponents = allStepComponents
|
||||
.map((step, index) => ({ ...step, number: index + 1 }))
|
||||
.filter((step) => !(inMiniProgram && step.component === rechargeStep));
|
||||
|
||||
// 图文教程内容 - 滚动浏览模式(使用 JSX 变量而非内联组件,避免状态更新时重新挂载导致滚动位置重置)
|
||||
const stepsTutorial = (
|
||||
<div className='tutorial-scroll-wrapper'>
|
||||
{/* 顶部快速导航 */}
|
||||
<div className='tutorial-quick-nav'>
|
||||
<div className='tutorial-quick-nav-inner'>
|
||||
{steps.map((step, index) => (
|
||||
{visibleSteps.map((step, index) => (
|
||||
<a
|
||||
key={step.key}
|
||||
href={`#tutorial-step-${index}`}
|
||||
@@ -693,7 +704,7 @@ source ~/.bashrc`,
|
||||
}
|
||||
}}
|
||||
>
|
||||
<span className='tutorial-quick-nav-number'>{index + 1}</span>
|
||||
<span className='tutorial-quick-nav-number'>{step.number}</span>
|
||||
<span className='tutorial-quick-nav-title'>{step.title}</span>
|
||||
</a>
|
||||
))}
|
||||
@@ -707,7 +718,7 @@ source ~/.bashrc`,
|
||||
{/* 可滚动的内容区域 */}
|
||||
<div className='tutorial-scroll-container' ref={scrollContainerRef}>
|
||||
<div className='tutorial-all-steps'>
|
||||
{allStepComponents.map((step, index) => (
|
||||
{visibleStepComponents.map((step, index) => (
|
||||
<div
|
||||
key={`step-wrapper-${index}`}
|
||||
id={`tutorial-step-${index}`}
|
||||
@@ -720,7 +731,7 @@ source ~/.bashrc`,
|
||||
background: `linear-gradient(135deg, ${step.color}, color-mix(in srgb, ${step.color} 85%, transparent))`,
|
||||
}}
|
||||
>
|
||||
{index + 1} / {allStepComponents.length}
|
||||
{step.number} / {allStepComponents.length}
|
||||
</div>
|
||||
</div>
|
||||
{step.component}
|
||||
|
||||
Reference in New Issue
Block a user