diff --git a/frontend/src/components/initialization/BackendStep.vue b/frontend/src/components/initialization/BackendStep.vue
index 514fbea..4223803 100644
--- a/frontend/src/components/initialization/BackendStep.vue
+++ b/frontend/src/components/initialization/BackendStep.vue
@@ -31,7 +31,7 @@
{{ mirror.description }}
- {{ mirror.url }}
+
@@ -62,14 +62,14 @@
{{ mirror.description }}
- {{ mirror.url }}
+
- {{ testingGitSpeed ? '测速中...' : '开始测速' }}
+ {{ testingGitSpeed ? '测速中...' : '重新测速' }}
3秒无响应视为超时
@@ -206,7 +206,7 @@ onMounted(async () => {
font-size: 20px;
font-weight: 600;
color: var(--ant-color-text);
- margin-bottom: 20px;
+
}
.install-section {
@@ -224,7 +224,7 @@ onMounted(async () => {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
- margin-bottom: 20px;
+
}
.mirror-card {
@@ -308,9 +308,6 @@ onMounted(async () => {
word-break: break-all;
}
-.mirror-section {
- margin-bottom: 24px;
-}
.section-header {
display: flex;
diff --git a/frontend/src/components/initialization/DependenciesStep.vue b/frontend/src/components/initialization/DependenciesStep.vue
index f526c35..b1c9fb8 100644
--- a/frontend/src/components/initialization/DependenciesStep.vue
+++ b/frontend/src/components/initialization/DependenciesStep.vue
@@ -201,7 +201,6 @@ onMounted(async () => {
font-size: 20px;
font-weight: 600;
color: var(--ant-color-text);
- margin-bottom: 20px;
}
.install-section {
@@ -219,7 +218,6 @@ onMounted(async () => {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
- margin-bottom: 20px;
}
.mirror-card {
@@ -303,9 +301,6 @@ onMounted(async () => {
word-break: break-all;
}
-.mirror-section {
- margin-bottom: 24px;
-}
.section-header {
display: flex;
diff --git a/frontend/src/components/initialization/GitStep.vue b/frontend/src/components/initialization/GitStep.vue
index c3001d9..42fbdf9 100644
--- a/frontend/src/components/initialization/GitStep.vue
+++ b/frontend/src/components/initialization/GitStep.vue
@@ -6,7 +6,7 @@
diff --git a/frontend/src/components/initialization/ManualMode.vue b/frontend/src/components/initialization/ManualMode.vue
index f0295e0..bbe4a21 100644
--- a/frontend/src/components/initialization/ManualMode.vue
+++ b/frontend/src/components/initialization/ManualMode.vue
@@ -6,19 +6,19 @@
>欢迎使用 AUTO_MAA,让我们来配置您的运行环境
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/frontend/src/components/initialization/PipStep.vue b/frontend/src/components/initialization/PipStep.vue
deleted file mode 100644
index 572210e..0000000
--- a/frontend/src/components/initialization/PipStep.vue
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
安装 pip 包管理器
-
-
pip 是 Python 的包管理工具,用于安装和管理 Python 包
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/frontend/src/components/initialization/PythonStep.vue b/frontend/src/components/initialization/PythonStep.vue
index 3cc0063..917871e 100644
--- a/frontend/src/components/initialization/PythonStep.vue
+++ b/frontend/src/components/initialization/PythonStep.vue
@@ -2,7 +2,7 @@
Python 运行环境
-
需要安装 Python 3.13.0 运行环境(64位嵌入式版本)
+
需要安装 Python 3.13.0 运行环境
@@ -31,7 +31,7 @@
{{ mirror.description }}
-
{{ mirror.url }}
+
@@ -62,7 +62,7 @@
{{ mirror.description }}
- {{ mirror.url }}
+
@@ -264,7 +264,7 @@ onMounted(async () => {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
- margin-bottom: 20px;
+
}
.mirror-card {
@@ -353,9 +353,7 @@ onMounted(async () => {
word-break: break-all;
}
-.mirror-section {
- margin-bottom: 24px;
-}
+
.section-header {
display: flex;
diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts
index 462b35a..816ba97 100644
--- a/frontend/src/router/index.ts
+++ b/frontend/src/router/index.ts
@@ -89,40 +89,40 @@ const router = createRouter({
routes,
})
-// 添加路由守卫,确保在生产环境中也能正确进入初始化页面
-router.beforeEach(async (to, from, next) => {
- console.log('路由守卫:', { to: to.path, from: from.path })
-
- // 如果目标就是初始化页,放行并清除一次性标记,避免反复跳转
- if (to.path === '/initialization') {
- needInitLanding = false
- next()
- return
- }
-
- // (可选)开发环境跳过检查,可按需恢复
- const isDev = import.meta.env.VITE_APP_ENV === 'dev'
- if (isDev) return next()
-
- // 先按原逻辑:未初始化 => 强制进入初始化
- const initialized = await isAppInitialized()
- console.log('检查初始化状态:', initialized)
- if (!initialized) {
- needInitLanding = false // 以免重复重定向
- next('/initialization')
- return
- }
-
- // 已初始化:如果是“本次启动的第一次进入”,也先去初始化页一次
- if (needInitLanding) {
- needInitLanding = false
- next({ path: '/initialization', query: { redirect: to.fullPath } })
- return
- }
-
- // 其他情况正常放行
- next()
-})
+// // 添加路由守卫,确保在生产环境中也能正确进入初始化页面
+// router.beforeEach(async (to, from, next) => {
+// console.log('路由守卫:', { to: to.path, from: from.path })
+//
+// // 如果目标就是初始化页,放行并清除一次性标记,避免反复跳转
+// if (to.path === '/initialization') {
+// needInitLanding = false
+// next()
+// return
+// }
+//
+// // (可选)开发环境跳过检查,可按需恢复
+// const isDev = import.meta.env.VITE_APP_ENV === 'dev'
+// if (isDev) return next()
+//
+// // 先按原逻辑:未初始化 => 强制进入初始化
+// const initialized = await isAppInitialized()
+// console.log('检查初始化状态:', initialized)
+// if (!initialized) {
+// needInitLanding = false // 以免重复重定向
+// next('/initialization')
+// return
+// }
+//
+// // 已初始化:如果是“本次启动的第一次进入”,也先去初始化页一次
+// if (needInitLanding) {
+// needInitLanding = false
+// next({ path: '/initialization', query: { redirect: to.fullPath } })
+// return
+// }
+//
+// // 其他情况正常放行
+// next()
+// })
export default router
diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json
index 72b92fb..9e6ac4c 100644
--- a/frontend/tsconfig.app.json
+++ b/frontend/tsconfig.app.json
@@ -1,14 +1,10 @@
{
- "extends": "@vue/tsconfig/tsconfig.dom.json",
+ "extends": "./tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
-
- /* Module Resolution */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"noEmit": true,
-
- /* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
diff --git a/frontend/tsconfig.base.json b/frontend/tsconfig.base.json
new file mode 100644
index 0000000..6d28d3e
--- /dev/null
+++ b/frontend/tsconfig.base.json
@@ -0,0 +1,9 @@
+{
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ }
+}
diff --git a/frontend/tsconfig.electron.json b/frontend/tsconfig.electron.json
new file mode 100644
index 0000000..ca8e186
--- /dev/null
+++ b/frontend/tsconfig.electron.json
@@ -0,0 +1,13 @@
+{
+ "extends": "./tsconfig.base.json",
+ "compilerOptions": {
+ "target": "ES2020",
+ "module": "CommonJS",
+ "strict": true,
+ "outDir": "dist-electron",
+ "rootDir": "electron",
+ "esModuleInterop": true,
+ "types": ["node", "electron"]
+ },
+ "include": ["electron"]
+}
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index 404ad04..8c26bf3 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -1,16 +1,7 @@
{
- "compilerOptions": {
- "target": "ES2020",
- "module": "CommonJS",
- "strict": true,
- "outDir": "dist-electron",
- "rootDir": "electron",
- "esModuleInterop": true,
- "types": ["node", "electron"],
- "baseUrl": ".",
- "paths": {
- "@/*": ["src/*"]
- }
- },
- "include": ["electron"]
+ "files": [],
+ "references": [
+ { "path": "./tsconfig.app.json" },
+ { "path": "./tsconfig.electron.json" }
+ ]
}
diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts
index 26b878a..0611bc6 100644
--- a/frontend/vite.config.ts
+++ b/frontend/vite.config.ts
@@ -9,7 +9,7 @@ export default defineConfig({
resolve: {
extensions: ['.js', '.ts', '.vue', '.json'],
alias: {
- '@': path.resolve(__dirname, 'src'),
+ '@': path.resolve(__dirname, './src'),
},
},
})