update tauri to latest

feat/camera
Lucas Nogueira 2 years ago
parent b7257e1f13
commit b5e33203f9
No known key found for this signature in database
GPG Key ID: 7C32FCA95C8C95D7

52
Cargo.lock generated

@ -245,21 +245,6 @@ dependencies = [
"num-traits", "num-traits",
] ]
[[package]]
name = "attohttpc"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2"
dependencies = [
"flate2",
"http",
"log",
"serde",
"serde_json",
"serde_urlencoded",
"url",
]
[[package]] [[package]]
name = "atty" name = "atty"
version = "0.2.14" version = "0.2.14"
@ -462,6 +447,9 @@ name = "bytes"
version = "1.4.0" version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "cairo-rs" name = "cairo-rs"
@ -4140,9 +4128,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]] [[package]]
name = "swift-rs" name = "swift-rs"
version = "1.0.1" version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "806ff0904302a8a91644422fcfeee4828c3a9dbcfd1757ba495f1a755c2ac873" checksum = "2706dd533c2a96dfdbe942221fe0d3bb24857257aac26f938537f197c543b27e"
dependencies = [ dependencies = [
"base64 0.21.0", "base64 0.21.0",
"serde", "serde",
@ -4259,10 +4247,10 @@ dependencies = [
[[package]] [[package]]
name = "tauri" name = "tauri"
version = "2.0.0-alpha.3" version = "2.0.0-alpha.3"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"attohttpc", "bytes 1.4.0",
"cocoa", "cocoa",
"dirs-next", "dirs-next",
"embed_plist", "embed_plist",
@ -4283,6 +4271,7 @@ dependencies = [
"percent-encoding", "percent-encoding",
"rand 0.8.5", "rand 0.8.5",
"raw-window-handle", "raw-window-handle",
"reqwest",
"semver 1.0.16", "semver 1.0.16",
"serde", "serde",
"serde_json", "serde_json",
@ -4309,7 +4298,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-build" name = "tauri-build"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cargo_toml", "cargo_toml",
@ -4328,7 +4317,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-codegen" name = "tauri-codegen"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"base64 0.21.0", "base64 0.21.0",
"brotli", "brotli",
@ -4353,7 +4342,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-macros" name = "tauri-macros"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@ -4459,16 +4448,6 @@ dependencies = [
"time 0.3.15", "time 0.3.15",
] ]
[[package]]
name = "tauri-plugin-path"
version = "0.0.0"
dependencies = [
"serde",
"tauri",
"tauri-build",
"thiserror",
]
[[package]] [[package]]
name = "tauri-plugin-persisted-scope" name = "tauri-plugin-persisted-scope"
version = "0.1.0" version = "0.1.0"
@ -4595,7 +4574,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime" name = "tauri-runtime"
version = "0.13.0-alpha.1" version = "0.13.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"gtk", "gtk",
"http", "http",
@ -4616,7 +4595,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-runtime-wry" name = "tauri-runtime-wry"
version = "0.13.0-alpha.1" version = "0.13.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"cocoa", "cocoa",
"gtk", "gtk",
@ -4636,7 +4615,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-utils" name = "tauri-utils"
version = "2.0.0-alpha.1" version = "2.0.0-alpha.1"
source = "git+https://github.com/tauri-apps/tauri?branch=next#5d94eaa3bc9f1e5cf3e0fa64fba5801d494c2541" source = "git+https://github.com/tauri-apps/tauri?branch=next#5bc8322f7d95b88fd7f9248f8e570dbd4008d244"
dependencies = [ dependencies = [
"brotli", "brotli",
"ctor", "ctor",
@ -5690,7 +5669,8 @@ dependencies = [
[[package]] [[package]]
name = "wry" name = "wry"
version = "0.27.0" version = "0.27.0"
source = "git+https://github.com/tauri-apps/wry?branch=dev#7795356a45b1bd015fad0e9973fc5af58c8c339b" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26712b3ea99abb29c3b0067b284515e2ccdf5d6df7ac5e21129d71550eb9c3e6"
dependencies = [ dependencies = [
"base64 0.13.1", "base64 0.13.1",
"block", "block",

@ -89,25 +89,25 @@ class CameraPlugin(private val activity: Activity): Plugin(activity) {
private var settings: CameraSettings = CameraSettings() private var settings: CameraSettings = CameraSettings()
@PluginMethod @Command
fun getPhoto(invoke: Invoke) { fun getPhoto(invoke: Invoke) {
isEdited = false isEdited = false
settings = getSettings(invoke) settings = getSettings(invoke)
doShow(invoke) doShow(invoke)
} }
@PluginMethod @Command
fun pickImages(invoke: Invoke) { fun pickImages(invoke: Invoke) {
settings = getSettings(invoke) settings = getSettings(invoke)
openPhotos(invoke, multiple = true, skipPermission = false) openPhotos(invoke, multiple = true, skipPermission = false)
} }
@PluginMethod @Command
fun pickLimitedLibraryPhotos(invoke: Invoke) { fun pickLimitedLibraryPhotos(invoke: Invoke) {
invoke.reject("not supported on android") invoke.reject("not supported on android")
} }
@PluginMethod @Command
fun getLimitedLibraryPhotos(invoke: Invoke) { fun getLimitedLibraryPhotos(invoke: Invoke) {
invoke.reject("not supported on android") invoke.reject("not supported on android")
} }
@ -729,7 +729,7 @@ class CameraPlugin(private val activity: Activity): Plugin(activity) {
invoke.resolve(data) invoke.resolve(data)
} }
@PluginMethod @Command
override fun requestPermissions(invoke: Invoke) { override fun requestPermissions(invoke: Invoke) {
// If the camera permission is defined in the manifest, then we have to prompt the user // If the camera permission is defined in the manifest, then we have to prompt the user
// or else we will get a security exception when trying to present the camera. If, however, // or else we will get a security exception when trying to present the camera. If, however,

Loading…
Cancel
Save