refactor(initialization): 调整初始化流程并添加新功能

- 在 Git 克隆命令中添加了特定分支参数
- 在初始化界面添加了跳转到最后一部的按钮
- 调整了 Python 后端启动路径
This commit is contained in:
2025-08-07 13:52:35 +08:00
parent f85a3024ef
commit 6aca142696
3 changed files with 8 additions and 2 deletions

View File

@@ -249,7 +249,7 @@ export async function cloneBackend(
})
}
await new Promise<void>((resolve, reject) => {
const proc = spawn(gitPath, ['clone', '--progress', '--verbose', repoUrl, tmpDir], {
const proc = spawn(gitPath, ['clone', '--progress', '--verbose','--branch', 'feature/refactor-backend', repoUrl, tmpDir], {
stdio: 'pipe',
env: gitEnv,
cwd: appRoot,

View File

@@ -403,7 +403,7 @@ export async function installDependencies(appRoot: string, mirror = 'tsinghua'):
export async function startBackend(appRoot: string): Promise<{ success: boolean; error?: string }> {
try {
const pythonPath = path.join(appRoot, 'environment', 'python', 'python.exe')
const backendPath = path.join(appRoot, 'backend')
const backendPath = path.join(appRoot)
const mainPyPath = path.join(backendPath, 'app','main.py')
// 检查文件是否存在

View File

@@ -4,6 +4,9 @@
<h1>AUTO MAA 初始化向导</h1>
<p>欢迎使用 AUTO MAA让我们来配置您的运行环境</p>
<a-button size="large" type="primary" @click="skipToHome">跳转至首页直接跳过环境安装仅开发用</a-button>
<a-button size="large" type="default" @click="jumpToLastStep" style="margin-left: 16px;">
跳到启动服务第六步
</a-button>
</div>
<a-steps
@@ -318,6 +321,9 @@ const allCompleted = computed(() =>
pythonInstalled.value && gitInstalled.value && backendExists.value && dependenciesInstalled.value
)
function jumpToLastStep() {
currentStep.value = 5
}
function skipToHome(){
router.push('/home')
}