Skip to content

Commit

Permalink
chore: uptd tauri to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Clover-You committed Oct 8, 2024
1 parent 31b9269 commit 0eb1dda
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 33 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@tauri-apps/api": "2.0.0-beta.11",
"@tauri-apps/plugin-shell": "2.0.0-rc.1",
"@tauri-apps/api": "2.0.2",
"@tauri-apps/plugin-shell": "2.0.0",
"allotment": "^1.20.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
Expand All @@ -46,7 +46,7 @@
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.20",
"babel-plugin-react-compiler": "0.0.0-experimental-57db2f6-20240926",
"babel-plugin-react-compiler": "0.0.0-experimental-0725353-20240806",
"eslint": "^9.11.1",
"eslint-plugin-react": "^7.36.1",
"globals": "^15.9.0",
Expand Down
36 changes: 15 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ codegen-units = 1

[lib]
name = "rust_tauri_nextjs_template_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
crate-type = ["staticlib", "cdylib", "rlib", "lib"]

[build-dependencies]
tauri-build = { version = "2.0.0-rc", features = [] }
tauri-build = { version = "2.0.1", features = [] }

[dependencies]
tauri = { version = "2.0.0-rc", features = [] }
tauri-plugin-shell = "2.0.0-rc"
tauri = { version = "2.0.2", features = [] }
tauri-plugin-shell = "2.0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sqlx = { version = "0.8.2", features = ["runtime-tokio-native-tls", "sqlite"] }
Expand Down
5 changes: 3 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
"icons/icon.icns",
"icons/icon.ico"
]
}
}
},
"plugins": {}
}
6 changes: 3 additions & 3 deletions src/components/win-display-controller.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
'use client'

import { useEffect } from 'react'
import { getCurrent } from '@tauri-apps/api/window'
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'

/**
* Fix tauri window startup white screen.
* When creating a window, should hidden it first e.g.
* ```ts
* import { getCurrent, Window } from '@tauri-apps/api/window'
* import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'
* new Window('main', { visible: false })
* ```
*/
export function WinDisplayController() {
useEffect(() => {
setTimeout(getCurrent().show, 30)
setTimeout(getCurrentWebviewWindow().show, 30)
}, [])

return undefined
Expand Down

0 comments on commit 0eb1dda

Please sign in to comment.