mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-14 14:27:48 +02:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cbb55aa7b | |||
| 60765694f5 | |||
| fd75401aee | |||
| ca34972266 | |||
| 179184326b | |||
| d8efd3cd20 | |||
| 5d39ddcf22 | |||
| 2050a3bea2 | |||
| c078f57a09 | |||
| dc5721ac13 | |||
| 1d9741b52b | |||
| 7a37355e17 |
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"window-state": patch
|
||||
---
|
||||
|
||||
Fix deadlock when trying to restore window states on initial load
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"upload": 'patch:bug'
|
||||
---
|
||||
|
||||
fix download content to file when unsuccessful response
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"geolocation": patch
|
||||
---
|
||||
|
||||
No longer request permission automatically and leave to the user how to handle the `checkPermissions` and `requestPermissions` APIs.
|
||||
@@ -22,6 +22,8 @@
|
||||
".changes/fix-linux-updater-permission-error.md",
|
||||
".changes/fix-restore-minimized-window-position.md",
|
||||
".changes/fix-restore-minimized-window-state.md",
|
||||
".changes/fix-restore-window-state-deadlock.md",
|
||||
".changes/fix-upload-handle-non-success-download.md",
|
||||
".changes/fs-dialog-file-path-methods.md",
|
||||
".changes/fs-dialog-file-path-traits.md",
|
||||
".changes/fs-dialog-non-exhaustive-error.md",
|
||||
@@ -29,6 +31,7 @@
|
||||
".changes/fs-scope-recursive-allow-read-dir.md",
|
||||
".changes/fs-windows-path.md",
|
||||
".changes/fs-write-file-utf8-chars.md",
|
||||
".changes/geolocation-permission-refactor.md",
|
||||
".changes/geolocation-release.md",
|
||||
".changes/global-shortcut-0.6.md",
|
||||
".changes/haptics-release.md",
|
||||
@@ -49,6 +52,7 @@
|
||||
".changes/swift-build-older-versions.md",
|
||||
".changes/tauri-rc-8.md",
|
||||
".changes/update-fs-api-docs.md",
|
||||
".changes/update-geolocation-api.md",
|
||||
".changes/update-tauri-rc-12.md",
|
||||
".changes/update-tauri-rc-3.md",
|
||||
".changes/updater-js-headers-download-crate.md",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"geolocation-js": patch
|
||||
---
|
||||
|
||||
Update API to match other plugins.
|
||||
+7
-1
@@ -26,9 +26,15 @@ target/
|
||||
# compiled plugins
|
||||
dist-js/
|
||||
|
||||
# plugins .tauri director
|
||||
# plugins .tauri directory
|
||||
/plugins/*/.tauri
|
||||
|
||||
# examples
|
||||
examples/*/dist
|
||||
plugins/*/examples/*/dist
|
||||
examples/*/src-tauri/gen/schemas
|
||||
plugins/*/examples/*/src-tauri/gen/schemas
|
||||
|
||||
# logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
@@ -24,3 +24,4 @@ CHANGELOG.md
|
||||
# mobile build
|
||||
**/ios/.build
|
||||
**/.tauri
|
||||
plugins/*/android/build
|
||||
|
||||
Generated
+410
-77
@@ -102,6 +102,12 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aligned-vec"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
|
||||
|
||||
[[package]]
|
||||
name = "alloc-no-stdlib"
|
||||
version = "2.0.4"
|
||||
@@ -206,9 +212,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.87"
|
||||
version = "1.0.89"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8"
|
||||
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
|
||||
|
||||
[[package]]
|
||||
name = "api"
|
||||
@@ -225,7 +231,9 @@ dependencies = [
|
||||
"tauri-plugin-clipboard-manager",
|
||||
"tauri-plugin-dialog",
|
||||
"tauri-plugin-fs",
|
||||
"tauri-plugin-geolocation",
|
||||
"tauri-plugin-global-shortcut",
|
||||
"tauri-plugin-haptics",
|
||||
"tauri-plugin-http",
|
||||
"tauri-plugin-log",
|
||||
"tauri-plugin-nfc",
|
||||
@@ -286,13 +294,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "arboard"
|
||||
version = "3.4.0"
|
||||
version = "3.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89"
|
||||
checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4"
|
||||
dependencies = [
|
||||
"clipboard-win",
|
||||
"core-graphics 0.23.2",
|
||||
"image 0.25.2",
|
||||
"image",
|
||||
"log",
|
||||
"objc2",
|
||||
"objc2-app-kit",
|
||||
@@ -303,10 +311,21 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arrayref"
|
||||
version = "0.3.8"
|
||||
name = "arg_enum_proc_macro"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a"
|
||||
checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.77",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arrayref"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
@@ -337,6 +356,16 @@ dependencies = [
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "assert-json-diff"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-broadcast"
|
||||
version = "0.7.1"
|
||||
@@ -431,9 +460,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "async-process"
|
||||
version = "2.2.4"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374"
|
||||
checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
|
||||
dependencies = [
|
||||
"async-channel",
|
||||
"async-io",
|
||||
@@ -446,7 +475,6 @@ dependencies = [
|
||||
"futures-lite",
|
||||
"rustix",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -550,6 +578,29 @@ version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
||||
|
||||
[[package]]
|
||||
name = "av1-grain"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arrayvec",
|
||||
"log",
|
||||
"nom",
|
||||
"num-rational",
|
||||
"v_frame",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "avif-serialize"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "backtrace"
|
||||
version = "0.3.74"
|
||||
@@ -625,6 +676,12 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitstream-io"
|
||||
version = "2.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e"
|
||||
|
||||
[[package]]
|
||||
name = "bitvec"
|
||||
version = "1.0.1"
|
||||
@@ -748,6 +805,12 @@ dependencies = [
|
||||
"alloc-stdlib",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "built"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.16.0"
|
||||
@@ -883,10 +946,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.1.18"
|
||||
version = "1.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476"
|
||||
checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
"shlex",
|
||||
]
|
||||
|
||||
@@ -1088,6 +1153,16 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "colored"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "combine"
|
||||
version = "4.6.7"
|
||||
@@ -1888,9 +1963,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "error-code"
|
||||
version = "3.2.0"
|
||||
version = "3.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b"
|
||||
checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f"
|
||||
|
||||
[[package]]
|
||||
name = "etcetera"
|
||||
@@ -1961,7 +2036,7 @@ version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee"
|
||||
dependencies = [
|
||||
"colored",
|
||||
"colored 1.9.4",
|
||||
"log",
|
||||
]
|
||||
|
||||
@@ -2526,9 +2601,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "global-hotkey"
|
||||
version = "0.6.1"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4b86f7342b0e2abcf5e50ed8afd8bb9ffb6e30619d90f1e1a774b934a61f3e9"
|
||||
checksum = "d1b75248f33c73df1ed69673f6cb36d2e048ae84d29aa1d3e53199d138ebb1df"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"keyboard-types",
|
||||
@@ -2808,6 +2883,7 @@ dependencies = [
|
||||
"http",
|
||||
"http-body",
|
||||
"httparse",
|
||||
"httpdate",
|
||||
"itoa 1.0.11",
|
||||
"pin-project-lite",
|
||||
"smallvec",
|
||||
@@ -2852,9 +2928,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hyper-util"
|
||||
version = "0.1.7"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9"
|
||||
checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures-channel",
|
||||
@@ -2929,24 +3005,6 @@ dependencies = [
|
||||
"unicode-normalization",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.24.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"byteorder",
|
||||
"color_quant",
|
||||
"exr",
|
||||
"gif",
|
||||
"jpeg-decoder",
|
||||
"num-traits",
|
||||
"png",
|
||||
"qoi",
|
||||
"tiff",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.25.2"
|
||||
@@ -2955,11 +3013,37 @@ checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"byteorder-lite",
|
||||
"color_quant",
|
||||
"exr",
|
||||
"gif",
|
||||
"image-webp",
|
||||
"num-traits",
|
||||
"png",
|
||||
"qoi",
|
||||
"ravif",
|
||||
"rayon",
|
||||
"rgb",
|
||||
"tiff",
|
||||
"zune-core",
|
||||
"zune-jpeg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "image-webp"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904"
|
||||
dependencies = [
|
||||
"byteorder-lite",
|
||||
"quick-error 2.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "imgref"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "1.9.3"
|
||||
@@ -3030,6 +3114,17 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "interpolate_name"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.77",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iota-crypto"
|
||||
version = "0.23.2"
|
||||
@@ -3130,6 +3225,15 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d101775d2bc8f99f4ac18bf29b9ed70c0dd138b9a1e88d7b80179470cbbe8bd2"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.8"
|
||||
@@ -3187,14 +3291,20 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
||||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jpeg-decoder"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
|
||||
dependencies = [
|
||||
"rayon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
@@ -3354,6 +3464,17 @@ dependencies = [
|
||||
"rle-decode-fast",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libfuzzer-sys"
|
||||
version = "0.4.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"cc",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.7.4"
|
||||
@@ -3455,6 +3576,15 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "loop9"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
|
||||
dependencies = [
|
||||
"imgref",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mac"
|
||||
version = "0.1.1"
|
||||
@@ -3463,9 +3593,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
|
||||
[[package]]
|
||||
name = "mac-notification-sys"
|
||||
version = "0.6.1"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64"
|
||||
checksum = "dce8f34f3717aa37177e723df6c1fc5fb02b2a1087374ea3fe0ea42316dc8f91"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"dirs-next",
|
||||
@@ -3518,6 +3648,16 @@ version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
|
||||
|
||||
[[package]]
|
||||
name = "maybe-rayon"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"rayon",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "md-5"
|
||||
version = "0.10.6"
|
||||
@@ -3623,6 +3763,30 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mockito"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d"
|
||||
dependencies = [
|
||||
"assert-json-diff",
|
||||
"bytes",
|
||||
"colored 2.1.0",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"http-body-util",
|
||||
"hyper",
|
||||
"hyper-util",
|
||||
"log",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
"serde_json",
|
||||
"serde_urlencoded",
|
||||
"similar",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "muda"
|
||||
version = "0.14.1"
|
||||
@@ -3735,6 +3899,12 @@ dependencies = [
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "noop_proc_macro"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
|
||||
|
||||
[[package]]
|
||||
name = "notify"
|
||||
version = "6.1.1"
|
||||
@@ -3771,9 +3941,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "notify-rust"
|
||||
version = "4.11.1"
|
||||
version = "4.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26a1d03b6305ecefdd9c6c60150179bb8d9f0cd4e64bbcad1e41419e7bf5e414"
|
||||
checksum = "5134a72dc570b178bff81b01e81ab14a6fcc015391ed4b3b14853090658cd3a3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"mac-notification-sys",
|
||||
@@ -3792,6 +3962,16 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-bigint"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
|
||||
dependencies = [
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-bigint-dig"
|
||||
version = "0.8.4"
|
||||
@@ -3815,6 +3995,17 @@ version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
||||
|
||||
[[package]]
|
||||
name = "num-derive"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.77",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.46"
|
||||
@@ -3835,6 +4026,17 @@ dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-rational"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.19"
|
||||
@@ -4014,9 +4216,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.19.0"
|
||||
version = "1.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||
checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
@@ -4581,6 +4783,25 @@ dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "profiling"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58"
|
||||
dependencies = [
|
||||
"profiling-procmacros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "profiling-procmacros"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.77",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "psl-types"
|
||||
version = "2.0.11"
|
||||
@@ -4632,6 +4853,12 @@ version = "1.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.31.0"
|
||||
@@ -4794,6 +5021,57 @@ dependencies = [
|
||||
"rand_core 0.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rav1e"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"arg_enum_proc_macro",
|
||||
"arrayvec",
|
||||
"av1-grain",
|
||||
"bitstream-io",
|
||||
"built",
|
||||
"cfg-if",
|
||||
"interpolate_name",
|
||||
"itertools",
|
||||
"libc",
|
||||
"libfuzzer-sys",
|
||||
"log",
|
||||
"maybe-rayon",
|
||||
"new_debug_unreachable",
|
||||
"noop_proc_macro",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"once_cell",
|
||||
"paste",
|
||||
"profiling",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"simd_helpers",
|
||||
"system-deps",
|
||||
"thiserror",
|
||||
"v_frame",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ravif"
|
||||
version = "0.11.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85be49d628515bb99a01c44200009f0a4167c252f036445b975b35daf952258c"
|
||||
dependencies = [
|
||||
"avif-serialize",
|
||||
"bitstream-io",
|
||||
"imgref",
|
||||
"loop9",
|
||||
"quick-error 2.0.1",
|
||||
"rav1e",
|
||||
"rayon",
|
||||
"rgb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
version = "0.6.2"
|
||||
@@ -4833,9 +5111,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.3"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
|
||||
checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
]
|
||||
@@ -4995,6 +5273,15 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rgb"
|
||||
version = "0.8.50"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ring"
|
||||
version = "0.17.8"
|
||||
@@ -5138,9 +5425,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.36"
|
||||
version = "0.38.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36"
|
||||
checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"errno",
|
||||
@@ -5151,9 +5438,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rustls"
|
||||
version = "0.23.12"
|
||||
version = "0.23.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044"
|
||||
checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"ring",
|
||||
@@ -5207,9 +5494,9 @@ checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0"
|
||||
|
||||
[[package]]
|
||||
name = "rustls-webpki"
|
||||
version = "0.102.7"
|
||||
version = "0.102.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56"
|
||||
checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"rustls-pki-types",
|
||||
@@ -5229,7 +5516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"quick-error",
|
||||
"quick-error 1.2.3",
|
||||
"tempfile",
|
||||
"wait-timeout",
|
||||
]
|
||||
@@ -5608,12 +5895,27 @@ version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
||||
|
||||
[[package]]
|
||||
name = "simd_helpers"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
|
||||
dependencies = [
|
||||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "simdutf8"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a"
|
||||
|
||||
[[package]]
|
||||
name = "similar"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
|
||||
|
||||
[[package]]
|
||||
name = "single-instance-example"
|
||||
version = "0.1.0"
|
||||
@@ -6261,13 +6563,12 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.0.0-rc.12"
|
||||
version = "2.0.0-rc.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65e5d4a319f11ae72c77d0f4dbd9703ab6b401eb91d1ca88d89c33d13d4ea20c"
|
||||
checksum = "2fa32e2741bda64c1da02d93252a466893180052fc6de61c8803b0356504b70d"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
"cocoa",
|
||||
"dirs 5.0.1",
|
||||
"dunce",
|
||||
"embed_plist",
|
||||
@@ -6278,13 +6579,15 @@ dependencies = [
|
||||
"heck 0.5.0",
|
||||
"http",
|
||||
"http-range",
|
||||
"image 0.25.2",
|
||||
"image",
|
||||
"jni",
|
||||
"libc",
|
||||
"log",
|
||||
"mime",
|
||||
"muda",
|
||||
"objc",
|
||||
"objc2",
|
||||
"objc2-app-kit",
|
||||
"objc2-foundation",
|
||||
"percent-encoding",
|
||||
"plist",
|
||||
"raw-window-handle",
|
||||
@@ -6451,7 +6754,7 @@ name = "tauri-plugin-clipboard-manager"
|
||||
version = "2.0.0-rc.4"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"image 0.24.9",
|
||||
"image",
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -6517,7 +6820,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-geolocation"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.4"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6807,10 +7110,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-upload"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
"mockito",
|
||||
"read-progress-stream",
|
||||
"reqwest",
|
||||
"serde",
|
||||
@@ -6841,7 +7145,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.0.0-rc.4"
|
||||
version = "2.0.0-rc.5"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"log",
|
||||
@@ -6873,15 +7177,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.0.0-rc.11"
|
||||
version = "2.0.0-rc.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "466c418aef2ddc7d31173a5b00bfae3df9b58ed66644339f3ca55008bfc54f25"
|
||||
checksum = "e17625b7cf63958d53945e199391d11c9f195fb3d1cb8aeb64dc3084d0091b92"
|
||||
dependencies = [
|
||||
"cocoa",
|
||||
"gtk",
|
||||
"http",
|
||||
"jni",
|
||||
"log",
|
||||
"objc2",
|
||||
"objc2-app-kit",
|
||||
"objc2-foundation",
|
||||
"percent-encoding",
|
||||
"raw-window-handle",
|
||||
"softbuffer",
|
||||
@@ -7113,6 +7419,7 @@ dependencies = [
|
||||
"bytes",
|
||||
"libc",
|
||||
"mio 1.0.2",
|
||||
"parking_lot",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2",
|
||||
@@ -7178,15 +7485,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-tungstenite"
|
||||
version = "0.23.1"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd"
|
||||
checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
"native-tls",
|
||||
"rustls",
|
||||
"rustls-native-certs 0.7.3",
|
||||
"rustls-native-certs 0.8.0",
|
||||
"rustls-pki-types",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
@@ -7391,9 +7698,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.23.0"
|
||||
version = "0.24.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8"
|
||||
checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"bytes",
|
||||
@@ -7491,9 +7798,9 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-normalization"
|
||||
@@ -7512,9 +7819,9 @@ checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.11.0"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
|
||||
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
||||
|
||||
[[package]]
|
||||
name = "unicode_categories"
|
||||
@@ -7614,6 +7921,17 @@ dependencies = [
|
||||
"getrandom 0.2.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "v_frame"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
|
||||
dependencies = [
|
||||
"aligned-vec",
|
||||
"num-traits",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.0"
|
||||
@@ -8671,6 +8989,12 @@ dependencies = [
|
||||
"simd-adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zune-core"
|
||||
version = "0.4.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
|
||||
|
||||
[[package]]
|
||||
name = "zune-inflate"
|
||||
version = "0.2.54"
|
||||
@@ -8680,6 +9004,15 @@ dependencies = [
|
||||
"simd-adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zune-jpeg"
|
||||
version = "0.4.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768"
|
||||
dependencies = [
|
||||
"zune-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zvariant"
|
||||
version = "4.0.0"
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ resolver = "2"
|
||||
[workspace.dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
log = "0.4"
|
||||
tauri = { version = "2.0.0-rc.12", default-features = false }
|
||||
tauri = { version = "2.0.0-rc.14", default-features = false }
|
||||
tauri-build = "2.0.0-rc.11"
|
||||
tauri-plugin = "2.0.0-rc.11"
|
||||
tauri-utils = "2.0.0-rc.11"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/dist/*
|
||||
!/dist/.gitkeep
|
||||
Vendored
@@ -16,7 +16,9 @@
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-geolocation": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-haptics": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-http": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-nfc": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-rc.1",
|
||||
@@ -31,7 +33,7 @@
|
||||
"@iconify-json/codicon": "^1.1.37",
|
||||
"@iconify-json/ph": "^1.1.8",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||
"@tauri-apps/cli": "2.0.0-rc.14",
|
||||
"@tauri-apps/cli": "2.0.0-rc.15",
|
||||
"@unocss/extractor-svelte": "^0.62.0",
|
||||
"svelte": "^4.2.19",
|
||||
"unocss": "^0.62.0",
|
||||
|
||||
@@ -59,6 +59,8 @@ tauri-plugin-window-state = { path = "../../../plugins/window-state", version =
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.4" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.0.0-rc.3" }
|
||||
|
||||
[features]
|
||||
prod = ["tauri/custom-protocol"]
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
"barcode-scanner:allow-scan",
|
||||
"barcode-scanner:allow-cancel",
|
||||
"barcode-scanner:allow-request-permissions",
|
||||
"barcode-scanner:allow-check-permissions"
|
||||
"barcode-scanner:allow-check-permissions",
|
||||
"geolocation:allow-check-permissions",
|
||||
"geolocation:allow-request-permissions",
|
||||
"geolocation:allow-watch-position",
|
||||
"geolocation:allow-get-current-position"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -55,6 +55,8 @@ pub fn run() {
|
||||
app.handle().plugin(tauri_plugin_barcode_scanner::init())?;
|
||||
app.handle().plugin(tauri_plugin_nfc::init())?;
|
||||
app.handle().plugin(tauri_plugin_biometric::init())?;
|
||||
app.handle().plugin(tauri_plugin_geolocation::init())?;
|
||||
app.handle().plugin(tauri_plugin_haptics::init())?;
|
||||
}
|
||||
|
||||
let mut webview_window_builder =
|
||||
|
||||
+168
-165
@@ -1,203 +1,208 @@
|
||||
<script>
|
||||
import { writable } from "svelte/store";
|
||||
import { open } from "@tauri-apps/plugin-shell";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { getCurrentWebview } from "@tauri-apps/api/webview";
|
||||
import * as os from "@tauri-apps/plugin-os";
|
||||
import { writable } from 'svelte/store'
|
||||
import { open } from '@tauri-apps/plugin-shell'
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window'
|
||||
import { getCurrentWebview } from '@tauri-apps/api/webview'
|
||||
import * as os from '@tauri-apps/plugin-os'
|
||||
|
||||
import Welcome from "./views/Welcome.svelte";
|
||||
import Cli from "./views/Cli.svelte";
|
||||
import Communication from "./views/Communication.svelte";
|
||||
import Dialog from "./views/Dialog.svelte";
|
||||
import FileSystem from "./views/FileSystem.svelte";
|
||||
import Http from "./views/Http.svelte";
|
||||
import Notifications from "./views/Notifications.svelte";
|
||||
import Shortcuts from "./views/Shortcuts.svelte";
|
||||
import Shell from "./views/Shell.svelte";
|
||||
import Store from "./views/Store.svelte";
|
||||
import Updater from "./views/Updater.svelte";
|
||||
import Clipboard from "./views/Clipboard.svelte";
|
||||
import WebRTC from "./views/WebRTC.svelte";
|
||||
import Scanner from "./views/Scanner.svelte";
|
||||
import Biometric from "./views/Biometric.svelte";
|
||||
import Welcome from './views/Welcome.svelte'
|
||||
import Cli from './views/Cli.svelte'
|
||||
import Communication from './views/Communication.svelte'
|
||||
import Dialog from './views/Dialog.svelte'
|
||||
import FileSystem from './views/FileSystem.svelte'
|
||||
import Http from './views/Http.svelte'
|
||||
import Notifications from './views/Notifications.svelte'
|
||||
import Shortcuts from './views/Shortcuts.svelte'
|
||||
import Shell from './views/Shell.svelte'
|
||||
import Store from './views/Store.svelte'
|
||||
import Updater from './views/Updater.svelte'
|
||||
import Clipboard from './views/Clipboard.svelte'
|
||||
import WebRTC from './views/WebRTC.svelte'
|
||||
import Scanner from './views/Scanner.svelte'
|
||||
import Biometric from './views/Biometric.svelte'
|
||||
import Geolocation from './views/Geolocation.svelte'
|
||||
|
||||
import { onMount, tick } from "svelte";
|
||||
import { ask } from "@tauri-apps/plugin-dialog";
|
||||
import Nfc from "./views/Nfc.svelte";
|
||||
import { onMount, tick } from 'svelte'
|
||||
import { ask } from '@tauri-apps/plugin-dialog'
|
||||
import Nfc from './views/Nfc.svelte'
|
||||
|
||||
const appWindow = getCurrentWindow();
|
||||
const appWindow = getCurrentWindow()
|
||||
|
||||
if (appWindow.label !== "main") {
|
||||
if (appWindow.label !== 'main') {
|
||||
appWindow.onCloseRequested(async (event) => {
|
||||
const confirmed = await confirm("Are you sure?");
|
||||
const confirmed = await confirm('Are you sure?')
|
||||
if (!confirmed) {
|
||||
// user did not confirm closing the window; let's prevent it
|
||||
event.preventDefault();
|
||||
event.preventDefault()
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
getCurrentWebview().onDragDropEvent((event) => {
|
||||
onMessage(`File drop: ${JSON.stringify(event.payload)}`);
|
||||
});
|
||||
onMessage(`File drop: ${JSON.stringify(event.payload)}`)
|
||||
})
|
||||
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
const isMobile =
|
||||
userAgent.includes("android") || userAgent.includes("iphone");
|
||||
const userAgent = navigator.userAgent.toLowerCase()
|
||||
const isMobile = userAgent.includes('android') || userAgent.includes('iphone')
|
||||
|
||||
const views = [
|
||||
{
|
||||
label: "Welcome",
|
||||
label: 'Welcome',
|
||||
component: Welcome,
|
||||
icon: "i-ph-hand-waving",
|
||||
icon: 'i-ph-hand-waving'
|
||||
},
|
||||
{
|
||||
label: "Communication",
|
||||
label: 'Communication',
|
||||
component: Communication,
|
||||
icon: "i-codicon-radio-tower",
|
||||
icon: 'i-codicon-radio-tower'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "CLI",
|
||||
label: 'CLI',
|
||||
component: Cli,
|
||||
icon: "i-codicon-terminal",
|
||||
icon: 'i-codicon-terminal'
|
||||
},
|
||||
{
|
||||
label: "Dialog",
|
||||
label: 'Dialog',
|
||||
component: Dialog,
|
||||
icon: "i-codicon-multiple-windows",
|
||||
icon: 'i-codicon-multiple-windows'
|
||||
},
|
||||
{
|
||||
label: "File system",
|
||||
label: 'File system',
|
||||
component: FileSystem,
|
||||
icon: "i-codicon-files",
|
||||
icon: 'i-codicon-files'
|
||||
},
|
||||
{
|
||||
label: "HTTP",
|
||||
label: 'HTTP',
|
||||
component: Http,
|
||||
icon: "i-ph-globe-hemisphere-west",
|
||||
icon: 'i-ph-globe-hemisphere-west'
|
||||
},
|
||||
{
|
||||
label: "Notifications",
|
||||
label: 'Notifications',
|
||||
component: Notifications,
|
||||
icon: "i-codicon-bell-dot",
|
||||
icon: 'i-codicon-bell-dot'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Shortcuts",
|
||||
label: 'Shortcuts',
|
||||
component: Shortcuts,
|
||||
icon: "i-codicon-record-keys",
|
||||
icon: 'i-codicon-record-keys'
|
||||
},
|
||||
{
|
||||
label: "Shell",
|
||||
label: 'Shell',
|
||||
component: Shell,
|
||||
icon: "i-codicon-terminal-bash",
|
||||
icon: 'i-codicon-terminal-bash'
|
||||
},
|
||||
{
|
||||
label: "Store",
|
||||
label: 'Store',
|
||||
component: Store,
|
||||
icon: "i-codicon-file-code",
|
||||
icon: 'i-codicon-file-code'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Updater",
|
||||
label: 'Updater',
|
||||
component: Updater,
|
||||
icon: "i-codicon-cloud-download",
|
||||
icon: 'i-codicon-cloud-download'
|
||||
},
|
||||
{
|
||||
label: "Clipboard",
|
||||
label: 'Clipboard',
|
||||
component: Clipboard,
|
||||
icon: "i-codicon-clippy",
|
||||
icon: 'i-codicon-clippy'
|
||||
},
|
||||
{
|
||||
label: "WebRTC",
|
||||
label: 'WebRTC',
|
||||
component: WebRTC,
|
||||
icon: "i-ph-broadcast",
|
||||
icon: 'i-ph-broadcast'
|
||||
},
|
||||
isMobile && {
|
||||
label: "Scanner",
|
||||
label: 'Scanner',
|
||||
component: Scanner,
|
||||
icon: "i-ph-scan",
|
||||
icon: 'i-ph-scan'
|
||||
},
|
||||
isMobile && {
|
||||
label: "NFC",
|
||||
label: 'NFC',
|
||||
component: Nfc,
|
||||
icon: "i-ph-nfc",
|
||||
icon: 'i-ph-nfc'
|
||||
},
|
||||
isMobile && {
|
||||
label: "Biometric",
|
||||
label: 'Biometric',
|
||||
component: Biometric,
|
||||
icon: "i-ph-scan",
|
||||
icon: 'i-ph-scan'
|
||||
},
|
||||
];
|
||||
isMobile && {
|
||||
label: 'Geolocation',
|
||||
component: Geolocation,
|
||||
icon: 'i-ph-map-pin'
|
||||
}
|
||||
]
|
||||
|
||||
let selected = views[0];
|
||||
let selected = views[0]
|
||||
function select(view) {
|
||||
selected = view;
|
||||
selected = view
|
||||
}
|
||||
|
||||
// Window controls
|
||||
let isWindowMaximized;
|
||||
let isWindowMaximized
|
||||
onMount(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
isWindowMaximized = await appWindow.isMaximized()
|
||||
appWindow.onResized(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
});
|
||||
});
|
||||
isWindowMaximized = await appWindow.isMaximized()
|
||||
})
|
||||
})
|
||||
|
||||
function minimize() {
|
||||
appWindow.minimize();
|
||||
appWindow.minimize()
|
||||
}
|
||||
|
||||
async function toggleMaximize() {
|
||||
(await appWindow.isMaximized())
|
||||
;(await appWindow.isMaximized())
|
||||
? appWindow.unmaximize()
|
||||
: appWindow.maximize();
|
||||
: appWindow.maximize()
|
||||
}
|
||||
|
||||
let confirmed_close = false;
|
||||
let confirmed_close = false
|
||||
async function close() {
|
||||
if (!confirmed_close) {
|
||||
confirmed_close = await ask(
|
||||
"Are you sure that you want to close this window?",
|
||||
'Are you sure that you want to close this window?',
|
||||
{
|
||||
title: "Tauri API",
|
||||
title: 'Tauri API'
|
||||
}
|
||||
);
|
||||
)
|
||||
if (confirmed_close) {
|
||||
appWindow.close();
|
||||
appWindow.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dark/light
|
||||
let isDark;
|
||||
let isDark
|
||||
onMount(() => {
|
||||
isDark = localStorage && localStorage.getItem("theme") == "dark";
|
||||
applyTheme(isDark);
|
||||
});
|
||||
isDark = localStorage && localStorage.getItem('theme') == 'dark'
|
||||
applyTheme(isDark)
|
||||
})
|
||||
function applyTheme(isDark) {
|
||||
const html = document.querySelector("html");
|
||||
isDark ? html.classList.add("dark") : html.classList.remove("dark");
|
||||
localStorage && localStorage.setItem("theme", isDark ? "dark" : "");
|
||||
const html = document.querySelector('html')
|
||||
isDark ? html.classList.add('dark') : html.classList.remove('dark')
|
||||
localStorage && localStorage.setItem('theme', isDark ? 'dark' : '')
|
||||
}
|
||||
function toggleDark() {
|
||||
isDark = !isDark;
|
||||
applyTheme(isDark);
|
||||
isDark = !isDark
|
||||
applyTheme(isDark)
|
||||
}
|
||||
|
||||
// Console
|
||||
let messages = writable([]);
|
||||
let consoleTextEl;
|
||||
let messages = writable([])
|
||||
let consoleTextEl
|
||||
async function onMessage(value) {
|
||||
messages.update((r) => [
|
||||
...r,
|
||||
{
|
||||
html:
|
||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
||||
(typeof value === "string" ? value : JSON.stringify(value, null, 1)) +
|
||||
"</pre>",
|
||||
},
|
||||
]);
|
||||
await tick();
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
|
||||
(typeof value === 'string' ? value : JSON.stringify(value, null, 1)) +
|
||||
'</pre>'
|
||||
}
|
||||
])
|
||||
await tick()
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||
}
|
||||
|
||||
// this function is renders HTML without sanitizing it so it's insecure
|
||||
@@ -209,111 +214,109 @@
|
||||
html:
|
||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
||||
html +
|
||||
"</pre>",
|
||||
},
|
||||
]);
|
||||
await tick();
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
|
||||
'</pre>'
|
||||
}
|
||||
])
|
||||
await tick()
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||
}
|
||||
|
||||
function clear() {
|
||||
messages.update(() => []);
|
||||
messages.update(() => [])
|
||||
}
|
||||
|
||||
let consoleEl, consoleH, cStartY;
|
||||
let minConsoleHeight = 50;
|
||||
let consoleEl, consoleH, cStartY
|
||||
let minConsoleHeight = 50
|
||||
function startResizingConsole(e) {
|
||||
cStartY = e.clientY;
|
||||
cStartY = e.clientY
|
||||
|
||||
const styles = window.getComputedStyle(consoleEl);
|
||||
consoleH = parseInt(styles.height, 10);
|
||||
const styles = window.getComputedStyle(consoleEl)
|
||||
consoleH = parseInt(styles.height, 10)
|
||||
|
||||
const moveHandler = (e) => {
|
||||
const dy = e.clientY - cStartY;
|
||||
const newH = consoleH - dy;
|
||||
const dy = e.clientY - cStartY
|
||||
const newH = consoleH - dy
|
||||
consoleEl.style.height = `${
|
||||
newH < minConsoleHeight ? minConsoleHeight : newH
|
||||
}px`;
|
||||
};
|
||||
}px`
|
||||
}
|
||||
const upHandler = () => {
|
||||
document.removeEventListener("mouseup", upHandler);
|
||||
document.removeEventListener("mousemove", moveHandler);
|
||||
};
|
||||
document.addEventListener("mouseup", upHandler);
|
||||
document.addEventListener("mousemove", moveHandler);
|
||||
document.removeEventListener('mouseup', upHandler)
|
||||
document.removeEventListener('mousemove', moveHandler)
|
||||
}
|
||||
document.addEventListener('mouseup', upHandler)
|
||||
document.addEventListener('mousemove', moveHandler)
|
||||
}
|
||||
|
||||
let isWindows;
|
||||
let isWindows
|
||||
onMount(async () => {
|
||||
isWindows = (await os.platform()) === "windows";
|
||||
});
|
||||
isWindows = (await os.platform()) === 'windows'
|
||||
})
|
||||
|
||||
// mobile
|
||||
let isSideBarOpen = false;
|
||||
let sidebar;
|
||||
let sidebarToggle;
|
||||
let isDraggingSideBar = false;
|
||||
let draggingStartPosX = 0;
|
||||
let draggingEndPosX = 0;
|
||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max);
|
||||
let isSideBarOpen = false
|
||||
let sidebar
|
||||
let sidebarToggle
|
||||
let isDraggingSideBar = false
|
||||
let draggingStartPosX = 0
|
||||
let draggingEndPosX = 0
|
||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max)
|
||||
|
||||
function toggleSidebar(sidebar, isSideBarOpen) {
|
||||
sidebar.style.setProperty(
|
||||
"--translate-x",
|
||||
`${isSideBarOpen ? "0" : "-18.75"}rem`
|
||||
);
|
||||
'--translate-x',
|
||||
`${isSideBarOpen ? '0' : '-18.75'}rem`
|
||||
)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
sidebar = document.querySelector("#sidebar");
|
||||
sidebarToggle = document.querySelector("#sidebarToggle");
|
||||
sidebar = document.querySelector('#sidebar')
|
||||
sidebarToggle = document.querySelector('#sidebarToggle')
|
||||
|
||||
document.addEventListener("click", (e) => {
|
||||
document.addEventListener('click', (e) => {
|
||||
if (sidebarToggle.contains(e.target)) {
|
||||
isSideBarOpen = !isSideBarOpen;
|
||||
isSideBarOpen = !isSideBarOpen
|
||||
} else if (isSideBarOpen && !sidebar.contains(e.target)) {
|
||||
isSideBarOpen = false;
|
||||
isSideBarOpen = false
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchstart", (e) => {
|
||||
if (sidebarToggle.contains(e.target)) return;
|
||||
document.addEventListener('touchstart', (e) => {
|
||||
if (sidebarToggle.contains(e.target)) return
|
||||
|
||||
const x = e.touches[0].clientX;
|
||||
const x = e.touches[0].clientX
|
||||
if ((0 < x && x < 20 && !isSideBarOpen) || isSideBarOpen) {
|
||||
isDraggingSideBar = true;
|
||||
draggingStartPosX = x;
|
||||
isDraggingSideBar = true
|
||||
draggingStartPosX = x
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchmove", (e) => {
|
||||
document.addEventListener('touchmove', (e) => {
|
||||
if (isDraggingSideBar) {
|
||||
const x = e.touches[0].clientX;
|
||||
draggingEndPosX = x;
|
||||
const delta = (x - draggingStartPosX) / 10;
|
||||
const x = e.touches[0].clientX
|
||||
draggingEndPosX = x
|
||||
const delta = (x - draggingStartPosX) / 10
|
||||
sidebar.style.setProperty(
|
||||
"--translate-x",
|
||||
'--translate-x',
|
||||
`-${clamp(0, isSideBarOpen ? 0 - delta : 18.75 - delta, 18.75)}rem`
|
||||
);
|
||||
)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchend", () => {
|
||||
document.addEventListener('touchend', () => {
|
||||
if (isDraggingSideBar) {
|
||||
const delta = (draggingEndPosX - draggingStartPosX) / 10;
|
||||
isSideBarOpen = isSideBarOpen
|
||||
? delta > -(18.75 / 2)
|
||||
: delta > 18.75 / 2;
|
||||
const delta = (draggingEndPosX - draggingStartPosX) / 10
|
||||
isSideBarOpen = isSideBarOpen ? delta > -(18.75 / 2) : delta > 18.75 / 2
|
||||
}
|
||||
|
||||
isDraggingSideBar = false;
|
||||
});
|
||||
});
|
||||
isDraggingSideBar = false
|
||||
})
|
||||
})
|
||||
|
||||
$: {
|
||||
const sidebar = document.querySelector("#sidebar");
|
||||
const sidebar = document.querySelector('#sidebar')
|
||||
if (sidebar) {
|
||||
toggleSidebar(sidebar, isSideBarOpen);
|
||||
toggleSidebar(sidebar, isSideBarOpen)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -332,7 +335,7 @@
|
||||
children:items-center children:justify-center"
|
||||
>
|
||||
<span
|
||||
title={isDark ? "Switch to Light mode" : "Switch to Dark mode"}
|
||||
title={isDark ? 'Switch to Light mode' : 'Switch to Dark mode'}
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={toggleDark}
|
||||
>
|
||||
@@ -350,7 +353,7 @@
|
||||
<div class="i-codicon-chrome-minimize" />
|
||||
</span>
|
||||
<span
|
||||
title={isWindowMaximized ? "Restore" : "Maximize"}
|
||||
title={isWindowMaximized ? 'Restore' : 'Maximize'}
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={toggleMaximize}
|
||||
>
|
||||
@@ -393,7 +396,7 @@
|
||||
bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"
|
||||
>
|
||||
<img
|
||||
on:click={() => open("https://tauri.app/")}
|
||||
on:click={() => open('https://tauri.app/')}
|
||||
class="self-center p-7 cursor-pointer"
|
||||
src="tauri_logo.png"
|
||||
alt="Tauri logo"
|
||||
@@ -449,8 +452,8 @@
|
||||
href="##"
|
||||
class="nv {selected === view ? 'nv_selected' : ''}"
|
||||
on:click={() => {
|
||||
select(view);
|
||||
isSideBarOpen = false;
|
||||
select(view)
|
||||
isSideBarOpen = false
|
||||
}}
|
||||
>
|
||||
<div class="{view.icon} mr-2" />
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<script>
|
||||
import {
|
||||
checkPermissions,
|
||||
requestPermissions,
|
||||
getCurrentPosition
|
||||
} from '@tauri-apps/plugin-geolocation'
|
||||
|
||||
export let onMessage
|
||||
|
||||
async function getPosition() {
|
||||
let permissions = await checkPermissions()
|
||||
if (
|
||||
permissions.location === 'prompt' ||
|
||||
permissions.location === 'prompt-with-rationale'
|
||||
) {
|
||||
permissions = await requestPermissions(['location'])
|
||||
}
|
||||
|
||||
if (permissions.location === 'granted') {
|
||||
getCurrentPosition().then(onMessage).catch(onMessage)
|
||||
} else {
|
||||
onMessage('permission denied')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<button class="btn" id="cli-matches" on:click={getPosition}>
|
||||
Get Position
|
||||
</button>
|
||||
@@ -29,4 +29,4 @@ tauri = { workspace = true, features = ["wry"] }
|
||||
|
||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||
arboard = "3"
|
||||
image = "0.24"
|
||||
image = "0.25"
|
||||
|
||||
@@ -91,7 +91,7 @@ impl<R: Runtime> Clipboard<R> {
|
||||
&image.bytes,
|
||||
image.width as u32,
|
||||
image.height as u32,
|
||||
image::ColorType::Rgba8,
|
||||
image::ExtendedColorType::Rgba8,
|
||||
)?;
|
||||
|
||||
let image = Image::new_owned(buffer, image.width as u32, image.height as u32);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"@tauri-apps/plugin-deep-link": "2.0.0-rc.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.0.0-rc.14",
|
||||
"@tauri-apps/cli": "2.0.0-rc.15",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.0.13"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`60765694`](https://github.com/tauri-apps/plugins-workspace/commit/60765694f54875e22b8eb70b1d2e32dbf0c585c7) ([#1773](https://github.com/tauri-apps/plugins-workspace/pull/1773) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update API to match other plugins.
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Use `PermissionState` from the `tauri` crate, which now also includes a "prompt with rationale" variant for Android (returned when your app must explain to the user why it needs the permission).
|
||||
@@ -21,3 +25,4 @@
|
||||
|
||||
- [`9606089b`](https://github.com/tauri-apps/plugins-workspace/commit/9606089b2add4a17f80ed5a09d59ce94824bd672) ([#1599](https://github.com/tauri-apps/plugins-workspace/pull/1599)) Initial release.
|
||||
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
|
||||
tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "tauri-plugin-geolocation"
|
||||
description = "Get and track the device's current position"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.4"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
@@ -87,16 +87,31 @@ fn main() {
|
||||
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
|
||||
|
||||
```javascript
|
||||
import { getCurrentPosition, watchPosition } from '@tauri-apps/plugin-log'
|
||||
import {
|
||||
checkPermissions,
|
||||
requestPermissions,
|
||||
getCurrentPosition,
|
||||
watchPosition
|
||||
} from '@tauri-apps/plugin-log'
|
||||
|
||||
const pos = await getCurrentPosition()
|
||||
let permissions = await checkPermissions()
|
||||
if (
|
||||
permissions.location === 'prompt' ||
|
||||
permissions.location === 'prompt-with-rationale'
|
||||
) {
|
||||
permissions = await requestPermissions(['location'])
|
||||
}
|
||||
|
||||
await watchPosition(
|
||||
{ enableHighAccuracy: true, timeout: 10000, maximumAge: 0 },
|
||||
(pos) => {
|
||||
console.log(pos)
|
||||
}
|
||||
)
|
||||
if (permissions.location === 'granted') {
|
||||
const pos = await getCurrentPosition()
|
||||
|
||||
await watchPosition(
|
||||
{ enableHighAccuracy: true, timeout: 10000, maximumAge: 0 },
|
||||
(pos) => {
|
||||
console.log(pos)
|
||||
}
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -60,18 +60,8 @@ private const val ALIAS_COARSE_LOCATION: String = "coarseLocation"
|
||||
]
|
||||
)
|
||||
class GeolocationPlugin(private val activity: Activity): Plugin(activity) {
|
||||
private lateinit var implementation: Geolocation// = Geolocation(activity.applicationContext)
|
||||
private var watchers = hashMapOf<Long, Invoke>()
|
||||
|
||||
// If multiple permissions get requested in quick succession not all callbacks will be fired,
|
||||
// So we'll store all requests ourselves instead of using the callback argument.
|
||||
private var positionRequests = mutableListOf<Invoke>()
|
||||
private var watchRequests = mutableListOf<Invoke>()
|
||||
// If getCurrentPosition or watchPosition are called before a prior call is done requesting permission,
|
||||
// the callback will be called with denied for the prior call(s) so we keep track of them to make sure
|
||||
// to only run the logic on the last request.
|
||||
// TODO: Find a better solution after switching to explicit requestPermissions call - likely needs changes in Tauri
|
||||
private var ongoingPermissionRequests = 0;
|
||||
private lateinit var implementation: Geolocation
|
||||
private var watchers = hashMapOf<Long, Pair<Invoke, WatchArgs>>()
|
||||
|
||||
override fun load(webView: WebView) {
|
||||
super.load(webView)
|
||||
@@ -86,8 +76,9 @@ class GeolocationPlugin(private val activity: Activity): Plugin(activity) {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
for (watcher in watchers.values) {
|
||||
startWatch(watcher)
|
||||
// resume watchers
|
||||
for ((watcher, args) in watchers.values) {
|
||||
startWatch(watcher, args)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,83 +103,39 @@ class GeolocationPlugin(private val activity: Activity): Plugin(activity) {
|
||||
@Command
|
||||
fun getCurrentPosition(invoke: Invoke) {
|
||||
val args = invoke.parseArgs(PositionOptions::class.java)
|
||||
val alias = getAlias(args.enableHighAccuracy)
|
||||
|
||||
if (getPermissionState(alias) != PermissionState.GRANTED) {
|
||||
Logger.error("NOT GRANTED");
|
||||
this.positionRequests.add(invoke)
|
||||
this.ongoingPermissionRequests += 1
|
||||
requestPermissionForAlias(alias, invoke, "positionPermissionCallback")
|
||||
val location = implementation.getLastLocation(args.maximumAge)
|
||||
if (location != null) {
|
||||
invoke.resolve(convertLocation(location))
|
||||
} else {
|
||||
Logger.error("GRANTED");
|
||||
getPosition(invoke, args)
|
||||
implementation.sendLocation(args.enableHighAccuracy,
|
||||
{ loc -> invoke.resolve(convertLocation(loc)) },
|
||||
{ error -> invoke.reject(error) })
|
||||
}
|
||||
}
|
||||
|
||||
@PermissionCallback
|
||||
private fun positionPermissionCallback(invoke: Invoke) {
|
||||
Logger.error("positionPermissionCallback - ongoingRequests: " + this.ongoingPermissionRequests.toString())
|
||||
|
||||
this.ongoingPermissionRequests -= 1
|
||||
|
||||
if (this.ongoingPermissionRequests > 0) {
|
||||
return
|
||||
}
|
||||
|
||||
val pRequests = this.positionRequests.toTypedArray()
|
||||
val wRequests = this.watchRequests.toTypedArray()
|
||||
this.positionRequests.clear()
|
||||
this.watchRequests.clear()
|
||||
|
||||
// TODO: capacitor only checks for coarse here
|
||||
val permissionGranted = getPermissionState(ALIAS_COARSE_LOCATION) == PermissionState.GRANTED;
|
||||
Logger.error("positionPermissionCallback - permissionGranted: $permissionGranted");
|
||||
|
||||
for (inv in pRequests) {
|
||||
if (permissionGranted) {
|
||||
val args = inv.parseArgs(PositionOptions::class.java)
|
||||
|
||||
implementation.sendLocation(args.enableHighAccuracy,
|
||||
{ location -> inv.resolve(convertLocation(location)) },
|
||||
{ error -> inv.reject(error) })
|
||||
} else {
|
||||
inv.reject("Location permission was denied.")
|
||||
}
|
||||
}
|
||||
|
||||
for (inv in wRequests) {
|
||||
if (permissionGranted) {
|
||||
startWatch(invoke)
|
||||
} else {
|
||||
inv.reject("Location permission was denied.")
|
||||
}
|
||||
}
|
||||
val permissionsResultJSON = JSObject()
|
||||
permissionsResultJSON.put("location", getPermissionState(ALIAS_LOCATION))
|
||||
permissionsResultJSON.put("coarseLocation", getPermissionState(ALIAS_COARSE_LOCATION))
|
||||
invoke.resolve(permissionsResultJSON)
|
||||
}
|
||||
|
||||
@Command
|
||||
fun watchPosition(invoke: Invoke) {
|
||||
val args = invoke.parseArgs(WatchArgs::class.java)
|
||||
val alias = getAlias(args.options.enableHighAccuracy)
|
||||
|
||||
if (getPermissionState(alias) != PermissionState.GRANTED) {
|
||||
this.watchRequests.add(invoke)
|
||||
this.ongoingPermissionRequests += 1
|
||||
requestPermissionForAlias(alias, invoke, "positionPermissionCallback")
|
||||
} else {
|
||||
startWatch(invoke)
|
||||
}
|
||||
startWatch(invoke, args)
|
||||
}
|
||||
|
||||
private fun startWatch(invoke: Invoke) {
|
||||
val args = invoke.parseArgs(WatchArgs::class.java)
|
||||
|
||||
private fun startWatch(invoke: Invoke, args: WatchArgs) {
|
||||
implementation.requestLocationUpdates(
|
||||
args.options.enableHighAccuracy,
|
||||
args.options.timeout,
|
||||
{ location -> args.channel.send(convertLocation(location)) },
|
||||
{ error -> args.channel.sendObject(error) })
|
||||
|
||||
watchers[args.channel.id] = invoke
|
||||
watchers[args.channel.id] = Pair(invoke, args)
|
||||
}
|
||||
|
||||
@Command
|
||||
@@ -204,19 +151,6 @@ class GeolocationPlugin(private val activity: Activity): Plugin(activity) {
|
||||
invoke.resolve()
|
||||
}
|
||||
|
||||
private fun getPosition(invoke: Invoke, options: PositionOptions) {
|
||||
val location = implementation.getLastLocation(options.maximumAge)
|
||||
if (location != null) {
|
||||
Logger.error("getPosition location non-null")
|
||||
invoke.resolve(convertLocation(location))
|
||||
} else {
|
||||
Logger.error("getPosition location null")
|
||||
implementation.sendLocation(options.enableHighAccuracy,
|
||||
{ loc -> invoke.resolve(convertLocation(loc)) },
|
||||
{ error -> invoke.reject(error) })
|
||||
}
|
||||
}
|
||||
|
||||
private fun convertLocation(location: Location): JSObject {
|
||||
val ret = JSObject()
|
||||
val coords = JSObject()
|
||||
@@ -235,14 +169,4 @@ class GeolocationPlugin(private val activity: Activity): Plugin(activity) {
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
private fun getAlias(enableHighAccuracy: Boolean): String {
|
||||
var alias = ALIAS_LOCATION;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
if (!enableHighAccuracy) {
|
||||
alias = ALIAS_COARSE_LOCATION;
|
||||
}
|
||||
}
|
||||
return alias
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_GEOLOCATION__=function(t){"use strict";function r(t,r,e,s){if("a"===e&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?t!==r||!s:!r.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?s:"a"===e?s.call(t):s?s.value:r.get(t)}function e(t,r,e,s,o){if("function"==typeof r?t!==r||!o:!r.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r.set(t,e),e}var s,o,i,a;"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,s.set(this,(()=>{})),o.set(this,0),i.set(this,{}),this.id=function(t,r=!1){return window.__TAURI_INTERNALS__.transformCallback(t,r)}((({message:t,id:a})=>{if(a===r(this,o,"f")){e(this,o,a+1),r(this,s,"f").call(this,t);const n=Object.keys(r(this,i,"f"));if(n.length>0){let t=a+1;for(const e of n.sort()){if(parseInt(e)!==t)break;{const o=r(this,i,"f")[e];delete r(this,i,"f")[e],r(this,s,"f").call(this,o),t+=1}}e(this,o,t)}}else r(this,i,"f")[a.toString()]=t}))}set onmessage(t){e(this,s,t)}get onmessage(){return r(this,s,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function c(t,r={},e){return window.__TAURI_INTERNALS__.invoke(t,r,e)}s=new WeakMap,o=new WeakMap,i=new WeakMap,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"}(a||(a={}));const u={async getCurrentPosition(t){try{return{status:"ok",data:await c("plugin:geolocation|get_current_position",{options:t})}}catch(t){if(t instanceof Error)throw t;return{status:"error",error:t}}},async watchPosition(t,r){try{return{status:"ok",data:await c("plugin:geolocation|watch_position",{options:t,channel:r})}}catch(t){if(t instanceof Error)throw t;return{status:"error",error:t}}},async clearWatch(t){try{return{status:"ok",data:await c("plugin:geolocation|clear_watch",{channelId:t})}}catch(t){if(t instanceof Error)throw t;return{status:"error",error:t}}},async checkPermissions(){try{return{status:"ok",data:await c("plugin:geolocation|check_permissions")}}catch(t){if(t instanceof Error)throw t;return{status:"error",error:t}}},async requestPermissions(t){try{return{status:"ok",data:await c("plugin:geolocation|request_permissions",{permissions:t})}}catch(t){if(t instanceof Error)throw t;return{status:"error",error:t}}}};const{getCurrentPosition:_,clearWatch:h,checkPermissions:f,requestPermissions:w}=u;return t.checkPermissions=f,t.clearWatch=h,t.getCurrentPosition=_,t.requestPermissions=w,t.watchPosition=async function(t,r){const e=new n;return e.onmessage=r,await u.watchPosition(t,e),e.id},t}({});Object.defineProperty(window.__TAURI__,"geolocation",{value:__TAURI_PLUGIN_GEOLOCATION__})}
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_GEOLOCATION__=function(t){"use strict";function e(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function n(t,e,n,i,o){if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var i,o,s;"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),o.set(this,0),s.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:r})=>{if(r===e(this,o,"f")){n(this,o,r+1),e(this,i,"f").call(this,t);const a=Object.keys(e(this,s,"f"));if(a.length>0){let t=r+1;for(const n of a.sort()){if(parseInt(n)!==t)break;{const o=e(this,s,"f")[n];delete e(this,s,"f")[n],e(this,i,"f").call(this,o),t+=1}}n(this,o,t)}}else e(this,s,"f")[r.toString()]=t}))}set onmessage(t){n(this,i,t)}get onmessage(){return e(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}return i=new WeakMap,o=new WeakMap,s=new WeakMap,t.checkPermissions=async function(){return await async function(t){return a(`plugin:${t}|check_permissions`)}("geolocation")},t.clearWatch=async function(t){await a("plugin:geolocation|clear_watch",{channelId:t})},t.getCurrentPosition=async function(t){return await a("plugin:geolocation|get_current_position",{options:t})},t.requestPermissions=async function(t){return await a("plugin:geolocation|request_permissions",{permissions:t})},t.watchPosition=async function(t,e){const n=new r;return n.onmessage=t=>{"string"==typeof t?e(null,t):e(t)},await a("plugin:geolocation|watch_position",{options:t,channel:n}),n.id},t}({});Object.defineProperty(window.__TAURI__,"geolocation",{value:__TAURI_PLUGIN_GEOLOCATION__})}
|
||||
|
||||
@@ -7,7 +7,7 @@ const COMMANDS: &[&str] = &[
|
||||
"watch_position",
|
||||
"clear_watch",
|
||||
"check_permissions",
|
||||
"clear_permissions",
|
||||
"request_permissions",
|
||||
];
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// @ts-nocheck
|
||||
// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually.
|
||||
|
||||
/** user-defined commands **/
|
||||
|
||||
export const commands = {
|
||||
async getCurrentPosition(
|
||||
options: PositionOptions | null
|
||||
): Promise<Result<Position, Error>> {
|
||||
try {
|
||||
return {
|
||||
status: 'ok',
|
||||
data: await TAURI_INVOKE('plugin:geolocation|get_current_position', {
|
||||
options
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Error) throw e
|
||||
else return { status: 'error', error: e as any }
|
||||
}
|
||||
},
|
||||
async watchPosition(
|
||||
options: PositionOptions,
|
||||
channel: any
|
||||
): Promise<Result<null, Error>> {
|
||||
try {
|
||||
return {
|
||||
status: 'ok',
|
||||
data: await TAURI_INVOKE('plugin:geolocation|watch_position', {
|
||||
options,
|
||||
channel
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Error) throw e
|
||||
else return { status: 'error', error: e as any }
|
||||
}
|
||||
},
|
||||
async clearWatch(channelId: number): Promise<Result<null, Error>> {
|
||||
try {
|
||||
return {
|
||||
status: 'ok',
|
||||
data: await TAURI_INVOKE('plugin:geolocation|clear_watch', {
|
||||
channelId
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Error) throw e
|
||||
else return { status: 'error', error: e as any }
|
||||
}
|
||||
},
|
||||
async checkPermissions(): Promise<Result<PermissionStatus, Error>> {
|
||||
try {
|
||||
return {
|
||||
status: 'ok',
|
||||
data: await TAURI_INVOKE('plugin:geolocation|check_permissions')
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Error) throw e
|
||||
else return { status: 'error', error: e as any }
|
||||
}
|
||||
},
|
||||
async requestPermissions(
|
||||
permissions: PermissionType[] | null
|
||||
): Promise<Result<PermissionStatus, Error>> {
|
||||
try {
|
||||
return {
|
||||
status: 'ok',
|
||||
data: await TAURI_INVOKE('plugin:geolocation|request_permissions', {
|
||||
permissions
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof Error) throw e
|
||||
else return { status: 'error', error: e as any }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** user-defined events **/
|
||||
|
||||
/* export const events = __makeEvents__<{
|
||||
randomNumber: RandomNumber;
|
||||
}>({
|
||||
randomNumber: "plugin:geolocation:random-number",
|
||||
}); */
|
||||
|
||||
/** user-defined statics **/
|
||||
|
||||
/** user-defined types **/
|
||||
|
||||
export type Coordinates = {
|
||||
/**
|
||||
* Latitude in decimal degrees.
|
||||
*/
|
||||
latitude: number
|
||||
/**
|
||||
* Longitude in decimal degrees.
|
||||
*/
|
||||
longitude: number
|
||||
/**
|
||||
* Accuracy level of the latitude and longitude coordinates in meters.
|
||||
*/
|
||||
accuracy: number
|
||||
/**
|
||||
* Accuracy level of the altitude coordinate in meters, if available.
|
||||
* Available on all iOS versions and on Android 8 and above.
|
||||
*/
|
||||
altitudeAccuracy: number | null
|
||||
/**
|
||||
* The altitude the user is at, if available.
|
||||
*/
|
||||
altitude: number | null
|
||||
speed: number | null
|
||||
/**
|
||||
* The heading the user is facing, if available.
|
||||
*/
|
||||
heading: number | null
|
||||
}
|
||||
export type Error = never
|
||||
/**
|
||||
* Permission state.
|
||||
*/
|
||||
export type PermissionState =
|
||||
/**
|
||||
* Permission access has been granted.
|
||||
*/
|
||||
| 'granted'
|
||||
/**
|
||||
* Permission access has been denied.
|
||||
*/
|
||||
| 'denied'
|
||||
/**
|
||||
* The end user should be prompted for permission.
|
||||
*/
|
||||
| 'prompt'
|
||||
export type PermissionStatus = {
|
||||
/**
|
||||
* Permission state for the location alias.
|
||||
*
|
||||
* On Android it requests/checks both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions.
|
||||
*
|
||||
* On iOS it requests/checks location permissions.
|
||||
*/
|
||||
location: PermissionState
|
||||
/**
|
||||
* Permissions state for the coarseLoaction alias.
|
||||
*
|
||||
* On Android it requests/checks ACCESS_COARSE_LOCATION.
|
||||
*
|
||||
* On Android 12+, users can choose between Approximate location (ACCESS_COARSE_LOCATION) and Precise location (ACCESS_FINE_LOCATION).
|
||||
*
|
||||
* On iOS it will have the same value as the `location` alias.
|
||||
*/
|
||||
coarseLocation: PermissionState
|
||||
}
|
||||
export type PermissionType = 'location' | 'coarseLocation'
|
||||
export type Position = {
|
||||
/**
|
||||
* Creation time for these coordinates.
|
||||
*/
|
||||
timestamp: number
|
||||
/**
|
||||
* The GPD coordinates along with the accuracy of the data.
|
||||
*/
|
||||
coords: Coordinates
|
||||
}
|
||||
export type PositionOptions = {
|
||||
/**
|
||||
* High accuracy mode (such as GPS, if available)
|
||||
* Will be ignored on Android 12+ if users didn't grant the ACCESS_FINE_LOCATION permission.
|
||||
*/
|
||||
enableHighAccuracy: boolean
|
||||
/**
|
||||
* The maximum wait time in milliseconds for location updates.
|
||||
* On Android the timeout gets ignored for getCurrentPosition.
|
||||
* Ignored on iOS
|
||||
*/
|
||||
timeout: number
|
||||
/**
|
||||
* The maximum age in milliseconds of a possible cached position that is acceptable to return.
|
||||
* Default: 0
|
||||
* Ignored on iOS
|
||||
*/
|
||||
maximumAge: number
|
||||
}
|
||||
//export type RandomNumber = number;
|
||||
|
||||
/** tauri-specta globals **/
|
||||
|
||||
import { invoke as TAURI_INVOKE } from '@tauri-apps/api/core'
|
||||
import * as TAURI_API_EVENT from '@tauri-apps/api/event'
|
||||
import { type WebviewWindow as __WebviewWindow__ } from '@tauri-apps/api/webviewWindow'
|
||||
|
||||
type __EventObj__<T> = {
|
||||
listen: (
|
||||
cb: TAURI_API_EVENT.EventCallback<T>
|
||||
) => ReturnType<typeof TAURI_API_EVENT.listen<T>>
|
||||
once: (
|
||||
cb: TAURI_API_EVENT.EventCallback<T>
|
||||
) => ReturnType<typeof TAURI_API_EVENT.once<T>>
|
||||
emit: T extends null
|
||||
? (payload?: T) => ReturnType<typeof TAURI_API_EVENT.emit>
|
||||
: (payload: T) => ReturnType<typeof TAURI_API_EVENT.emit>
|
||||
}
|
||||
|
||||
export type Result<T, E> =
|
||||
| { status: 'ok'; data: T }
|
||||
| { status: 'error'; error: E }
|
||||
|
||||
function __makeEvents__<T extends Record<string, any>>(
|
||||
mappings: Record<keyof T, string>
|
||||
) {
|
||||
return new Proxy(
|
||||
{} as unknown as {
|
||||
[K in keyof T]: __EventObj__<T[K]> & {
|
||||
(handle: __WebviewWindow__): __EventObj__<T[K]>
|
||||
}
|
||||
},
|
||||
{
|
||||
get: (_, event) => {
|
||||
const name = mappings[event as keyof T]
|
||||
|
||||
return new Proxy((() => {}) as any, {
|
||||
apply: (_, __, [window]: [__WebviewWindow__]) => ({
|
||||
listen: (arg: any) => window.listen(name, arg),
|
||||
once: (arg: any) => window.once(name, arg),
|
||||
emit: (arg: any) => window.emit(name, arg)
|
||||
}),
|
||||
get: (_, command: keyof __EventObj__<any>) => {
|
||||
switch (command) {
|
||||
case 'listen':
|
||||
return (arg: any) => TAURI_API_EVENT.listen(name, arg)
|
||||
case 'once':
|
||||
return (arg: any) => TAURI_API_EVENT.once(name, arg)
|
||||
case 'emit':
|
||||
return (arg: any) => TAURI_API_EVENT.emit(name, arg)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -2,36 +2,137 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/* eslint-disable @typescript-eslint/unbound-method */
|
||||
import {
|
||||
Channel,
|
||||
invoke,
|
||||
PermissionState,
|
||||
checkPermissions as checkPluginPermissions
|
||||
} from '@tauri-apps/api/core'
|
||||
|
||||
import { Channel } from '@tauri-apps/api/core'
|
||||
import { commands, type PositionOptions, type Position } from './bindings'
|
||||
export type Coordinates = {
|
||||
/**
|
||||
* Latitude in decimal degrees.
|
||||
*/
|
||||
latitude: number
|
||||
/**
|
||||
* Longitude in decimal degrees.
|
||||
*/
|
||||
longitude: number
|
||||
/**
|
||||
* Accuracy level of the latitude and longitude coordinates in meters.
|
||||
*/
|
||||
accuracy: number
|
||||
/**
|
||||
* Accuracy level of the altitude coordinate in meters, if available.
|
||||
* Available on all iOS versions and on Android 8 and above.
|
||||
*/
|
||||
altitudeAccuracy: number | null
|
||||
/**
|
||||
* The altitude the user is at, if available.
|
||||
*/
|
||||
altitude: number | null
|
||||
speed: number | null
|
||||
/**
|
||||
* The heading the user is facing, if available.
|
||||
*/
|
||||
heading: number | null
|
||||
}
|
||||
|
||||
export type PermissionStatus = {
|
||||
/**
|
||||
* Permission state for the location alias.
|
||||
*
|
||||
* On Android it requests/checks both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions.
|
||||
*
|
||||
* On iOS it requests/checks location permissions.
|
||||
*/
|
||||
location: PermissionState
|
||||
/**
|
||||
* Permissions state for the coarseLoaction alias.
|
||||
*
|
||||
* On Android it requests/checks ACCESS_COARSE_LOCATION.
|
||||
*
|
||||
* On Android 12+, users can choose between Approximate location (ACCESS_COARSE_LOCATION) and Precise location (ACCESS_FINE_LOCATION).
|
||||
*
|
||||
* On iOS it will have the same value as the `location` alias.
|
||||
*/
|
||||
coarseLocation: PermissionState
|
||||
}
|
||||
|
||||
export type PermissionType = 'location' | 'coarseLocation'
|
||||
|
||||
export type Position = {
|
||||
/**
|
||||
* Creation time for these coordinates.
|
||||
*/
|
||||
timestamp: number
|
||||
/**
|
||||
* The GPD coordinates along with the accuracy of the data.
|
||||
*/
|
||||
coords: Coordinates
|
||||
}
|
||||
|
||||
export type PositionOptions = {
|
||||
/**
|
||||
* High accuracy mode (such as GPS, if available)
|
||||
* Will be ignored on Android 12+ if users didn't grant the ACCESS_FINE_LOCATION permission (`coarseLocation` permission).
|
||||
*/
|
||||
enableHighAccuracy: boolean
|
||||
/**
|
||||
* The maximum wait time in milliseconds for location updates.
|
||||
* On Android the timeout gets ignored for getCurrentPosition.
|
||||
* Ignored on iOS
|
||||
*/
|
||||
timeout: number
|
||||
/**
|
||||
* The maximum age in milliseconds of a possible cached position that is acceptable to return.
|
||||
* Default: 0
|
||||
* Ignored on iOS
|
||||
*/
|
||||
maximumAge: number
|
||||
}
|
||||
|
||||
export async function watchPosition(
|
||||
options: PositionOptions,
|
||||
// TODO: This can receive errors too
|
||||
cb: (location: Position | string) => void
|
||||
cb: (location: Position | null, error?: string) => void
|
||||
): Promise<number> {
|
||||
const channel = new Channel<Position>()
|
||||
channel.onmessage = cb
|
||||
await commands.watchPosition(options, channel)
|
||||
const channel = new Channel<Position | string>()
|
||||
channel.onmessage = (message) => {
|
||||
if (typeof message === 'string') {
|
||||
cb(null, message)
|
||||
} else {
|
||||
cb(message)
|
||||
}
|
||||
}
|
||||
await invoke('plugin:geolocation|watch_position', {
|
||||
options,
|
||||
channel
|
||||
})
|
||||
return channel.id
|
||||
}
|
||||
|
||||
export const {
|
||||
getCurrentPosition,
|
||||
clearWatch,
|
||||
checkPermissions,
|
||||
requestPermissions
|
||||
} = commands
|
||||
export async function getCurrentPosition(
|
||||
options?: PositionOptions
|
||||
): Promise<Position> {
|
||||
return await invoke('plugin:geolocation|get_current_position', {
|
||||
options
|
||||
})
|
||||
}
|
||||
|
||||
export type {
|
||||
PermissionState,
|
||||
PermissionStatus,
|
||||
PermissionType,
|
||||
Position,
|
||||
PositionOptions,
|
||||
Coordinates
|
||||
} from './bindings'
|
||||
export async function clearWatch(channelId: number): Promise<void> {
|
||||
await invoke('plugin:geolocation|clear_watch', {
|
||||
channelId
|
||||
})
|
||||
}
|
||||
|
||||
// export { events };
|
||||
export async function checkPermissions(): Promise<PermissionStatus> {
|
||||
return await checkPluginPermissions('geolocation')
|
||||
}
|
||||
|
||||
export async function requestPermissions(
|
||||
permissions: PermissionType[] | null
|
||||
): Promise<PermissionStatus> {
|
||||
return await invoke('plugin:geolocation|request_permissions', {
|
||||
permissions
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-geolocation",
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0-rc.2",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# Automatically generated - DO NOT EDIT!
|
||||
|
||||
"$schema" = "../../schemas/schema.json"
|
||||
|
||||
[[permission]]
|
||||
identifier = "allow-clear-positions"
|
||||
description = "Enables the clear_positions command without any pre-configured scope."
|
||||
commands.allow = ["clear_positions"]
|
||||
|
||||
[[permission]]
|
||||
identifier = "deny-clear-positions"
|
||||
description = "Denies the clear_positions command without any pre-configured scope."
|
||||
commands.deny = ["clear_positions"]
|
||||
@@ -0,0 +1,13 @@
|
||||
# Automatically generated - DO NOT EDIT!
|
||||
|
||||
"$schema" = "../../schemas/schema.json"
|
||||
|
||||
[[permission]]
|
||||
identifier = "allow-request-permissions"
|
||||
description = "Enables the request_permissions command without any pre-configured scope."
|
||||
commands.allow = ["request_permissions"]
|
||||
|
||||
[[permission]]
|
||||
identifier = "deny-request-permissions"
|
||||
description = "Denies the request_permissions command without any pre-configured scope."
|
||||
commands.deny = ["request_permissions"]
|
||||
@@ -63,32 +63,6 @@ Denies the clear_permissions command without any pre-configured scope.
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`geolocation:allow-clear-positions`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Enables the clear_positions command without any pre-configured scope.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`geolocation:deny-clear-positions`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Denies the clear_positions command without any pre-configured scope.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`geolocation:allow-clear-watch`
|
||||
|
||||
</td>
|
||||
@@ -141,6 +115,32 @@ Denies the get_current_position command without any pre-configured scope.
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`geolocation:allow-request-permissions`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Enables the request_permissions command without any pre-configured scope.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`geolocation:deny-request-permissions`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Denies the request_permissions command without any pre-configured scope.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`geolocation:allow-watch-position`
|
||||
|
||||
</td>
|
||||
|
||||
@@ -314,16 +314,6 @@
|
||||
"type": "string",
|
||||
"const": "deny-clear-permissions"
|
||||
},
|
||||
{
|
||||
"description": "Enables the clear_positions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "allow-clear-positions"
|
||||
},
|
||||
{
|
||||
"description": "Denies the clear_positions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "deny-clear-positions"
|
||||
},
|
||||
{
|
||||
"description": "Enables the clear_watch command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -344,6 +334,16 @@
|
||||
"type": "string",
|
||||
"const": "deny-get-current-position"
|
||||
},
|
||||
{
|
||||
"description": "Enables the request_permissions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "allow-request-permissions"
|
||||
},
|
||||
{
|
||||
"description": "Denies the request_permissions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "deny-request-permissions"
|
||||
},
|
||||
{
|
||||
"description": "Enables the watch_position command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
|
||||
@@ -98,7 +98,10 @@ impl<R: Runtime> Geolocation<R> {
|
||||
permissions: Option<Vec<PermissionType>>,
|
||||
) -> crate::Result<PermissionStatus> {
|
||||
self.0
|
||||
.run_mobile_plugin("requestPermissions", permissions)
|
||||
.run_mobile_plugin(
|
||||
"requestPermissions",
|
||||
serde_json::json!({ "permissions": permissions }),
|
||||
)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.0.0-rc.14"
|
||||
"@tauri-apps/cli": "2.0.0-rc.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.0.0-rc.14",
|
||||
"@tauri-apps/cli": "2.0.0-rc.15",
|
||||
"vite": "^5.0.12",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
### bug
|
||||
|
||||
- [`1d9741b5`](https://github.com/tauri-apps/plugins-workspace/commit/1d9741b52bb242d32b2ffd46fb4343a501cbd54b) ([#1783](https://github.com/tauri-apps/plugins-workspace/pull/1783) by [@fxsalazar](https://github.com/tauri-apps/plugins-workspace/../../fxsalazar)) fix download content to file when unsuccessful response
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-upload"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
description = "Upload files from disk to a remote server over HTTP."
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
@@ -35,3 +35,7 @@ read-progress-stream = "1.0.0"
|
||||
native-tls = ["reqwest/native-tls"]
|
||||
native-tls-vendored = ["reqwest/native-tls-vendored"]
|
||||
rustls-tls = ["reqwest/rustls-tls"]
|
||||
|
||||
[dev-dependencies]
|
||||
mockito = "1.5.0"
|
||||
tokio = { version = "1", features = ["macros"] }
|
||||
|
||||
@@ -70,13 +70,19 @@ async fn download(
|
||||
let client = reqwest::Client::new();
|
||||
|
||||
let mut request = client.get(url);
|
||||
// Loop trought the headers keys and values
|
||||
// Loop through the headers keys and values
|
||||
// and add them to the request object.
|
||||
for (key, value) in headers {
|
||||
request = request.header(&key, value);
|
||||
}
|
||||
|
||||
let response = request.send().await?;
|
||||
if !response.status().is_success() {
|
||||
return Err(Error::HttpErrorCode(
|
||||
response.status().as_u16(),
|
||||
response.text().await.unwrap_or_default(),
|
||||
));
|
||||
}
|
||||
let total = response.content_length().unwrap_or(0);
|
||||
|
||||
let mut file = BufWriter::new(File::create(file_path).await?);
|
||||
@@ -112,7 +118,7 @@ async fn upload(
|
||||
.header(reqwest::header::CONTENT_LENGTH, file_len)
|
||||
.body(file_to_body(on_progress, file));
|
||||
|
||||
// Loop trought the headers keys and values
|
||||
// Loop through the headers keys and values
|
||||
// and add them to the request object.
|
||||
for (key, value) in headers {
|
||||
request = request.header(&key, value);
|
||||
@@ -145,3 +151,64 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
||||
.invoke_handler(tauri::generate_handler![download, upload])
|
||||
.build()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use mockito::{self, Mock, Server, ServerGuard};
|
||||
use tauri::ipc::InvokeResponseBody;
|
||||
struct MockedServer {
|
||||
_server: ServerGuard,
|
||||
url: String,
|
||||
mocked_endpoint: Mock,
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn should_error_if_status_not_success() {
|
||||
let mocked_server = spawn_server_mocked(400).await;
|
||||
let result = download_file(&mocked_server.url).await;
|
||||
mocked_server.mocked_endpoint.assert();
|
||||
assert!(result.is_err());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn should_download_file_successfully() {
|
||||
let mocked_server = spawn_server_mocked(200).await;
|
||||
let result = download_file(&mocked_server.url).await;
|
||||
mocked_server.mocked_endpoint.assert();
|
||||
assert!(
|
||||
result.is_ok(),
|
||||
"failed to download file: {}",
|
||||
result.unwrap_err()
|
||||
);
|
||||
}
|
||||
|
||||
async fn download_file(url: &str) -> Result<()> {
|
||||
let file_path = concat!(env!("CARGO_MANIFEST_DIR"), "/test/test.txt");
|
||||
let headers = HashMap::new();
|
||||
let sender: Channel<ProgressPayload> =
|
||||
Channel::new(|msg: InvokeResponseBody| -> tauri::Result<()> {
|
||||
let _ = msg;
|
||||
Ok(())
|
||||
});
|
||||
download(url, file_path, headers, sender).await
|
||||
}
|
||||
|
||||
async fn spawn_server_mocked(return_status: usize) -> MockedServer {
|
||||
let mut _server = Server::new_async().await;
|
||||
let path = "/mock_test";
|
||||
let mock = _server
|
||||
.mock("GET", path)
|
||||
.with_status(return_status)
|
||||
.with_body("mocked response body")
|
||||
.create_async()
|
||||
.await;
|
||||
|
||||
let url = _server.url() + path;
|
||||
MockedServer {
|
||||
_server,
|
||||
url,
|
||||
mocked_endpoint: mock,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
mocked response body
|
||||
@@ -27,7 +27,7 @@ http = "1"
|
||||
rand = "0.8"
|
||||
futures-util = "0.3"
|
||||
tokio = { version = "1", features = ["net", "sync"] }
|
||||
tokio-tungstenite = { version = "0.23" }
|
||||
tokio-tungstenite = { version = "0.24" }
|
||||
|
||||
[features]
|
||||
default = ["rustls-tls"]
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.0.0-rc.14",
|
||||
"@tauri-apps/cli": "2.0.0-rc.15",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.13"
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@ tauri = { workspace = true, features = ["wry", "compression"] }
|
||||
tokio = { version = "1", features = ["net"] }
|
||||
futures-util = "0.3"
|
||||
tauri-plugin-websocket = { path = "../../../" }
|
||||
tokio-tungstenite = "0.23"
|
||||
tokio-tungstenite = "0.24"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { workspace = true }
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.5]
|
||||
|
||||
- [`7a37355e`](https://github.com/tauri-apps/plugins-workspace/commit/7a37355e177772cbddf24397d5a23280e00558af) ([#1787](https://github.com/tauri-apps/plugins-workspace/pull/1787) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix deadlock when trying to restore window states on initial load
|
||||
|
||||
## \[2.0.0-rc.4]
|
||||
|
||||
- [`204e5aac`](https://github.com/tauri-apps/plugins-workspace/commit/204e5aacad7e8f99a9a08f4a45cfed83643c1cc0) ([#1743](https://github.com/tauri-apps/plugins-workspace/pull/1743)) Fix can't restore a minimized window's size and position properly
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.0.0-rc.4"
|
||||
version = "2.0.0-rc.5"
|
||||
description = "Save window positions and sizes and restore them when the app is reopened."
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
@@ -105,6 +105,8 @@ impl Default for WindowState {
|
||||
}
|
||||
|
||||
struct WindowStateCache(Arc<Mutex<HashMap<String, WindowState>>>);
|
||||
/// Used to prevent deadlocks from resize and position event listeners setting the cached state on restoring states
|
||||
struct RestoringWindowState(Mutex<()>);
|
||||
pub trait AppHandleExt {
|
||||
/// Saves all open windows state to disk
|
||||
fn save_window_state(&self, flags: StateFlags) -> Result<()>;
|
||||
@@ -167,6 +169,8 @@ impl<R: Runtime> WindowExt for Window<R> {
|
||||
.map(|map| map(self.label()))
|
||||
.unwrap_or_else(|| self.label());
|
||||
|
||||
let restoring_window_state = self.state::<RestoringWindowState>();
|
||||
let _restoring_window_lock = restoring_window_state.0.lock().unwrap();
|
||||
let cache = self.state::<WindowStateCache>();
|
||||
let mut c = cache.0.lock().unwrap();
|
||||
|
||||
@@ -396,6 +400,7 @@ impl Builder {
|
||||
Default::default()
|
||||
};
|
||||
app.manage(WindowStateCache(cache));
|
||||
app.manage(RestoringWindowState(Mutex::new(())));
|
||||
app.manage(PluginState {
|
||||
filename,
|
||||
map_label,
|
||||
@@ -443,7 +448,13 @@ impl Builder {
|
||||
}
|
||||
|
||||
WindowEvent::Moved(position) if flags.contains(StateFlags::POSITION) => {
|
||||
if !window_clone.is_minimized().unwrap_or_default() {
|
||||
if window_clone
|
||||
.state::<RestoringWindowState>()
|
||||
.0
|
||||
.try_lock()
|
||||
.is_ok()
|
||||
&& !window_clone.is_minimized().unwrap_or_default()
|
||||
{
|
||||
let mut c = cache.lock().unwrap();
|
||||
if let Some(state) = c.get_mut(&label) {
|
||||
state.prev_x = state.x;
|
||||
@@ -455,7 +466,12 @@ impl Builder {
|
||||
}
|
||||
}
|
||||
WindowEvent::Resized(size) if flags.contains(StateFlags::SIZE) => {
|
||||
if !window_clone.is_minimized().unwrap_or_default()
|
||||
if window_clone
|
||||
.state::<RestoringWindowState>()
|
||||
.0
|
||||
.try_lock()
|
||||
.is_ok()
|
||||
&& !window_clone.is_minimized().unwrap_or_default()
|
||||
&& !window_clone.is_maximized().unwrap_or_default()
|
||||
{
|
||||
let mut c = cache.lock().unwrap();
|
||||
|
||||
Generated
+70
-66
@@ -78,9 +78,15 @@ importers:
|
||||
'@tauri-apps/plugin-fs':
|
||||
specifier: 2.0.0-rc.2
|
||||
version: link:../../plugins/fs
|
||||
'@tauri-apps/plugin-geolocation':
|
||||
specifier: 2.0.0-rc.1
|
||||
version: link:../../plugins/geolocation
|
||||
'@tauri-apps/plugin-global-shortcut':
|
||||
specifier: 2.0.0-rc.1
|
||||
version: link:../../plugins/global-shortcut
|
||||
'@tauri-apps/plugin-haptics':
|
||||
specifier: 2.0.0-rc.1
|
||||
version: link:../../plugins/haptics
|
||||
'@tauri-apps/plugin-http':
|
||||
specifier: 2.0.0-rc.2
|
||||
version: link:../../plugins/http
|
||||
@@ -119,8 +125,8 @@ importers:
|
||||
specifier: ^3.0.1
|
||||
version: 3.1.2(svelte@4.2.19)(vite@5.4.3(terser@5.31.6))
|
||||
'@tauri-apps/cli':
|
||||
specifier: 2.0.0-rc.14
|
||||
version: 2.0.0-rc.14
|
||||
specifier: 2.0.0-rc.15
|
||||
version: 2.0.0-rc.15
|
||||
'@unocss/extractor-svelte':
|
||||
specifier: ^0.62.0
|
||||
version: 0.62.3
|
||||
@@ -180,8 +186,8 @@ importers:
|
||||
version: link:../..
|
||||
devDependencies:
|
||||
'@tauri-apps/cli':
|
||||
specifier: 2.0.0-rc.14
|
||||
version: 2.0.0-rc.14
|
||||
specifier: 2.0.0-rc.15
|
||||
version: 2.0.0-rc.15
|
||||
typescript:
|
||||
specifier: ^5.2.2
|
||||
version: 5.6.2
|
||||
@@ -270,8 +276,8 @@ importers:
|
||||
plugins/single-instance/examples/vanilla:
|
||||
devDependencies:
|
||||
'@tauri-apps/cli':
|
||||
specifier: 2.0.0-rc.14
|
||||
version: 2.0.0-rc.14
|
||||
specifier: 2.0.0-rc.15
|
||||
version: 2.0.0-rc.15
|
||||
|
||||
plugins/sql:
|
||||
dependencies:
|
||||
@@ -288,8 +294,8 @@ importers:
|
||||
plugins/store/examples/AppSettingsManager:
|
||||
devDependencies:
|
||||
'@tauri-apps/cli':
|
||||
specifier: 2.0.0-rc.14
|
||||
version: 2.0.0-rc.14
|
||||
specifier: 2.0.0-rc.15
|
||||
version: 2.0.0-rc.15
|
||||
typescript:
|
||||
specifier: ^5.3.3
|
||||
version: 5.6.2
|
||||
@@ -328,8 +334,8 @@ importers:
|
||||
version: link:../..
|
||||
devDependencies:
|
||||
'@tauri-apps/cli':
|
||||
specifier: 2.0.0-rc.14
|
||||
version: 2.0.0-rc.14
|
||||
specifier: 2.0.0-rc.15
|
||||
version: 2.0.0-rc.15
|
||||
typescript:
|
||||
specifier: ^5.3.3
|
||||
version: 5.6.2
|
||||
@@ -1054,68 +1060,68 @@ packages:
|
||||
'@tauri-apps/api@2.0.0-rc.4':
|
||||
resolution: {integrity: sha512-UNiIhhKG08j4ooss2oEEVexffmWkgkYlC2M3GcX3VPtNsqFgVNL8Mcw/4Y7rO9M9S+ffAMnLOF5ypzyuyb8tyg==}
|
||||
|
||||
'@tauri-apps/cli-darwin-arm64@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-QBdzhwj+ewRi2tA+3jCiEMp5y9WYR3p33bwVHPC33oyrDFlXMNOpwsJa9VBHUU04pr6mq1ujrouHNBAlj78Lvw==}
|
||||
'@tauri-apps/cli-darwin-arm64@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-WuzQRELJTeSHe/uLu6IClCCEkwQy4qtZdHUmcAW3baKD217WCytn4jQ5+NFs2GxhK1a2GLHMQtQZSFTLkKiXkw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@tauri-apps/cli-darwin-x64@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-m48s2+EIUYoq5T26CKq11TThRBlY5LorCmUKDO+OzIL87h5sXhYwAYKkskJ1aDc8gf3incq+cQhw2FfCkHk60A==}
|
||||
'@tauri-apps/cli-darwin-x64@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-71H1dNWlEr+Hyi096Ir3SnlClw4CSR4MhJ8UG8IUBqYwydJPYFzA+GFWRAgnPgcV6sBzdt8trcV9BLV4teDzEw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-otGNUBERFQhuR+qYTTjMgoMUptc+EefyXsPQap7gFRAY6j5bBTiKOofE4XyOd6wFZ6OLI12uICm9j4kMjiPkzA==}
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-hO7AS09l6XZRCu/vqvB/iv6CvIlD//h9njhyw++0tJPCNH3X4rl13ji6SnoO0V6ZUCEeCeQBTAALsanYAlZelQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-ZCfd2N/IPQCEjrRyIeBK7nII//i34taAS6BbhDMuOXzBAz6r9angQKL42qW89mQDJZwckNHFiVMcOqBrrVo7TQ==}
|
||||
'@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-r9FrwY83TD4w3vX7J9zS3GPSeis0YWq52p/MVLYR1i8sSJppbvYY72EXi5pR2CZ3vb+6z9/w7LpYTv+hOd2RbA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-8zMZGVvehZSSn+TCt0D8uKXDqMviWYMNgfAc+XKWcbEpJKsAaDfC8UEFikpr1HBV/1kGrq0AMko+91f6o5/g6w==}
|
||||
'@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-PqMn3/GiqLAhs7p0jr5XqwWN1t7SAgvo6+bFuYNL/SWx1Ui6mOck3ncfDkf+dQAnXnrhX2Qfwkl3agiOZxUZtA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-NgEQ9f/Ce2SLDT0CNSpeew7BikTAOO3I2WM+FPuYyAaDnvrHnC67v3RyC5/j5xTkMMjRPsVPvsedtQNZjlq3tw==}
|
||||
'@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-o8lvgVBGXwthMV8+8EzEwXQY5jk2q+c700xeC/LY+J0lBL5ai3i0revlhO+3RwKnjnRLZMCXatr5K3gGtXIsoQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-linux-x64-musl@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-h+/eJqWfwqzBXEJhmdNsYrUII7d9sz8UYWWS1cQFeCQRPW5rMVotySI7TCrmKOx0mZDKd9zWClYwUviBinG6Kg==}
|
||||
'@tauri-apps/cli-linux-x64-musl@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-cmANCyhcdInZSfIM3CPjA0eDu1toYABapSttA1rHbNrcJrHIq2KPKRCNuXIjWiBggxfIhJKWX7mTgQCQIyHd/w==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-bM8kGZJQCahTJQCdaF3h4ta83HvrIA8JEBUEHvrxxpiUpdtymOyW7uSSdjYB0pdmotZx44oEKiXeK2xcc9rZaw==}
|
||||
'@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-FyWwCQb+uCCBtEDTDKtILH3wv0TWCQ2mXwMyZlibpbZ4RbaV5yDY82h8h7usfEuPHtBtAJHknHvX5WV1ETl5kw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-dxzPebtvI9EhqIzP33WbsPKoxyBejozw7Ie6GMpQ8oV2bogYfOgEu2r9hwzZ7nNfVldOD6PWKzgo0rwAvfxnAQ==}
|
||||
'@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-+bOBX7EdpmkCSBxgd9HcC/p9LoG/q1a5dJebWFuL9GhmdPeb5hv4plB/OTUAtg1OnEVGPXhTiSkcdRatZVryfA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-XZ97TfOAL3KFr6pF51oWKZNXueFSmkpjkZdyk2/aVvzsiqGZtfPwGkL7YMCBbUA8q9ysaosdMvcGpBmvhHkLPQ==}
|
||||
'@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-Phpk18bs1YxC+OFYaZNWiddYRmiZvMjB9Rzjl6M128gIkgnqDGnZyfWtM5GZ85/BmX1HVGgILK/46RU6Q88z1g==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@tauri-apps/cli@2.0.0-rc.14':
|
||||
resolution: {integrity: sha512-AQST26ixCoVf32PSsSjfUCQY9SrawzDEgUpKXjelUeD9oROzbxlRw5tOYRTsxg9YDat2uWJ3xz7WXW6T0VEfNw==}
|
||||
'@tauri-apps/cli@2.0.0-rc.15':
|
||||
resolution: {integrity: sha512-w5cq2WBKYRJDCE5wi5gyjM79Cq3AchTFImbcGBB+uyB/m3PDBXEidaTBTHqwiup2hKbMivuBAzGUCHt+OfgBhA==}
|
||||
engines: {node: '>= 10'}
|
||||
hasBin: true
|
||||
|
||||
@@ -2743,9 +2749,9 @@ snapshots:
|
||||
- encoding
|
||||
- mocha
|
||||
|
||||
'@covector/assemble@0.12.0(mocha@10.7.3)':
|
||||
'@covector/assemble@0.12.0':
|
||||
dependencies:
|
||||
'@covector/command': 0.8.0(mocha@10.7.3)
|
||||
'@covector/command': 0.8.0
|
||||
'@covector/files': 0.8.0
|
||||
effection: 2.0.8(mocha@10.7.3)
|
||||
js-yaml: 4.1.0
|
||||
@@ -2756,10 +2762,9 @@ snapshots:
|
||||
unified: 9.2.2
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- mocha
|
||||
- supports-color
|
||||
|
||||
'@covector/changelog@0.12.0(mocha@10.7.3)':
|
||||
'@covector/changelog@0.12.0':
|
||||
dependencies:
|
||||
'@covector/files': 0.8.0
|
||||
effection: 2.0.8(mocha@10.7.3)
|
||||
@@ -2769,16 +2774,14 @@ snapshots:
|
||||
unified: 9.2.2
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- mocha
|
||||
- supports-color
|
||||
|
||||
'@covector/command@0.8.0(mocha@10.7.3)':
|
||||
'@covector/command@0.8.0':
|
||||
dependencies:
|
||||
'@effection/process': 2.1.4(mocha@10.7.3)
|
||||
'@effection/process': 2.1.4
|
||||
effection: 2.0.8(mocha@10.7.3)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- mocha
|
||||
|
||||
'@covector/files@0.8.0':
|
||||
dependencies:
|
||||
@@ -2825,8 +2828,10 @@ snapshots:
|
||||
dependencies:
|
||||
effection: 2.0.8(mocha@10.7.3)
|
||||
mocha: 10.7.3
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
|
||||
'@effection/process@2.1.4(mocha@10.7.3)':
|
||||
'@effection/process@2.1.4':
|
||||
dependencies:
|
||||
cross-spawn: 7.0.3
|
||||
ctrlc-windows: 2.1.0
|
||||
@@ -2834,7 +2839,6 @@ snapshots:
|
||||
shellwords: 0.1.1
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- mocha
|
||||
|
||||
'@effection/stream@2.0.6':
|
||||
dependencies:
|
||||
@@ -3194,48 +3198,48 @@ snapshots:
|
||||
|
||||
'@tauri-apps/api@2.0.0-rc.4': {}
|
||||
|
||||
'@tauri-apps/cli-darwin-arm64@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-darwin-arm64@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-darwin-x64@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-darwin-x64@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-linux-x64-musl@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-linux-x64-musl@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.14':
|
||||
'@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.15':
|
||||
optional: true
|
||||
|
||||
'@tauri-apps/cli@2.0.0-rc.14':
|
||||
'@tauri-apps/cli@2.0.0-rc.15':
|
||||
optionalDependencies:
|
||||
'@tauri-apps/cli-darwin-arm64': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-darwin-x64': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-linux-arm64-gnu': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-linux-arm64-musl': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-linux-x64-gnu': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-linux-x64-musl': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-win32-arm64-msvc': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-win32-ia32-msvc': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-win32-x64-msvc': 2.0.0-rc.14
|
||||
'@tauri-apps/cli-darwin-arm64': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-darwin-x64': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-linux-arm64-gnu': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-linux-arm64-musl': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-linux-x64-gnu': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-linux-x64-musl': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-win32-arm64-msvc': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-win32-ia32-msvc': 2.0.0-rc.15
|
||||
'@tauri-apps/cli-win32-x64-msvc': 2.0.0-rc.15
|
||||
|
||||
'@types/eslint@9.6.1':
|
||||
dependencies:
|
||||
@@ -3680,9 +3684,9 @@ snapshots:
|
||||
dependencies:
|
||||
'@clack/prompts': 0.7.0
|
||||
'@covector/apply': 0.10.0(mocha@10.7.3)
|
||||
'@covector/assemble': 0.12.0(mocha@10.7.3)
|
||||
'@covector/changelog': 0.12.0(mocha@10.7.3)
|
||||
'@covector/command': 0.8.0(mocha@10.7.3)
|
||||
'@covector/assemble': 0.12.0
|
||||
'@covector/changelog': 0.12.0
|
||||
'@covector/command': 0.8.0
|
||||
'@covector/files': 0.8.0
|
||||
effection: 2.0.8(mocha@10.7.3)
|
||||
globby: 11.1.0
|
||||
|
||||
Reference in New Issue
Block a user