Skip to content

Commit c4d692c

Browse files
author
ws-wangjg
committed
feat: auto deploy
1 parent 8653976 commit c4d692c

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

src/pages/autoDeploy/index.jsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const Sidebar = ({ config, setConfig, isDeploying, onStart, onReset, onCancel, e
7676
)
7777
}
7878

79-
// 子组件:进度条管道(使用 AntD Steps)
79+
// 子组件:进度条管道
8080
const Pipeline = ({ activeStep }) => {
8181
const steps = [{ title: '拉取代码' }, { title: '安装依赖' }, { title: '构建项目' }, { title: 'Nginx 部署' }]
8282
const getStatus = (i) => {
@@ -98,13 +98,13 @@ const Pipeline = ({ activeStep }) => {
9898
)
9999
}
100100

101-
// 子组件:终端日志(使用 AntD Card + pre)
101+
// 子组件:终端日志
102102
const Terminal = ({ logs }) => {
103103
const terminalEndRef = useRef(null)
104104

105-
useEffect(() => {
106-
terminalEndRef.current?.scrollIntoView({ behavior: 'smooth' })
107-
}, [logs])
105+
// useEffect(() => {
106+
// terminalEndRef.current?.scrollIntoView({ behavior: 'smooth' })
107+
// }, [logs])
108108

109109
return (
110110
<Card size="small" className={styles.terminal} styles={{ body: { padding: 12 } }}>
@@ -200,9 +200,6 @@ export default function AutoDeploy() {
200200
const errors = useMemo(() => validateConfig(config), [config])
201201
const isConfigValid = useMemo(() => Object.keys(errors).length === 0, [errors])
202202

203-
// Log once when app loads (avoid setting state in effect)
204-
// Session flag handled during logs initialization to avoid calling setState in an effect
205-
206203
useEffect(() => {
207204
try {
208205
const toSave = { ...(config || {}) }
@@ -229,7 +226,7 @@ export default function AutoDeploy() {
229226
}
230227

231228
try {
232-
setIsDeploying(true) // 立即设置状态
229+
setIsDeploying(true)
233230
setShowResult(false)
234231
setStatusText('正在部署...')
235232
setStatusType('warning')

0 commit comments

Comments
 (0)