fix(web): 去除残留 undefined(文本最终清洗)并将启动命令改为顶层 README 流程(start.sh + compose)

This commit is contained in:
Ember
2025-11-02 00:01:38 +08:00
parent 6f48c92da5
commit f26621dc6e
2 changed files with 12 additions and 9 deletions

View File

@@ -500,15 +500,16 @@ export function LandingPage() {
>
<Typewriter
lines={[
'$ git clone https://github.com/tinkle-community/nofx',
'$ cd nofx/web',
'$ npm install',
'$ npm run dev',
'🚀 前端已启动 http://localhost:3000',
'✓ 就绪',
'$ git clone https://github.com/tinkle-community/nofx.git',
'$ cd nofx',
'$ chmod +x start.sh',
'$ ./start.sh start --build',
'🚀 启动自动交易系统...',
'✓ API服务器启动在端口 8080',
'🌐 Web 控制台 http://localhost:3000',
]}
typingSpeed={55}
lineDelay={700}
typingSpeed={65}
lineDelay={800}
className='text-sm font-mono'
style={{ color: '#00FF41', textShadow: '0 0 6px rgba(0,255,65,0.6)' }}
/>

View File

@@ -62,9 +62,11 @@ export default function Typewriter({
}
}, [lines, typingSpeed, lineDelay])
const displayText = useMemo(() => typedLines.join('\n').replace(/undefined/g, ''), [typedLines])
return (
<pre className={className} style={{ whiteSpace: 'pre-wrap', ...style }}>
{typedLines.join('\n')}
{displayText}
<span style={{ opacity: showCursor ? 1 : 0 }}> </span>
</pre>
)