feat: 完成前端窗口控制和配置适配

- 更新 tauri.conf.json 配置正确的前端构建路径
- 调整开发服务器端口为 Vite 默认端口 5173
- 添加 Tauri 前端依赖包
- 窗口拖拽样式已兼容
This commit is contained in:
farion1231
2025-08-23 20:41:14 +08:00
parent 1402fd0cc5
commit 2a658af5b9
3 changed files with 15 additions and 4 deletions

View File

@@ -32,6 +32,7 @@
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.8.0", "@tauri-apps/api": "^2.8.0",
"@tauri-apps/plugin-shell": "^2.3.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },

10
pnpm-lock.yaml generated
View File

@@ -11,6 +11,9 @@ importers:
'@tauri-apps/api': '@tauri-apps/api':
specifier: ^2.8.0 specifier: ^2.8.0
version: 2.8.0 version: 2.8.0
'@tauri-apps/plugin-shell':
specifier: ^2.3.0
version: 2.3.0
react: react:
specifier: ^18.2.0 specifier: ^18.2.0
version: 18.3.1 version: 18.3.1
@@ -460,6 +463,9 @@ packages:
'@tauri-apps/api@2.8.0': '@tauri-apps/api@2.8.0':
resolution: {integrity: sha512-ga7zdhbS2GXOMTIZRT0mYjKJtR9fivsXzsyq5U3vjDL0s6DTMwYRm0UHNjzTY5dh4+LSC68Sm/7WEiimbQNYlw==} resolution: {integrity: sha512-ga7zdhbS2GXOMTIZRT0mYjKJtR9fivsXzsyq5U3vjDL0s6DTMwYRm0UHNjzTY5dh4+LSC68Sm/7WEiimbQNYlw==}
'@tauri-apps/plugin-shell@2.3.0':
resolution: {integrity: sha512-6GIRxO2z64uxPX4CCTuhQzefvCC0ew7HjdBhMALiGw74vFBDY95VWueAHOHgNOMV4UOUAFupyidN9YulTe5xlA==}
'@tootallnate/once@2.0.0': '@tootallnate/once@2.0.0':
resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==}
engines: {node: '>= 10'} engines: {node: '>= 10'}
@@ -1984,6 +1990,10 @@ snapshots:
'@tauri-apps/api@2.8.0': {} '@tauri-apps/api@2.8.0': {}
'@tauri-apps/plugin-shell@2.3.0':
dependencies:
'@tauri-apps/api': 2.8.0
'@tootallnate/once@2.0.0': {} '@tootallnate/once@2.0.0': {}
'@types/babel__core@7.20.5': '@types/babel__core@7.20.5':

View File

@@ -4,10 +4,10 @@
"version": "3.0.0-beta.1", "version": "3.0.0-beta.1",
"identifier": "com.ccswitch.app", "identifier": "com.ccswitch.app",
"build": { "build": {
"frontendDist": "../build", "frontendDist": "../dist",
"devUrl": "http://localhost:3000", "devUrl": "http://localhost:5173",
"beforeDevCommand": "pnpm dev", "beforeDevCommand": "pnpm run dev:renderer",
"beforeBuildCommand": "pnpm build" "beforeBuildCommand": "pnpm run build:renderer"
}, },
"app": { "app": {
"windows": [ "windows": [