mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-12 14:17:48 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de732d0ab0 | |||
| e2e97db519 | |||
| 9ea9e05944 | |||
| d0482502e9 | |||
| 0c040bcc9a | |||
| 0d5e7e2892 | |||
| 01c913e83e | |||
| 532622d8b2 | |||
| 448846b834 | |||
| 3c52f30ea4 | |||
| f690777a91 |
@@ -68,6 +68,7 @@
|
||||
"os",
|
||||
"process",
|
||||
"shell",
|
||||
"store",
|
||||
"updater"
|
||||
]
|
||||
},
|
||||
@@ -90,6 +91,7 @@
|
||||
"os-js",
|
||||
"process-js",
|
||||
"shell-js",
|
||||
"store-js",
|
||||
"updater-js"
|
||||
],
|
||||
"postversion": "pnpm install --no-frozen-lockfile"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"barcode-scanner": patch
|
||||
"barcode-scanner-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
"notification": patch
|
||||
"notification-js": patch
|
||||
---
|
||||
|
||||
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).
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"dialog": "patch"
|
||||
---
|
||||
|
||||
Mark `FileResponse` as `non_exhaustive`.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"dialog": patch
|
||||
"dialog-js": patch
|
||||
---
|
||||
|
||||
The `open` function now returns a string representing either the file path or URI instead of an object.
|
||||
To read the file data, use the `fs` APIs.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"fs": patch:enhance
|
||||
---
|
||||
|
||||
The `scope-*-recursive` permissions now also allow reading the contents of the directory.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"global-shortcut": "patch"
|
||||
---
|
||||
|
||||
Updated `global-hotkey` crate dependency to `0.6`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"notification-js": patch
|
||||
---
|
||||
|
||||
**Breaking change**: The permission type when using the API is now `'granted' | 'denied' | 'prompt' | 'prompt-with-rationale'` instead of `'granted' | 'denied' | 'default'` for consistency with Rust types. When using the `window.Notification` API the type is unchanged to match the Web API type.
|
||||
@@ -2,16 +2,26 @@
|
||||
"tag": "rc",
|
||||
"changes": [
|
||||
".changes/android-dialog-save.md",
|
||||
".changes/consolidate-permission-state.md",
|
||||
".changes/dialog-file-response-non-exhaustive.md",
|
||||
".changes/dialog-return-path.md",
|
||||
".changes/fix-http-plugin-abort.md",
|
||||
".changes/fix-linux-updater-permission-error.md",
|
||||
".changes/fs-scope-recursive-allow-read-dir.md",
|
||||
".changes/geolocation-release.md",
|
||||
".changes/global-shortcut-0.6.md",
|
||||
".changes/haptics-release.md",
|
||||
".changes/iife-varname-spacing.md",
|
||||
".changes/notification-permission-type-change.md",
|
||||
".changes/rc.md",
|
||||
".changes/remove-target-sdk.md",
|
||||
".changes/resolve-content-uris.md",
|
||||
".changes/shell-open-regex-match-string.md",
|
||||
".changes/shell-regex-match-string.md",
|
||||
".changes/single-instance-windows-sys.0.59.md",
|
||||
".changes/store-remove-mobile-plugin.md",
|
||||
".changes/swift-build-older-versions.md",
|
||||
".changes/tauri-rc-8.md",
|
||||
".changes/update-fs-api-docs.md",
|
||||
".changes/update-tauri-rc-3.md"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"fs": patch:feat
|
||||
---
|
||||
|
||||
Resolve `content://` path URIs on Android.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"single-instance": "patch"
|
||||
---
|
||||
|
||||
Updated `windows-sys` crate to `0.59`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"store": patch:breaking
|
||||
---
|
||||
|
||||
Implement mobile support in Rust directly. This changes the store directories, invalidating all previously generated stores.
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
"authenticator": patch
|
||||
"autostart": patch
|
||||
"barcode-scanner": patch
|
||||
"biometric": patch
|
||||
"cli": patch
|
||||
"clipboard-manager": patch
|
||||
"deep-link": patch
|
||||
"dialog": patch
|
||||
"fs": patch
|
||||
"global-shortcut": patch
|
||||
"http": patch
|
||||
"localhost": patch
|
||||
"log-plugin": patch
|
||||
"nfc": patch
|
||||
"notification": patch
|
||||
"os": patch
|
||||
"persisted-scope": patch
|
||||
"positioner": patch
|
||||
"process": patch
|
||||
"shell": patch
|
||||
"single-instance": patch
|
||||
"sql": patch
|
||||
"store": patch
|
||||
"stronghold": patch
|
||||
"updater": patch
|
||||
"upload": patch
|
||||
"websocket": patch
|
||||
"window-state": patch
|
||||
"authenticator-js": patch
|
||||
"autostart-js": patch
|
||||
"barcode-scanner-js": patch
|
||||
"biometric-js": patch
|
||||
"cli-js": patch
|
||||
"clipboard-manager-js": patch
|
||||
"deep-link-js": patch
|
||||
"dialog-js": patch
|
||||
"fs-js": patch
|
||||
"global-shortcut-js": patch
|
||||
"http-js": patch
|
||||
"log-js": patch
|
||||
"nfc-js": patch
|
||||
"notification-js": patch
|
||||
"os-js": patch
|
||||
"positioner-js": patch
|
||||
"process-js": patch
|
||||
"shell-js": patch
|
||||
"sql-js": patch
|
||||
"store-js": patch
|
||||
"stronghold-js": patch
|
||||
"updater-js": patch
|
||||
"upload-js": patch
|
||||
"websocket-js": patch
|
||||
"window-state-js": patch
|
||||
"haptics": patch
|
||||
"haptics-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
---
|
||||
|
||||
Update to tauri 2.0.0-rc.8
|
||||
@@ -6,3 +6,5 @@ dist
|
||||
.vscode
|
||||
.gradle
|
||||
**/capabilities/schemas
|
||||
.build
|
||||
.tauri
|
||||
Generated
+60
-58
@@ -206,7 +206,7 @@ checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
||||
|
||||
[[package]]
|
||||
name = "api"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -227,6 +227,7 @@ dependencies = [
|
||||
"tauri-plugin-os",
|
||||
"tauri-plugin-process",
|
||||
"tauri-plugin-shell",
|
||||
"tauri-plugin-store",
|
||||
"tauri-plugin-updater",
|
||||
"tiny_http",
|
||||
"window-shadows",
|
||||
@@ -2565,19 +2566,19 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "global-hotkey"
|
||||
version = "0.5.5"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b436093d1598b05e3b7fddc097b2bad32763f53a1beb25ab6f9718c6a60acd09"
|
||||
checksum = "298a7667d6011efe6b35673c6b29001b88677ae1b3d6b2feccfbff4b44892866"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"cocoa 0.25.0",
|
||||
"cocoa 0.26.0",
|
||||
"crossbeam-channel",
|
||||
"keyboard-types",
|
||||
"objc",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
"x11-dl",
|
||||
]
|
||||
|
||||
@@ -6192,9 +6193,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||
|
||||
[[package]]
|
||||
name = "swift-rs"
|
||||
version = "1.0.6"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bbdb58577b6301f8d17ae2561f32002a5bae056d444e0f69e611e504a276204"
|
||||
checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"serde",
|
||||
@@ -6286,9 +6287,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tao"
|
||||
version = "0.29.0"
|
||||
version = "0.29.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6775bcf3c1da33f848ede9cff5883ed1e45a29f66533ce42ad06c93ae514ed59"
|
||||
checksum = "d3a97abbc7d6cfd0720da3e06fcb1cf2ac87cbfdb5bbbce103a1279a211c4d81"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"cocoa 0.26.0",
|
||||
@@ -6359,9 +6360,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79776954e2cd6b6c3b56e2cd99905a3a166017495a39ac8eb4c85dd8ea8704b4"
|
||||
checksum = "e8345ccc676ef16e26b61fc0f5340b4e770678b1e1f53f08c69ebdac5e56b422"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@@ -6412,9 +6413,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fc103bde77870e08d5fc8765615b9615997827550b626fbc4ebbd7a1fbfe2a2"
|
||||
checksum = "7d5ad5fcfaf02cf79aa6727f6c5df38567d8dce172b00b62690c6bc46c08b7ce"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@@ -6436,9 +6437,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea061e6be9b37ab455eadc189f45617deafc85c94f78f9cd584862a6deaa83d1"
|
||||
checksum = "809ef6316726fc72593d296cf6f4e7461326e310c313d6a6c42b6e7f1e2671cf"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"brotli",
|
||||
@@ -6463,9 +6464,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e20d6f6f96f55a43339c465b3c8205d71940372d54d7c665c5329e8e4ba35d0"
|
||||
checksum = "1359e8861d210d25731f8b1bfbb4d111dd06406cf73c59659366ef450364d811"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@@ -6477,9 +6478,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec01af01098a286d3e430c1fa947bfd77bc8011ecb209438af4444b02d82b29e"
|
||||
checksum = "a7dded420c86183f592d0fe925ef9447f41e26fa79f0bdfef8d3f17bfbcdbfb7"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glob",
|
||||
@@ -6494,7 +6495,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-authenticator"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"authenticator",
|
||||
"base64 0.22.1",
|
||||
@@ -6517,7 +6518,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-autostart"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"auto-launch",
|
||||
"log",
|
||||
@@ -6530,7 +6531,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-barcode-scanner"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6542,7 +6543,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-biometric"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6555,7 +6556,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-cli"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"log",
|
||||
@@ -6568,7 +6569,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-clipboard-manager"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"image 0.24.9",
|
||||
@@ -6582,7 +6583,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-deep-link"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"log",
|
||||
@@ -6600,7 +6601,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-dialog"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"log",
|
||||
@@ -6612,11 +6613,12 @@ dependencies = [
|
||||
"tauri-plugin",
|
||||
"tauri-plugin-fs",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-fs"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"glob",
|
||||
@@ -6635,7 +6637,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-geolocation"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6648,7 +6650,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-global-shortcut"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"global-hotkey",
|
||||
"log",
|
||||
@@ -6661,7 +6663,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-haptics"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6674,7 +6676,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-http"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"data-url",
|
||||
"http",
|
||||
@@ -6694,7 +6696,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-localhost"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"http",
|
||||
"log",
|
||||
@@ -6707,7 +6709,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-log"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"byte-unit",
|
||||
@@ -6727,7 +6729,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-nfc"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6740,7 +6742,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-notification"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"color-backtrace",
|
||||
"ctor",
|
||||
@@ -6762,7 +6764,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-os"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"gethostname",
|
||||
"log",
|
||||
@@ -6778,7 +6780,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-persisted-scope"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"bincode",
|
||||
@@ -6792,7 +6794,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-positioner"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6805,7 +6807,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-process"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"tauri",
|
||||
"tauri-plugin",
|
||||
@@ -6813,7 +6815,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-shell"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"encoding_rs",
|
||||
"log",
|
||||
@@ -6832,7 +6834,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-single-instance"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"log",
|
||||
"semver",
|
||||
@@ -6840,13 +6842,13 @@ dependencies = [
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"thiserror",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-sql"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"indexmap 2.4.0",
|
||||
@@ -6863,7 +6865,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-store"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"log",
|
||||
@@ -6876,7 +6878,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-stronghold"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"iota-crypto",
|
||||
@@ -6897,7 +6899,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-updater"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dirs 5.0.1",
|
||||
@@ -6924,7 +6926,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-upload"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"log",
|
||||
@@ -6941,7 +6943,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-websocket"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"http",
|
||||
@@ -6958,7 +6960,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-window-state"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"log",
|
||||
@@ -6971,9 +6973,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4e736d3293f8347e5d2c5b250fe0e5b873499f5483578b139445dbbf802e2e5"
|
||||
checksum = "75c72b844f387bfc3341c355f3e16b8cbf4161848fa4e348670effb222cd3ba5"
|
||||
dependencies = [
|
||||
"dpi",
|
||||
"gtk",
|
||||
@@ -6990,9 +6992,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9fead81c1bd0205d5f02580e64f522704618274e784c2d1c127e4ba19acd0b79"
|
||||
checksum = "73accf936a7cd01d1382de7850726fdf6c1f6ab3b01ccb7a0950cb852e332596"
|
||||
dependencies = [
|
||||
"cocoa 0.26.0",
|
||||
"gtk",
|
||||
@@ -7014,9 +7016,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.0.0-rc.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "285af18e09665ea15fdda04cb28fb579a4d71b4e1640628489fecca98838ca9a"
|
||||
checksum = "d53d9fe87e985b273696ae22ce2b9f099a8f1b44bc8fb127467bda5fcb3e4371"
|
||||
dependencies = [
|
||||
"aes-gcm",
|
||||
"brotli",
|
||||
@@ -7475,9 +7477,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tray-icon"
|
||||
version = "0.15.1"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b92252d649d771105448969f2b2dda4342ba48b77731b60d37c93665e26615b"
|
||||
checksum = "131a65b2cef2081bc14dbcd414c906edbfa3bb5323dd7e748cc298614681196b"
|
||||
dependencies = [
|
||||
"core-graphics 0.24.0",
|
||||
"crossbeam-channel",
|
||||
|
||||
+4
-4
@@ -11,10 +11,10 @@ resolver = "2"
|
||||
[workspace.dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
log = "0.4"
|
||||
tauri = { version = "2.0.0-rc.3", default-features = false }
|
||||
tauri-build = "2.0.0-rc.3"
|
||||
tauri-plugin = "2.0.0-rc.3"
|
||||
tauri-utils = "2.0.0-rc.3"
|
||||
tauri = { version = "2.0.0-rc.8", default-features = false }
|
||||
tauri-build = "2.0.0-rc.7"
|
||||
tauri-plugin = "2.0.0-rc.7"
|
||||
tauri-utils = "2.0.0-rc.7"
|
||||
serde_json = "1"
|
||||
thiserror = "1"
|
||||
url = "2"
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.0.0-rc.1`
|
||||
- Upgraded to `notification-js@2.0.0-rc.1`
|
||||
- Upgraded to `dialog-js@2.0.0-rc.1`
|
||||
- Upgraded to `biometric-js@2.0.0-rc.1`
|
||||
- Upgraded to `cli-js@2.0.0-rc.1`
|
||||
- Upgraded to `clipboard-manager-js@2.0.0-rc.1`
|
||||
- Upgraded to `fs-js@2.0.0-rc.2`
|
||||
- Upgraded to `global-shortcut-js@2.0.0-rc.1`
|
||||
- Upgraded to `http-js@2.0.0-rc.2`
|
||||
- Upgraded to `log-js@2.0.0-rc.1`
|
||||
- Upgraded to `nfc-js@2.0.0-rc.1`
|
||||
- Upgraded to `os-js@2.0.0-rc.1`
|
||||
- Upgraded to `process-js@2.0.0-rc.1`
|
||||
- Upgraded to `shell-js@2.0.0-rc.1`
|
||||
- Upgraded to `store-js@2.0.0-rc.1`
|
||||
- Upgraded to `updater-js@2.0.0-rc.1`
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
+18
-17
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"private": true,
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0-rc.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --clearScreen false",
|
||||
@@ -9,28 +9,29 @@
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-biometric": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-cli": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-http": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-nfc": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-os": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-process": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-rc.0",
|
||||
"@tauri-apps/plugin-updater": "2.0.0-rc.0",
|
||||
"@tauri-apps/api": "2.0.0-rc.4",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-biometric": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-cli": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-global-shortcut": "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",
|
||||
"@tauri-apps/plugin-os": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-process": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-store": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-updater": "2.0.0-rc.1",
|
||||
"@zerodevx/svelte-json-view": "1.0.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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.4",
|
||||
"@tauri-apps/cli": "2.0.0-rc.8",
|
||||
"@unocss/extractor-svelte": "^0.62.0",
|
||||
"svelte": "^4.2.8",
|
||||
"unocss": "^0.62.0",
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.0-rc.3`
|
||||
- Upgraded to `notification@2.0.0-rc.3`
|
||||
- Upgraded to `dialog@2.0.0-rc.3`
|
||||
- Upgraded to `fs@2.0.0-rc.1`
|
||||
- Upgraded to `global-shortcut@2.0.0-rc.2`
|
||||
- Upgraded to `store@2.0.0-rc.3`
|
||||
- Upgraded to `biometric@2.0.0-rc.3`
|
||||
- Upgraded to `cli@2.0.0-rc.1`
|
||||
- Upgraded to `clipboard-manager@2.0.0-rc.3`
|
||||
- Upgraded to `http@2.0.0-rc.1`
|
||||
- Upgraded to `log-plugin@2.0.0-rc.2`
|
||||
- Upgraded to `nfc@2.0.0-rc.3`
|
||||
- Upgraded to `os@2.0.0-rc.1`
|
||||
- Upgraded to `process@2.0.0-rc.1`
|
||||
- Upgraded to `shell@2.0.0-rc.3`
|
||||
- Upgraded to `updater@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "api"
|
||||
publish = false
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
description = "An example Tauri Application showcasing the api"
|
||||
edition = "2021"
|
||||
rust-version = { workspace = true }
|
||||
@@ -19,21 +19,22 @@ serde_json = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
tiny_http = "0.12"
|
||||
log = { workspace = true }
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.0", features = [
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.1", features = [
|
||||
"watch",
|
||||
] }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
||||
"multipart",
|
||||
], version = "2.0.0-rc.0" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.2", features = [
|
||||
], version = "2.0.0-rc.1" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.3", features = [
|
||||
"windows7-compat",
|
||||
] }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0-rc.3" }
|
||||
|
||||
[dependencies.tauri]
|
||||
workspace = true
|
||||
@@ -49,14 +50,14 @@ features = [
|
||||
]
|
||||
|
||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-rc.0" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.2" }
|
||||
|
||||
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.3" }
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies]
|
||||
window-shadows = "0.2"
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
"clipboard-manager:allow-write-text",
|
||||
"clipboard-manager:allow-read-image",
|
||||
"clipboard-manager:allow-write-image",
|
||||
"fs:allow-open",
|
||||
"fs:allow-write",
|
||||
"fs:allow-read",
|
||||
"fs:allow-rename",
|
||||
"fs:allow-mkdir",
|
||||
"fs:allow-remove",
|
||||
@@ -75,6 +78,11 @@
|
||||
}
|
||||
],
|
||||
"deny": ["$APPDATA/db/*.stronghold"]
|
||||
}
|
||||
},
|
||||
"store:allow-entries",
|
||||
"store:allow-get",
|
||||
"store:allow-set",
|
||||
"store:allow-save",
|
||||
"store:allow-load"
|
||||
]
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
@@ -19,7 +18,7 @@
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.2/mobile/android" />
|
||||
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.7/mobile/android" />
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/buildSrc" />
|
||||
@@ -27,6 +26,7 @@
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/biometric/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/clipboard-manager/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/dialog/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/fs/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/nfc/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/notification/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/shell/android" />
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.10" />
|
||||
<option name="version" value="1.9.25" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,3 +1,4 @@
|
||||
<?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">
|
||||
|
||||
@@ -19,7 +19,8 @@ android {
|
||||
defaultConfig {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||
applicationId = "com.tauri.api"
|
||||
minSdk = 24
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||
}
|
||||
@@ -47,6 +48,9 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
rust {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<!-- AndroidTV support -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
|
||||
<application
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
@@ -15,6 +19,8 @@
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<!-- AndroidTV support -->
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||
</intent-filter>
|
||||
<!-- NFC PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
||||
<intent-filter>
|
||||
|
||||
@@ -4,8 +4,8 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.3.2")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
|
||||
classpath("com.android.tools.build:gradle:8.5.1")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compileOnly(gradleApi())
|
||||
implementation("com.android.tools.build:gradle:8.3.2")
|
||||
implementation("com.android.tools.build:gradle:8.5.1")
|
||||
}
|
||||
|
||||
|
||||
@@ -21,5 +21,4 @@ kotlin.code.style=official
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonFinalResIds=false
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#Tue May 10 19:22:52 CST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+89
-89
@@ -1,89 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>development</string>
|
||||
<string>debugging</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2B78BA327A38C76093D36092 /* libapi_lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A00E5F95D64FD14E47F85BD /* libapi_lib.a */; };
|
||||
3043432501C9BC2DB6B4CB95 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */; };
|
||||
328B4ADB3700C1873BEB7B10 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 90D3B673AFAB8D8AB561F616 /* main.mm */; };
|
||||
6F379F15DA085785BA2624D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6B7E79E23E646BA7968B457C /* Assets.xcassets */; };
|
||||
832F9A55FEDEF3D807D8C40A /* libapp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 248286BAA086BB1A5F98B2B2 /* libapp.a */; };
|
||||
9AADB041D25772D04E543F15 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62601E25FA39E62BE119B74D /* Metal.framework */; };
|
||||
9DDA3BE70DD0E4013973FE38 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6082E363D51372A7658C351 /* UIKit.framework */; };
|
||||
AC8BDC2C7A63FA3FDC5967F4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B2D1B108AE002010BDEC6D2 /* LaunchScreen.storyboard */; };
|
||||
@@ -24,10 +24,10 @@
|
||||
/* Begin PBXFileReference section */
|
||||
0E96CE07CD20273DD46BF325 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = "<group>"; };
|
||||
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */ = {isa = PBXFileReference; path = tray.rs; sourceTree = "<group>"; };
|
||||
248286BAA086BB1A5F98B2B2 /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = "<group>"; };
|
||||
2F63E2AA460089BB58D40C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
338E66700FD330B99D434DD7 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
|
||||
384966E551417F94A02D2706 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
4A00E5F95D64FD14E47F85BD /* libapi_lib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapi_lib.a; sourceTree = "<group>"; };
|
||||
4B2D1B108AE002010BDEC6D2 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
|
||||
5AC703CEBA41A121596066F3 /* api_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = api_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -49,7 +49,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2B78BA327A38C76093D36092 /* libapi_lib.a in Frameworks */,
|
||||
832F9A55FEDEF3D807D8C40A /* libapp.a in Frameworks */,
|
||||
3043432501C9BC2DB6B4CB95 /* CoreGraphics.framework in Frameworks */,
|
||||
9AADB041D25772D04E543F15 /* Metal.framework in Frameworks */,
|
||||
DFFF888045C8D9D9FB69E8FD /* MetalKit.framework in Frameworks */,
|
||||
@@ -90,7 +90,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */,
|
||||
4A00E5F95D64FD14E47F85BD /* libapi_lib.a */,
|
||||
248286BAA086BB1A5F98B2B2 /* libapp.a */,
|
||||
62601E25FA39E62BE119B74D /* Metal.framework */,
|
||||
338E66700FD330B99D434DD7 /* MetalKit.framework */,
|
||||
DC377692DC31A070A0188C9D /* QuartzCore.framework */,
|
||||
@@ -186,7 +186,6 @@
|
||||
TargetAttributes = {
|
||||
54DC6E273C78071F3BA12EF3 = {
|
||||
DevelopmentTeam = Q93MBH6S2F;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -235,9 +234,9 @@
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapi_lib.a",
|
||||
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapi_lib.a",
|
||||
"$(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapi_lib.a",
|
||||
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
|
||||
"$(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
@@ -387,7 +386,6 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||
@@ -409,6 +407,7 @@
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = "arm64 arm64-sim";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
};
|
||||
name = debug;
|
||||
};
|
||||
@@ -423,7 +422,6 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||
@@ -445,6 +443,7 @@
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALID_ARCHS = "arm64 arm64-sim";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
};
|
||||
name = release;
|
||||
};
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.nfc.readersession.formats</key>
|
||||
<array>
|
||||
<string>TAG</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict/>
|
||||
</plist>
|
||||
|
||||
@@ -13,7 +13,6 @@ settingGroups:
|
||||
PRODUCT_NAME: Tauri API
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.tauri.api
|
||||
DEVELOPMENT_TEAM: Q93MBH6S2F
|
||||
CODE_SIGN_STYLE: Automatic
|
||||
targetTemplates:
|
||||
app:
|
||||
type: application
|
||||
@@ -74,7 +73,7 @@ targets:
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]: arm64-sim x86_64
|
||||
groups: [app]
|
||||
dependencies:
|
||||
- framework: libapi_lib.a
|
||||
- framework: libapp.a
|
||||
embed: false
|
||||
- sdk: CoreGraphics.framework
|
||||
- sdk: Metal.framework
|
||||
@@ -88,6 +87,6 @@ targets:
|
||||
name: Build Rust Code
|
||||
basedOnDependencyAnalysis: false
|
||||
outputFiles:
|
||||
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapi_lib.a
|
||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapi_lib.a
|
||||
- $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapi_lib.a
|
||||
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
||||
- $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a
|
||||
@@ -7265,6 +7265,181 @@
|
||||
"shell:deny-stdin-write"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:default -> This permission set configures what kind of\noperations are available from the store plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-clear -> Enables the clear command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-clear"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-delete -> Enables the delete command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-entries -> Enables the entries command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-entries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-get -> Enables the get command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-has -> Enables the has command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-has"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-keys -> Enables the keys command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-keys"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-length -> Enables the length command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-length"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-load -> Enables the load command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-load"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-reset -> Enables the reset command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-reset"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-save -> Enables the save command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-save"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-set -> Enables the set command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-set"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-values -> Enables the values command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-values"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-clear -> Denies the clear command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-clear"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-delete -> Denies the delete command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-entries -> Denies the entries command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-entries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-get -> Denies the get command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-has -> Denies the has command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-has"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-keys -> Denies the keys command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-keys"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-length -> Denies the length command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-length"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-load -> Denies the load command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-load"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-reset -> Denies the reset command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-reset"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-save -> Denies the save command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-save"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-set -> Denies the set command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-set"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-values -> Denies the values command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-values"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "updater:default -> This permission set configures which kind of\nupdater functions are exposed to the frontend.\n\n#### Granted Permissions\n\nThe full workflow from checking for updates to installing them\nis enabled.\n\n",
|
||||
"type": "string",
|
||||
|
||||
@@ -7341,6 +7341,181 @@
|
||||
"enum": [
|
||||
"shell:deny-stdin-write"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:default -> This permission set configures what kind of\noperations are available from the store plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-clear -> Enables the clear command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-clear"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-delete -> Enables the delete command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-entries -> Enables the entries command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-entries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-get -> Enables the get command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-has -> Enables the has command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-has"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-keys -> Enables the keys command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-keys"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-length -> Enables the length command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-length"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-load -> Enables the load command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-load"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-reset -> Enables the reset command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-reset"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-save -> Enables the save command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-save"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-set -> Enables the set command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-set"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:allow-values -> Enables the values command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:allow-values"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-clear -> Denies the clear command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-clear"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-delete -> Denies the delete command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-entries -> Denies the entries command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-entries"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-get -> Denies the get command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-has -> Denies the has command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-has"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-keys -> Denies the keys command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-keys"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-length -> Denies the length command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-length"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-load -> Denies the load command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-load"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-reset -> Denies the reset command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-reset"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-save -> Denies the save command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-save"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-set -> Denies the set command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-set"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "store:deny-values -> Denies the values command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"store:deny-values"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -37,6 +37,7 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_store::Builder::default().build())
|
||||
.setup(move |app| {
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
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";
|
||||
@@ -90,6 +91,11 @@
|
||||
component: Shell,
|
||||
icon: "i-codicon-terminal-bash",
|
||||
},
|
||||
{
|
||||
label: "Store",
|
||||
component: Store,
|
||||
icon: "i-codicon-file-code",
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Updater",
|
||||
component: Updater,
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
|
||||
async function prompt() {
|
||||
confirm("Do you want to do something?")
|
||||
.then((res) =>
|
||||
onMessage(
|
||||
res ? "Yes" : "No"
|
||||
)
|
||||
)
|
||||
.then((res) => onMessage(res ? "Yes" : "No"))
|
||||
.catch(onMessage);
|
||||
}
|
||||
|
||||
@@ -67,14 +63,15 @@
|
||||
if (Array.isArray(res)) {
|
||||
onMessage(res);
|
||||
} else {
|
||||
var pathToRead = typeof res === "string" ? res : res.path;
|
||||
var pathToRead = res;
|
||||
var isFile = pathToRead.match(/\S+\.\S+$/g);
|
||||
readFile(pathToRead)
|
||||
.then(function (response) {
|
||||
if (isFile) {
|
||||
if (
|
||||
pathToRead.includes(".png") ||
|
||||
pathToRead.includes(".jpg")
|
||||
pathToRead.includes(".jpg") ||
|
||||
pathToRead.includes(".jpeg")
|
||||
) {
|
||||
arrayBufferToBase64(
|
||||
new Uint8Array(response),
|
||||
@@ -144,5 +141,7 @@
|
||||
>Open save dialog</button
|
||||
>
|
||||
<button class="btn" id="prompt-dialog" on:click={prompt}>Prompt</button>
|
||||
<button class="btn" id="custom-prompt-dialog" on:click={promptCustom}>Prompt (custom)</button>
|
||||
<button class="btn" id="custom-prompt-dialog" on:click={promptCustom}
|
||||
>Prompt (custom)</button
|
||||
>
|
||||
<button class="btn" id="message-dialog" on:click={msg}>Message</button>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
|
||||
function writeToStdin() {
|
||||
child.write(stdin).catch(onMessage);
|
||||
child.write(`${stdin}\n`).catch(onMessage);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<script>
|
||||
import { Store } from "@tauri-apps/plugin-store";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
export let onMessage;
|
||||
|
||||
let key;
|
||||
let value;
|
||||
|
||||
const store = new Store("cache.json");
|
||||
let cache = {};
|
||||
|
||||
onMount(async () => {
|
||||
await store.load();
|
||||
const values = await store.entries();
|
||||
for (const [key, value] of values) {
|
||||
cache[key] = value;
|
||||
}
|
||||
cache = cache;
|
||||
});
|
||||
|
||||
function write(key, value) {
|
||||
store
|
||||
.set(key, value)
|
||||
.then(() => store.get(key))
|
||||
.then((v) => {
|
||||
cache[key] = v;
|
||||
cache = cache;
|
||||
})
|
||||
.then(() => store.save())
|
||||
.catch(onMessage);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col childre:grow gap-1">
|
||||
<div class="flex flex-col flex-row-md gap-4">
|
||||
<div class="flex items-center gap-1">
|
||||
Key:
|
||||
<input class="grow input" bind:value={key} />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1">
|
||||
Value:
|
||||
<input class="grow input" bind:value />
|
||||
</div>
|
||||
|
||||
<button class="btn" on:click={() => write(key, value)}> Write </button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{#each Object.entries(cache) as [k, v]}
|
||||
<div>{k} = {v}</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,5 +31,10 @@
|
||||
},
|
||||
"engines": {
|
||||
"pnpm": "^9.0.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"micromatch@<4.0.8": ">=4.0.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[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
|
||||
|
||||
## \[2.0.0-rc.0]
|
||||
|
||||
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-authenticator"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
description = "Use hardware security-keys in your Tauri App."
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-authenticator",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"description": "Use hardware security-keys in your Tauri App.",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[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
|
||||
|
||||
## \[2.0.0-rc.0]
|
||||
|
||||
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-autostart"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
description = "Automatically launch your application at startup."
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-autostart",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## \[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).
|
||||
- [`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
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-barcode-scanner"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
@@ -23,3 +23,6 @@ serde_json = { workspace = true }
|
||||
tauri = { workspace = true }
|
||||
log = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "ios")'.dependencies]
|
||||
tauri = { workspace = true, features = ["wry"] }
|
||||
|
||||
@@ -1 +1 @@
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},a){return window.__TAURI_INTERNALS__.invoke(n,e,a)}var a;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(a=n.Format||(n.Format={})).QRCode="QR_CODE",a.UPC_A="UPC_A",a.UPC_E="UPC_E",a.EAN8="EAN_8",a.EAN13="EAN_13",a.Code39="CODE_39",a.Code93="CODE_93",a.Code128="CODE_128",a.Codabar="CODABAR",a.ITF="ITF",a.Aztec="AZTEC",a.DataMatrix="DATA_MATRIX",a.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await e("plugin:barcode-scanner|check_permissions").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await e("plugin:barcode-scanner|request_permissions").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return e(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return e(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import {
|
||||
invoke,
|
||||
requestPermissions as checkPermissions_,
|
||||
checkPermissions as requestPermissions_,
|
||||
} from "@tauri-apps/api/core";
|
||||
|
||||
export type PermissionState = "granted" | "denied" | "prompt";
|
||||
export type { PermissionState } from "@tauri-apps/api/core";
|
||||
|
||||
export enum Format {
|
||||
QRCode = "QR_CODE",
|
||||
@@ -53,8 +57,8 @@ export async function cancel(): Promise<void> {
|
||||
* Get permission state.
|
||||
*/
|
||||
export async function checkPermissions(): Promise<PermissionState> {
|
||||
return await invoke<{ camera: PermissionState }>(
|
||||
"plugin:barcode-scanner|check_permissions",
|
||||
return await checkPermissions_<{ camera: PermissionState }>(
|
||||
"barcode-scanner",
|
||||
).then((r) => r.camera);
|
||||
}
|
||||
|
||||
@@ -62,8 +66,8 @@ export async function checkPermissions(): Promise<PermissionState> {
|
||||
* Request permissions to use the camera.
|
||||
*/
|
||||
export async function requestPermissions(): Promise<PermissionState> {
|
||||
return await invoke<{ camera: PermissionState }>(
|
||||
"plugin:barcode-scanner|request_permissions",
|
||||
return await requestPermissions_<{ camera: PermissionState }>(
|
||||
"barcode-scanner",
|
||||
).then((r) => r.camera);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-barcode-scanner",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[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
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-biometric"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
description = "Prompt the user for biometric authentication on Android and iOS."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-biometric",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[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
|
||||
|
||||
## \[2.0.0-rc.0]
|
||||
|
||||
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-cli"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
description = "Parse arguments from your Tauri application's command line interface."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-cli",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[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
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-clipboard-manager"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
description = "Read and write to the system clipboard."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
|
||||
@@ -1 +1 @@
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARD_MANAGER__=function(e){"use strict";var r;async function t(e,r={},t){return window.__TAURI_INTERNALS__.invoke(e,r,t)}"function"==typeof SuppressedError&&SuppressedError;class n{get rid(){return function(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}(this,r,"f")}constructor(e){r.set(this,void 0),function(e,r,t,n,a){if("function"==typeof r?e!==r||!a:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");r.set(e,t)}(this,r,e)}async close(){return t("plugin:resources|close",{rid:this.rid})}}r=new WeakMap;class a extends n{constructor(e){super(e)}static async new(e,r,n){return t("plugin:image|new",{rgba:i(e),width:r,height:n}).then((e=>new a(e)))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return t("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof a?e.rid:e}return e.clear=async function(){await t("plugin:clipboard-manager|clear")},e.readImage=async function(){return await t("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return await t("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,r){await t("plugin:clipboard-manager|write_html",{html:e,altHtml:r})},e.writeImage=async function(e){await t("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,r){await t("plugin:clipboard-manager|write_text",{label:r?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARD_MANAGER__})}
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARD_MANAGER__=function(e){"use strict";var t;async function r(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}"function"==typeof SuppressedError&&SuppressedError;class n{get rid(){return function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}(this,t,"f")}constructor(e){t.set(this,void 0),function(e,t,r,n,a){if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");t.set(e,r)}(this,t,e)}async close(){return r("plugin:resources|close",{rid:this.rid})}}t=new WeakMap;class a extends n{constructor(e){super(e)}static async new(e,t,n){return r("plugin:image|new",{rgba:i(e),width:t,height:n}).then((e=>new a(e)))}static async fromBytes(e){return r("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return r("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return r("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return r("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof a?e.rid:e}return e.clear=async function(){await r("plugin:clipboard-manager|clear")},e.readImage=async function(){return await r("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return await r("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,t){await r("plugin:clipboard-manager|write_html",{html:e,altHtml:t})},e.writeImage=async function(e){await r("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,t){await r("plugin:clipboard-manager|write_text",{label:t?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARD_MANAGER__})}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-clipboard-manager",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
## \[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
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`2c00c029`](https://github.com/tauri-apps/plugins-workspace/commit/2c00c0292c9127b81567de46691e8c0f73557261) ([#1630](https://github.com/tauri-apps/plugins-workspace/pull/1630) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Fixed an issue that caused multi-word IIFE names to not be formatted correctly. For example the `barcode-scanner` was defined as `window.__TAURI_PLUGIN_CLIPBOARDMANAGER__` instead of `window.__TAURI_PLUGIN_CLIPBOARD_MANAGER__`.
|
||||
- [`5d170a54`](https://github.com/tauri-apps/plugins-workspace/commit/5d170a5444982dcc14135f6f1fc3e5da359f0eb0) ([#1671](https://github.com/tauri-apps/plugins-workspace/pull/1671) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.3.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-deep-link"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.0.0-rc.2"
|
||||
description = "Set your Tauri application as the default handler for an URL"
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.0]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `deep-link-js@2.0.0-rc.1`
|
||||
|
||||
## \[2.0.0-beta.11]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "deep-link-example",
|
||||
"private": true,
|
||||
"version": "2.0.0-beta.11",
|
||||
"version": "2.0.0-rc.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -10,11 +10,11 @@
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-deep-link": "2.0.0-rc.0"
|
||||
"@tauri-apps/api": "2.0.0-rc.4",
|
||||
"@tauri-apps/plugin-deep-link": "2.0.0-rc.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.0.0-rc.4",
|
||||
"@tauri-apps/cli": "2.0.0-rc.8",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.0.13"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-deep-link",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"description": "Set your Tauri application as the default handler for an URL",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`448846b8`](https://github.com/tauri-apps/plugins-workspace/commit/448846b834d23df6e7c5dc66c5dd9aa0cb01846d) ([#1658](https://github.com/tauri-apps/plugins-workspace/pull/1658) by [@mikoto2000](https://github.com/tauri-apps/plugins-workspace/../../mikoto2000)) The `open` function now returns a string representing either the file path or URI instead of an object.
|
||||
To read the file data, use the `fs` APIs.
|
||||
- [`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
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`b9147758`](https://github.com/tauri-apps/plugins-workspace/commit/b914775898c2bee7ceb20bd17ee595005cd17a64) ([#1679](https://github.com/tauri-apps/plugins-workspace/pull/1679) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Explicitly set a minimum macOS version for the Swift package.
|
||||
@@ -197,3 +203,17 @@
|
||||
pull/371)) First v2 alpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
v2 alpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
lpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
lpha release!
|
||||
pull/371)) First v2 alpha release!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-dialog"
|
||||
version = "2.0.0-rc.2"
|
||||
version = "2.0.0-rc.3"
|
||||
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
@@ -17,6 +17,9 @@ targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"]
|
||||
[build-dependencies]
|
||||
tauri-plugin = { workspace = true, features = [ "build" ] }
|
||||
|
||||
[dev-dependencies]
|
||||
tauri = { workspace = true, features = [ "wry" ] }
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
@@ -24,7 +27,8 @@ tauri = { workspace = true }
|
||||
log = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
dunce = { workspace = true }
|
||||
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.0" }
|
||||
url = { workspace = true }
|
||||
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.1" }
|
||||
|
||||
[target.'cfg(target_os = "ios")'.dependencies]
|
||||
tauri = { workspace = true, features = ["wry"] }
|
||||
|
||||
@@ -30,7 +30,6 @@ class Filter {
|
||||
class FilePickerOptions {
|
||||
lateinit var filters: Array<Filter>
|
||||
var multiple: Boolean? = null
|
||||
var readData: Boolean? = null
|
||||
}
|
||||
|
||||
@InvokeArg
|
||||
@@ -95,7 +94,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
||||
try {
|
||||
when (result.resultCode) {
|
||||
Activity.RESULT_OK -> {
|
||||
val callResult = createPickFilesResult(result.data, filePickerOptions?.readData ?: false)
|
||||
val callResult = createPickFilesResult(result.data)
|
||||
invoke.resolve(callResult)
|
||||
}
|
||||
Activity.RESULT_CANCELED -> invoke.reject("File picker cancelled")
|
||||
@@ -108,49 +107,23 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun createPickFilesResult(data: Intent?, readData: Boolean): JSObject {
|
||||
private fun createPickFilesResult(data: Intent?): JSObject {
|
||||
val callResult = JSObject()
|
||||
val filesResultList: MutableList<JSObject> = ArrayList()
|
||||
if (data == null) {
|
||||
callResult.put("files", JSArray.from(filesResultList))
|
||||
callResult.put("files", null)
|
||||
return callResult
|
||||
}
|
||||
val uris: MutableList<Uri?> = ArrayList()
|
||||
val uris: MutableList<String?> = ArrayList()
|
||||
if (data.clipData == null) {
|
||||
val uri: Uri? = data.data
|
||||
uris.add(uri)
|
||||
uris.add(uri?.toString())
|
||||
} else {
|
||||
for (i in 0 until data.clipData!!.itemCount) {
|
||||
val uri: Uri = data.clipData!!.getItemAt(i).uri
|
||||
uris.add(uri)
|
||||
uris.add(uri.toString())
|
||||
}
|
||||
}
|
||||
for (i in uris.indices) {
|
||||
val uri = uris[i] ?: continue
|
||||
val fileResult = JSObject()
|
||||
if (readData) {
|
||||
fileResult.put("base64Data", FilePickerUtils.getDataFromUri(activity, uri))
|
||||
}
|
||||
val duration = FilePickerUtils.getDurationFromUri(activity, uri)
|
||||
if (duration != null) {
|
||||
fileResult.put("duration", duration)
|
||||
}
|
||||
val resolution = FilePickerUtils.getHeightAndWidthFromUri(activity, uri)
|
||||
if (resolution != null) {
|
||||
fileResult.put("height", resolution.height)
|
||||
fileResult.put("width", resolution.width)
|
||||
}
|
||||
fileResult.put("mimeType", FilePickerUtils.getMimeTypeFromUri(activity, uri))
|
||||
val modifiedAt = FilePickerUtils.getModifiedAtFromUri(activity, uri)
|
||||
if (modifiedAt != null) {
|
||||
fileResult.put("modifiedAt", modifiedAt)
|
||||
}
|
||||
fileResult.put("name", FilePickerUtils.getNameFromUri(activity, uri))
|
||||
fileResult.put("path", FilePickerUtils.getPathFromUri(activity, uri))
|
||||
fileResult.put("size", FilePickerUtils.getSizeFromUri(activity, uri))
|
||||
filesResultList.add(fileResult)
|
||||
}
|
||||
callResult.put("files", JSArray.from(filesResultList.toTypedArray()))
|
||||
callResult.put("files", JSArray.from(uris.toTypedArray()))
|
||||
return callResult
|
||||
}
|
||||
|
||||
|
||||
@@ -4,18 +4,6 @@
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
interface FileResponse {
|
||||
base64Data?: string;
|
||||
duration?: number;
|
||||
height?: number;
|
||||
width?: number;
|
||||
mimeType?: string;
|
||||
modifiedAt?: number;
|
||||
name?: string;
|
||||
path: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extension filters for the file dialog.
|
||||
*
|
||||
@@ -117,8 +105,8 @@ type OpenDialogReturn<T extends OpenDialogOptions> = T["directory"] extends true
|
||||
? string[] | null
|
||||
: string | null
|
||||
: T["multiple"] extends true
|
||||
? FileResponse[] | null
|
||||
: FileResponse | null;
|
||||
? string[] | null
|
||||
: string | null;
|
||||
|
||||
/**
|
||||
* Open a file/directory selection dialog.
|
||||
@@ -306,7 +294,6 @@ async function confirm(
|
||||
|
||||
export type {
|
||||
DialogFilter,
|
||||
FileResponse,
|
||||
OpenDialogOptions,
|
||||
OpenDialogReturn,
|
||||
SaveDialogOptions,
|
||||
|
||||
@@ -29,7 +29,6 @@ struct Filter: Decodable {
|
||||
|
||||
struct FilePickerOptions: Decodable {
|
||||
var multiple: Bool?
|
||||
var readData: Bool?
|
||||
var filters: [Filter]?
|
||||
}
|
||||
|
||||
@@ -136,55 +135,9 @@ class DialogPlugin: Plugin {
|
||||
public func onFilePickerEvent(_ event: FilePickerEvent) {
|
||||
switch event {
|
||||
case .selected(let urls):
|
||||
let readData = pendingInvokeArgs?.readData ?? false
|
||||
do {
|
||||
let filesResult = try urls.map { (url: URL) -> JSObject in
|
||||
var file = JSObject()
|
||||
|
||||
let mimeType = filePickerController.getMimeTypeFromUrl(url)
|
||||
let isVideo = mimeType.hasPrefix("video")
|
||||
let isImage = mimeType.hasPrefix("image")
|
||||
|
||||
if readData {
|
||||
file["data"] = try Data(contentsOf: url).base64EncodedString()
|
||||
}
|
||||
|
||||
if isVideo {
|
||||
file["duration"] = filePickerController.getVideoDuration(url)
|
||||
let (height, width) = filePickerController.getVideoDimensions(url)
|
||||
if let height = height {
|
||||
file["height"] = height
|
||||
}
|
||||
if let width = width {
|
||||
file["width"] = width
|
||||
}
|
||||
} else if isImage {
|
||||
let (height, width) = filePickerController.getImageDimensions(url)
|
||||
if let height = height {
|
||||
file["height"] = height
|
||||
}
|
||||
if let width = width {
|
||||
file["width"] = width
|
||||
}
|
||||
}
|
||||
|
||||
file["modifiedAt"] = filePickerController.getModifiedAtFromUrl(url)
|
||||
file["mimeType"] = mimeType
|
||||
file["name"] = url.lastPathComponent
|
||||
file["path"] = url.absoluteString
|
||||
file["size"] = try filePickerController.getSizeFromUrl(url)
|
||||
return file
|
||||
}
|
||||
pendingInvoke?.resolve(["files": filesResult])
|
||||
} catch let error as NSError {
|
||||
pendingInvoke?.reject(error.localizedDescription, error: error)
|
||||
return
|
||||
}
|
||||
|
||||
pendingInvoke?.resolve(["files": urls])
|
||||
case .cancelled:
|
||||
let files: JSArray = []
|
||||
pendingInvoke?.resolve(["files": files])
|
||||
pendingInvoke?.resolve(["files": nil])
|
||||
case .error(let error):
|
||||
pendingInvoke?.reject(error)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-dialog",
|
||||
"version": "2.0.0-rc.0",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,17 @@ use serde::{Deserialize, Serialize};
|
||||
use tauri::{command, Manager, Runtime, State, Window};
|
||||
use tauri_plugin_fs::FsExt;
|
||||
|
||||
use crate::{Dialog, FileDialogBuilder, FileResponse, MessageDialogKind, Result};
|
||||
use crate::{Dialog, FileDialogBuilder, FilePath, MessageDialogKind, Result};
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum OpenResponse {
|
||||
#[cfg(desktop)]
|
||||
Folders(Option<Vec<PathBuf>>),
|
||||
Folders(Option<Vec<FilePath>>),
|
||||
#[cfg(desktop)]
|
||||
Folder(Option<PathBuf>),
|
||||
Files(Option<Vec<FileResponse>>),
|
||||
File(Option<FileResponse>),
|
||||
Folder(Option<FilePath>),
|
||||
Files(Option<Vec<FilePath>>),
|
||||
File(Option<FilePath>),
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
@@ -136,25 +136,26 @@ pub(crate) async fn open<R: Runtime>(
|
||||
let folders = dialog_builder.blocking_pick_folders();
|
||||
if let Some(folders) = &folders {
|
||||
for folder in folders {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_directory(folder, options.recursive);
|
||||
if let Ok(path) = folder.path() {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_directory(path, options.recursive);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OpenResponse::Folders(folders.map(|folders| {
|
||||
folders
|
||||
.iter()
|
||||
.map(|p| dunce::simplified(p).to_path_buf())
|
||||
.collect()
|
||||
}))
|
||||
OpenResponse::Folders(
|
||||
folders.map(|folders| folders.into_iter().map(|p| p.simplified()).collect()),
|
||||
)
|
||||
} else {
|
||||
let folder = dialog_builder.blocking_pick_folder();
|
||||
if let Some(path) = &folder {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_directory(path, options.recursive);
|
||||
if let Some(folder) = &folder {
|
||||
if let Ok(path) = folder.path() {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_directory(path, options.recursive);
|
||||
}
|
||||
}
|
||||
}
|
||||
OpenResponse::Folder(folder.map(|p| dunce::simplified(&p).to_path_buf()))
|
||||
OpenResponse::Folder(folder.map(|p| p.simplified()))
|
||||
}
|
||||
}
|
||||
#[cfg(mobile)]
|
||||
@@ -163,37 +164,28 @@ pub(crate) async fn open<R: Runtime>(
|
||||
let files = dialog_builder.blocking_pick_files();
|
||||
if let Some(files) = &files {
|
||||
for file in files {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_file(&file.path);
|
||||
if let Ok(path) = file.path() {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_file(&path);
|
||||
}
|
||||
|
||||
window.state::<tauri::scope::Scopes>().allow_file(&path)?;
|
||||
}
|
||||
window
|
||||
.state::<tauri::scope::Scopes>()
|
||||
.allow_file(&file.path)?;
|
||||
}
|
||||
}
|
||||
OpenResponse::Files(files.map(|files| {
|
||||
files
|
||||
.into_iter()
|
||||
.map(|mut f| {
|
||||
f.path = dunce::simplified(&f.path).to_path_buf();
|
||||
f
|
||||
})
|
||||
.collect()
|
||||
}))
|
||||
OpenResponse::Files(files.map(|files| files.into_iter().map(|f| f.simplified()).collect()))
|
||||
} else {
|
||||
let file = dialog_builder.blocking_pick_file();
|
||||
|
||||
if let Some(file) = &file {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_file(&file.path);
|
||||
if let Ok(path) = file.path() {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_file(&path);
|
||||
}
|
||||
window.state::<tauri::scope::Scopes>().allow_file(&path)?;
|
||||
}
|
||||
window
|
||||
.state::<tauri::scope::Scopes>()
|
||||
.allow_file(&file.path)?;
|
||||
}
|
||||
OpenResponse::File(file.map(|mut f| {
|
||||
f.path = dunce::simplified(&f.path).to_path_buf();
|
||||
f
|
||||
}))
|
||||
OpenResponse::File(file.map(|f| f.simplified()))
|
||||
};
|
||||
Ok(res)
|
||||
}
|
||||
@@ -204,7 +196,7 @@ pub(crate) async fn save<R: Runtime>(
|
||||
window: Window<R>,
|
||||
dialog: State<'_, Dialog<R>>,
|
||||
options: SaveDialogOptions,
|
||||
) -> Result<Option<PathBuf>> {
|
||||
) -> Result<Option<FilePath>> {
|
||||
#[cfg(target_os = "ios")]
|
||||
return Err(crate::Error::FileSaveDialogNotImplemented);
|
||||
#[cfg(any(desktop, target_os = "android"))]
|
||||
@@ -230,13 +222,15 @@ pub(crate) async fn save<R: Runtime>(
|
||||
|
||||
let path = dialog_builder.blocking_save_file();
|
||||
if let Some(p) = &path {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_file(p);
|
||||
if let Ok(path) = p.path() {
|
||||
if let Some(s) = window.try_fs_scope() {
|
||||
s.allow_file(&path);
|
||||
}
|
||||
window.state::<tauri::scope::Scopes>().allow_file(&path)?;
|
||||
}
|
||||
window.state::<tauri::scope::Scopes>().allow_file(p)?;
|
||||
}
|
||||
|
||||
Ok(path.map(|p| dunce::simplified(&p).to_path_buf()))
|
||||
Ok(path.map(|p| p.simplified()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
//! to give results back. This is particularly useful when running dialogs from the main thread.
|
||||
//! When using on asynchronous contexts such as async commands, the [`blocking`] APIs are recommended.
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use raw_window_handle::{HasWindowHandle, RawWindowHandle};
|
||||
use rfd::{AsyncFileDialog, AsyncMessageDialog};
|
||||
use serde::de::DeserializeOwned;
|
||||
use tauri::{plugin::PluginApi, AppHandle, Runtime};
|
||||
|
||||
use crate::{models::*, FileDialogBuilder, MessageDialogBuilder};
|
||||
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder};
|
||||
|
||||
const OK: &str = "Ok";
|
||||
|
||||
@@ -115,11 +113,11 @@ impl<R: Runtime> From<MessageDialogBuilder<R>> for AsyncMessageDialog {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pick_file<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
|
||||
pub fn pick_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf()));
|
||||
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf().into()));
|
||||
let handle = dialog.dialog.app_handle().to_owned();
|
||||
let _ = handle.run_on_main_thread(move || {
|
||||
let dialog = AsyncFileDialog::from(dialog).pick_file();
|
||||
@@ -127,12 +125,16 @@ pub fn pick_file<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
|
||||
});
|
||||
}
|
||||
|
||||
pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static>(
|
||||
pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
let f = |paths: Option<Vec<rfd::FileHandle>>| {
|
||||
f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect()))
|
||||
f(paths.map(|list| {
|
||||
list.into_iter()
|
||||
.map(|p| p.path().to_path_buf().into())
|
||||
.collect()
|
||||
}))
|
||||
};
|
||||
let handle = dialog.dialog.app_handle().to_owned();
|
||||
let _ = handle.run_on_main_thread(move || {
|
||||
@@ -141,11 +143,11 @@ pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static>(
|
||||
});
|
||||
}
|
||||
|
||||
pub fn pick_folder<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
|
||||
pub fn pick_folder<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf()));
|
||||
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf().into()));
|
||||
let handle = dialog.dialog.app_handle().to_owned();
|
||||
let _ = handle.run_on_main_thread(move || {
|
||||
let dialog = AsyncFileDialog::from(dialog).pick_folder();
|
||||
@@ -153,12 +155,16 @@ pub fn pick_folder<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
|
||||
});
|
||||
}
|
||||
|
||||
pub fn pick_folders<R: Runtime, F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static>(
|
||||
pub fn pick_folders<R: Runtime, F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
let f = |paths: Option<Vec<rfd::FileHandle>>| {
|
||||
f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect()))
|
||||
f(paths.map(|list| {
|
||||
list.into_iter()
|
||||
.map(|p| p.path().to_path_buf().into())
|
||||
.collect()
|
||||
}))
|
||||
};
|
||||
let handle = dialog.dialog.app_handle().to_owned();
|
||||
let _ = handle.run_on_main_thread(move || {
|
||||
@@ -167,11 +173,11 @@ pub fn pick_folders<R: Runtime, F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static
|
||||
});
|
||||
}
|
||||
|
||||
pub fn save_file<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
|
||||
pub fn save_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf()));
|
||||
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf().into()));
|
||||
let handle = dialog.dialog.app_handle().to_owned();
|
||||
let _ = handle.run_on_main_thread(move || {
|
||||
let dialog = AsyncFileDialog::from(dialog).save_file();
|
||||
|
||||
@@ -23,6 +23,8 @@ pub enum Error {
|
||||
FileSaveDialogNotImplemented,
|
||||
#[error(transparent)]
|
||||
Fs(#[from] tauri_plugin_fs::Error),
|
||||
#[error("URL is not a valid path")]
|
||||
InvalidPathUrl,
|
||||
}
|
||||
|
||||
impl Serialize for Error {
|
||||
|
||||
+190
-101
@@ -17,9 +17,6 @@ use tauri::{
|
||||
Manager, Runtime,
|
||||
};
|
||||
|
||||
#[cfg(any(desktop, target_os = "ios"))]
|
||||
use std::fs;
|
||||
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
sync::mpsc::sync_channel,
|
||||
@@ -66,6 +63,87 @@ impl<R: Runtime, T: Manager<R>> crate::DialogExt<R> for T {
|
||||
}
|
||||
|
||||
impl<R: Runtime> Dialog<R> {
|
||||
/// Create a new messaging dialog builder.
|
||||
/// The dialog can optionally ask the user for confirmation or include an OK button.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// - Message dialog:
|
||||
///
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// app
|
||||
/// .dialog()
|
||||
/// .message("Tauri is Awesome!")
|
||||
/// .show(|_| {
|
||||
/// println!("dialog closed");
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// - Ask dialog:
|
||||
///
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// app.dialog()
|
||||
/// .message("Are you sure?")
|
||||
/// .ok_button_label("Yes")
|
||||
/// .cancel_button_label("No")
|
||||
/// .show(|yes| {
|
||||
/// println!("user said {}", if yes { "yes" } else { "no" });
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// - Message dialog with OK button:
|
||||
///
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// app.dialog()
|
||||
/// .message("Job completed successfully")
|
||||
/// .ok_button_label("Ok")
|
||||
/// .show(|_| {
|
||||
/// println!("dialog closed");
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// # `show` vs `blocking_show`
|
||||
///
|
||||
/// The dialog builder includes two separate APIs for rendering the dialog: `show` and `blocking_show`.
|
||||
/// The `show` function is asynchronous and takes a closure to be executed when the dialog is closed.
|
||||
/// To block the current thread until the user acted on the dialog, you can use `blocking_show`,
|
||||
/// but note that it cannot be executed on the main thread as it will freeze your application.
|
||||
///
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// let handle = app.handle().clone();
|
||||
/// std::thread::spawn(move || {
|
||||
/// let yes = handle.dialog()
|
||||
/// .message("Are you sure?")
|
||||
/// .ok_button_label("Yes")
|
||||
/// .cancel_button_label("No")
|
||||
/// .blocking_show();
|
||||
/// });
|
||||
///
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
pub fn message(&self, message: impl Into<String>) -> MessageDialogBuilder<R> {
|
||||
MessageDialogBuilder::new(
|
||||
self.clone(),
|
||||
@@ -74,6 +152,7 @@ impl<R: Runtime> Dialog<R> {
|
||||
)
|
||||
}
|
||||
|
||||
/// Creates a new builder for dialogs that lets ths user select file(s) or folder(s).
|
||||
pub fn file(&self) -> FileDialogBuilder<R> {
|
||||
FileDialogBuilder::new(self.clone())
|
||||
}
|
||||
@@ -216,35 +295,52 @@ impl<R: Runtime> MessageDialogBuilder<R> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FileResponse {
|
||||
pub base64_data: Option<String>,
|
||||
pub duration: Option<u64>,
|
||||
pub height: Option<usize>,
|
||||
pub width: Option<usize>,
|
||||
pub mime_type: Option<String>,
|
||||
pub modified_at: Option<u64>,
|
||||
pub name: Option<String>,
|
||||
pub path: PathBuf,
|
||||
pub size: u64,
|
||||
/// Represents either a filesystem path or a URI pointing to a file
|
||||
/// such as `file://` URIs or Android `content://` URIs.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum FilePath {
|
||||
Url(url::Url),
|
||||
Path(PathBuf),
|
||||
}
|
||||
|
||||
impl FileResponse {
|
||||
#[cfg(desktop)]
|
||||
fn new(path: PathBuf) -> Self {
|
||||
let metadata = fs::metadata(&path);
|
||||
let metadata = metadata.as_ref();
|
||||
Self {
|
||||
base64_data: None,
|
||||
duration: None,
|
||||
height: None,
|
||||
width: None,
|
||||
mime_type: None,
|
||||
modified_at: metadata.ok().and_then(|m| to_msec(m.modified())),
|
||||
name: path.file_name().map(|f| f.to_string_lossy().into_owned()),
|
||||
path,
|
||||
size: metadata.map(|m| m.len()).unwrap_or(0),
|
||||
impl From<PathBuf> for FilePath {
|
||||
fn from(value: PathBuf) -> Self {
|
||||
Self::Path(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<url::Url> for FilePath {
|
||||
fn from(value: url::Url) -> Self {
|
||||
Self::Url(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<FilePath> for tauri_plugin_fs::FilePath {
|
||||
fn from(value: FilePath) -> Self {
|
||||
match value {
|
||||
FilePath::Path(p) => tauri_plugin_fs::FilePath::Path(p),
|
||||
FilePath::Url(url) => tauri_plugin_fs::FilePath::Url(url),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FilePath {
|
||||
fn simplified(self) -> Self {
|
||||
match self {
|
||||
Self::Url(url) => Self::Url(url),
|
||||
Self::Path(p) => Self::Path(dunce::simplified(&p).to_path_buf()),
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn path(&self) -> Result<PathBuf> {
|
||||
match self {
|
||||
Self::Url(url) => url
|
||||
.to_file_path()
|
||||
.map(PathBuf::from)
|
||||
.map_err(|_| Error::InvalidPathUrl),
|
||||
Self::Path(p) => Ok(p.to_owned()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,21 +458,18 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// tauri::Builder::default()
|
||||
/// .build(tauri::generate_context!("test/tauri.conf.json"))
|
||||
/// .expect("failed to build tauri app")
|
||||
/// .run(|app, _event| {
|
||||
/// .setup(|app| {
|
||||
/// app.dialog().file().pick_file(|file_path| {
|
||||
/// // do something with the optional file path here
|
||||
/// // the file path is `None` if the user closed the dialog
|
||||
/// })
|
||||
/// })
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
pub fn pick_file<F: FnOnce(Option<FileResponse>) + Send + 'static>(self, f: F) {
|
||||
#[cfg(desktop)]
|
||||
let f = |path: Option<PathBuf>| f(path.map(FileResponse::new));
|
||||
pub fn pick_file<F: FnOnce(Option<FilePath>) + Send + 'static>(self, f: F) {
|
||||
pick_file(self, f)
|
||||
}
|
||||
|
||||
@@ -384,29 +477,44 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
/// This is not a blocking operation,
|
||||
/// and should be used when running on the main thread to avoid deadlocks with the event loop.
|
||||
///
|
||||
/// # Reading the files
|
||||
///
|
||||
/// The file paths cannot be read directly on Android as they are behind a content URI.
|
||||
/// The recommended way to read the files is using the [`fs`](https://v2.tauri.app/plugin/file-system/) plugin:
|
||||
///
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// use tauri_plugin_fs::FsExt;
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// let handle = app.handle().clone();
|
||||
/// app.dialog().file().pick_file(move |file_path| {
|
||||
/// let Some(path) = file_path else { return };
|
||||
/// let Ok(contents) = handle.fs().read_to_string(path) else {
|
||||
/// eprintln!("failed to read file, <todo add error handling!>");
|
||||
/// return;
|
||||
/// };
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// See <https://developer.android.com/guide/topics/providers/content-provider-basics> for more information.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// tauri::Builder::default()
|
||||
/// .build(tauri::generate_context!("test/tauri.conf.json"))
|
||||
/// .expect("failed to build tauri app")
|
||||
/// .run(|app, _event| {
|
||||
/// .setup(|app| {
|
||||
/// app.dialog().file().pick_files(|file_paths| {
|
||||
/// // do something with the optional file paths here
|
||||
/// // the file paths value is `None` if the user closed the dialog
|
||||
/// })
|
||||
/// })
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
pub fn pick_files<F: FnOnce(Option<Vec<FileResponse>>) + Send + 'static>(self, f: F) {
|
||||
#[cfg(desktop)]
|
||||
let f = |paths: Option<Vec<PathBuf>>| {
|
||||
f(paths.map(|p| {
|
||||
p.into_iter()
|
||||
.map(FileResponse::new)
|
||||
.collect::<Vec<FileResponse>>()
|
||||
}))
|
||||
};
|
||||
pub fn pick_files<F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(self, f: F) {
|
||||
pick_files(self, f)
|
||||
}
|
||||
|
||||
@@ -416,20 +524,19 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// tauri::Builder::default()
|
||||
/// .build(tauri::generate_context!("test/tauri.conf.json"))
|
||||
/// .expect("failed to build tauri app")
|
||||
/// .run(|app, _event| {
|
||||
/// .setup(|app| {
|
||||
/// app.dialog().file().pick_folder(|folder_path| {
|
||||
/// // do something with the optional folder path here
|
||||
/// // the folder path is `None` if the user closed the dialog
|
||||
/// })
|
||||
/// })
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
#[cfg(desktop)]
|
||||
pub fn pick_folder<F: FnOnce(Option<PathBuf>) + Send + 'static>(self, f: F) {
|
||||
pub fn pick_folder<F: FnOnce(Option<FilePath>) + Send + 'static>(self, f: F) {
|
||||
pick_folder(self, f)
|
||||
}
|
||||
|
||||
@@ -439,20 +546,19 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// tauri::Builder::default()
|
||||
/// .build(tauri::generate_context!("test/tauri.conf.json"))
|
||||
/// .expect("failed to build tauri app")
|
||||
/// .run(|app, _event| {
|
||||
/// .setup(|app| {
|
||||
/// app.dialog().file().pick_folders(|file_paths| {
|
||||
/// // do something with the optional folder paths here
|
||||
/// // the folder paths value is `None` if the user closed the dialog
|
||||
/// })
|
||||
/// })
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
#[cfg(desktop)]
|
||||
pub fn pick_folders<F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static>(self, f: F) {
|
||||
pub fn pick_folders<F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(self, f: F) {
|
||||
pick_folders(self, f)
|
||||
}
|
||||
|
||||
@@ -463,19 +569,18 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// tauri::Builder::default()
|
||||
/// .build(tauri::generate_context!("test/tauri.conf.json"))
|
||||
/// .expect("failed to build tauri app")
|
||||
/// .run(|app, _event| {
|
||||
/// .setup(|app| {
|
||||
/// app.dialog().file().save_file(|file_path| {
|
||||
/// // do something with the optional file path here
|
||||
/// // the file path is `None` if the user closed the dialog
|
||||
/// })
|
||||
/// })
|
||||
/// });
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
pub fn save_file<F: FnOnce(Option<PathBuf>) + Send + 'static>(self, f: F) {
|
||||
pub fn save_file<F: FnOnce(Option<FilePath>) + Send + 'static>(self, f: F) {
|
||||
save_file(self, f)
|
||||
}
|
||||
}
|
||||
@@ -488,7 +593,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// #[tauri::command]
|
||||
/// async fn my_command(app: tauri::AppHandle) {
|
||||
@@ -497,7 +602,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
/// // the file path is `None` if the user closed the dialog
|
||||
/// }
|
||||
/// ```
|
||||
pub fn blocking_pick_file(self) -> Option<FileResponse> {
|
||||
pub fn blocking_pick_file(self) -> Option<FilePath> {
|
||||
blocking_fn!(self, pick_file)
|
||||
}
|
||||
|
||||
@@ -507,7 +612,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// #[tauri::command]
|
||||
/// async fn my_command(app: tauri::AppHandle) {
|
||||
@@ -516,7 +621,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
/// // the file paths value is `None` if the user closed the dialog
|
||||
/// }
|
||||
/// ```
|
||||
pub fn blocking_pick_files(self) -> Option<Vec<FileResponse>> {
|
||||
pub fn blocking_pick_files(self) -> Option<Vec<FilePath>> {
|
||||
blocking_fn!(self, pick_files)
|
||||
}
|
||||
|
||||
@@ -526,7 +631,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// #[tauri::command]
|
||||
/// async fn my_command(app: tauri::AppHandle) {
|
||||
@@ -536,7 +641,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(desktop)]
|
||||
pub fn blocking_pick_folder(self) -> Option<PathBuf> {
|
||||
pub fn blocking_pick_folder(self) -> Option<FilePath> {
|
||||
blocking_fn!(self, pick_folder)
|
||||
}
|
||||
|
||||
@@ -546,7 +651,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// #[tauri::command]
|
||||
/// async fn my_command(app: tauri::AppHandle) {
|
||||
@@ -556,7 +661,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(desktop)]
|
||||
pub fn blocking_pick_folders(self) -> Option<Vec<PathBuf>> {
|
||||
pub fn blocking_pick_folders(self) -> Option<Vec<FilePath>> {
|
||||
blocking_fn!(self, pick_folders)
|
||||
}
|
||||
|
||||
@@ -566,7 +671,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// ```
|
||||
/// use tauri_plugin_dialog::DialogExt;
|
||||
/// #[tauri::command]
|
||||
/// async fn my_command(app: tauri::AppHandle) {
|
||||
@@ -575,23 +680,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
|
||||
/// // the file path is `None` if the user closed the dialog
|
||||
/// }
|
||||
/// ```
|
||||
pub fn blocking_save_file(self) -> Option<PathBuf> {
|
||||
pub fn blocking_save_file(self) -> Option<FilePath> {
|
||||
blocking_fn!(self, save_file)
|
||||
}
|
||||
}
|
||||
|
||||
// taken from deno source code: https://github.com/denoland/deno/blob/ffffa2f7c44bd26aec5ae1957e0534487d099f48/runtime/ops/fs.rs#L913
|
||||
#[cfg(desktop)]
|
||||
#[inline]
|
||||
fn to_msec(maybe_time: std::result::Result<std::time::SystemTime, std::io::Error>) -> Option<u64> {
|
||||
match maybe_time {
|
||||
Ok(time) => {
|
||||
let msec = time
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map(|t| t.as_millis() as u64)
|
||||
.unwrap_or_else(|err| err.duration().as_millis() as u64);
|
||||
Some(msec)
|
||||
}
|
||||
Err(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
use std::path::PathBuf;
|
||||
|
||||
use serde::{de::DeserializeOwned, Deserialize};
|
||||
use tauri::{
|
||||
@@ -9,7 +8,7 @@ use tauri::{
|
||||
AppHandle, Runtime,
|
||||
};
|
||||
|
||||
use crate::{FileDialogBuilder, FileResponse, MessageDialogBuilder};
|
||||
use crate::{FileDialogBuilder, FilePath, MessageDialogBuilder};
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
const PLUGIN_IDENTIFIER: &str = "app.tauri.dialog";
|
||||
@@ -47,15 +46,15 @@ impl<R: Runtime> Dialog<R> {
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct FilePickerResponse {
|
||||
files: Vec<FileResponse>,
|
||||
files: Vec<FilePath>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct SaveFileResponse {
|
||||
file: PathBuf,
|
||||
file: FilePath,
|
||||
}
|
||||
|
||||
pub fn pick_file<R: Runtime, F: FnOnce(Option<FileResponse>) + Send + 'static>(
|
||||
pub fn pick_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
@@ -72,7 +71,7 @@ pub fn pick_file<R: Runtime, F: FnOnce(Option<FileResponse>) + Send + 'static>(
|
||||
});
|
||||
}
|
||||
|
||||
pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<FileResponse>>) + Send + 'static>(
|
||||
pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<FilePath>>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
@@ -89,7 +88,7 @@ pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<FileResponse>>) + Send + 'sta
|
||||
});
|
||||
}
|
||||
|
||||
pub fn save_file<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
|
||||
pub fn save_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
|
||||
dialog: FileDialogBuilder<R>,
|
||||
f: F,
|
||||
) {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`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
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`5f689902`](https://github.com/tauri-apps/plugins-workspace/commit/5f68990297f2cefac4220649a469adb7fa94fe1b) ([#1645](https://github.com/tauri-apps/plugins-workspace/pull/1645) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update documentation.
|
||||
@@ -128,3 +132,11 @@
|
||||
ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
uri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
kspace/pull/371)) First v2 alpha release!
|
||||
s/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-fs"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0-rc.1"
|
||||
description = "Access the file system."
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
|
||||
@@ -4,11 +4,12 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "app.tauri.store"
|
||||
namespace = "com.plugin.fs"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 24
|
||||
minSdk = 21
|
||||
targetSdk = 34
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
@@ -33,7 +34,12 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation("androidx.core:core-ktx:1.9.0")
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3")
|
||||
implementation("androidx.appcompat:appcompat:1.6.0")
|
||||
implementation("com.google.android.material:material:1.7.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||
implementation(project(":tauri-android"))
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
switch (requested.id.id) {
|
||||
case "com.android.library":
|
||||
useVersion("8.0.2")
|
||||
break
|
||||
case "org.jetbrains.kotlin.android":
|
||||
useVersion("1.8.20")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
include ':tauri-android'
|
||||
project(':tauri-android').projectDir = new File('./.tauri/tauri-api')
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package com.plugin.fs
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.plugin.fs", appContext.packageName)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package com.plugin.fs
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.res.AssetManager.ACCESS_BUFFER
|
||||
import android.net.Uri
|
||||
import android.os.ParcelFileDescriptor
|
||||
import app.tauri.annotation.Command
|
||||
import app.tauri.annotation.InvokeArg
|
||||
import app.tauri.annotation.TauriPlugin
|
||||
import app.tauri.plugin.Invoke
|
||||
import app.tauri.plugin.JSObject
|
||||
import app.tauri.plugin.Plugin
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
|
||||
@InvokeArg
|
||||
class WriteTextFileArgs {
|
||||
val uri: String = ""
|
||||
val content: String = ""
|
||||
}
|
||||
|
||||
@InvokeArg
|
||||
class GetFileDescriptorArgs {
|
||||
lateinit var uri: String
|
||||
lateinit var mode: String
|
||||
}
|
||||
|
||||
@TauriPlugin
|
||||
class FsPlugin(private val activity: Activity): Plugin(activity) {
|
||||
@SuppressLint("Recycle")
|
||||
@Command
|
||||
fun getFileDescriptor(invoke: Invoke) {
|
||||
val args = invoke.parseArgs(GetFileDescriptorArgs::class.java)
|
||||
|
||||
val res = JSObject()
|
||||
|
||||
if (args.uri.startsWith(app.tauri.TAURI_ASSETS_DIRECTORY_URI)) {
|
||||
val path = args.uri.substring(app.tauri.TAURI_ASSETS_DIRECTORY_URI.length)
|
||||
try {
|
||||
val fd = activity.assets.openFd(path).parcelFileDescriptor?.detachFd()
|
||||
res.put("fd", fd)
|
||||
} catch (e: IOException) {
|
||||
// if the asset is compressed, we cannot open a file descriptor directly
|
||||
// so we copy it to the cache and get a fd from there
|
||||
// this is a lot faster than serializing the file and sending it as invoke response
|
||||
// because on the Rust side we can leverage the custom protocol IPC and read the file directly
|
||||
val cacheFile = File(activity.cacheDir, "_assets/$path")
|
||||
cacheFile.parentFile?.mkdirs()
|
||||
copyAsset(path, cacheFile)
|
||||
|
||||
val fd = ParcelFileDescriptor.open(cacheFile, ParcelFileDescriptor.parseMode(args.mode)).detachFd()
|
||||
res.put("fd", fd)
|
||||
}
|
||||
} else {
|
||||
val fd = activity.contentResolver.openAssetFileDescriptor(
|
||||
Uri.parse(args.uri),
|
||||
args.mode
|
||||
)?.parcelFileDescriptor?.detachFd()
|
||||
res.put("fd", fd)
|
||||
}
|
||||
|
||||
invoke.resolve(res)
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun copy(input: InputStream, output: OutputStream) {
|
||||
val buf = ByteArray(1024)
|
||||
var len: Int
|
||||
while ((input.read(buf).also { len = it }) > 0) {
|
||||
output.write(buf, 0, len)
|
||||
}
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun copyAsset(assetPath: String, cacheFile: File) {
|
||||
val input = activity.assets.open(assetPath, ACCESS_BUFFER)
|
||||
input.use { i ->
|
||||
val output = FileOutputStream(cacheFile, false)
|
||||
output.use { o ->
|
||||
copy(i, o)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package com.plugin.fs
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+6
-1
@@ -111,6 +111,8 @@ fn main() {
|
||||
identifier = "scope-{lower}-recursive"
|
||||
description = "This scope permits recursive access to the complete `${upper}` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "${upper}"
|
||||
[[permission.scope.allow]]
|
||||
path = "${upper}/**"
|
||||
|
||||
@@ -118,6 +120,8 @@ path = "${upper}/**"
|
||||
identifier = "scope-{lower}"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `${upper}`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "${upper}"
|
||||
[[permission.scope.allow]]
|
||||
path = "${upper}/*"
|
||||
|
||||
@@ -126,7 +130,7 @@ identifier = "scope-{lower}-index"
|
||||
description = "This scope permits to list all files and folders in the `${upper}`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "${upper}/"
|
||||
path = "${upper}"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
@@ -190,5 +194,6 @@ permissions = [
|
||||
tauri_plugin::Builder::new(COMMANDS)
|
||||
.global_api_script_path("./api-iife.js")
|
||||
.global_scope_schema(schemars::schema_for!(FsScopeEntry))
|
||||
.android_path("android")
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ class FileHandle extends Resource {
|
||||
async write(data: Uint8Array): Promise<number> {
|
||||
return await invoke("plugin:fs|write", {
|
||||
rid: this.rid,
|
||||
data: Array.from(data),
|
||||
data,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-fs",
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0-rc.2",
|
||||
"description": "Access the file system.",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"authors": [
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.1"
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-app-recursive"
|
||||
description = "This scope permits recursive access to the complete `$APP` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APP"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APP/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$APP/**"
|
||||
identifier = "scope-app"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$APP`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APP"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APP/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-app-index"
|
||||
description = "This scope permits to list all files and folders in the `$APP`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APP/"
|
||||
path = "$APP"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-appcache-recursive"
|
||||
description = "This scope permits recursive access to the complete `$APPCACHE` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCACHE"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCACHE/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$APPCACHE/**"
|
||||
identifier = "scope-appcache"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCACHE"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCACHE/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-appcache-index"
|
||||
description = "This scope permits to list all files and folders in the `$APPCACHE`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCACHE/"
|
||||
path = "$APPCACHE"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-appconfig-recursive"
|
||||
description = "This scope permits recursive access to the complete `$APPCONFIG` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCONFIG"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCONFIG/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$APPCONFIG/**"
|
||||
identifier = "scope-appconfig"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCONFIG"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCONFIG/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-appconfig-index"
|
||||
description = "This scope permits to list all files and folders in the `$APPCONFIG`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPCONFIG/"
|
||||
path = "$APPCONFIG"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-appdata-recursive"
|
||||
description = "This scope permits recursive access to the complete `$APPDATA` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPDATA"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPDATA/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$APPDATA/**"
|
||||
identifier = "scope-appdata"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$APPDATA`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPDATA"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPDATA/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-appdata-index"
|
||||
description = "This scope permits to list all files and folders in the `$APPDATA`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPDATA/"
|
||||
path = "$APPDATA"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-applocaldata-recursive"
|
||||
description = "This scope permits recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOCALDATA"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOCALDATA/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$APPLOCALDATA/**"
|
||||
identifier = "scope-applocaldata"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOCALDATA"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOCALDATA/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-applocaldata-index"
|
||||
description = "This scope permits to list all files and folders in the `$APPLOCALDATA`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOCALDATA/"
|
||||
path = "$APPLOCALDATA"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-applog-recursive"
|
||||
description = "This scope permits recursive access to the complete `$APPLOG` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOG"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOG/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$APPLOG/**"
|
||||
identifier = "scope-applog"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$APPLOG`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOG"
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOG/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-applog-index"
|
||||
description = "This scope permits to list all files and folders in the `$APPLOG`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$APPLOG/"
|
||||
path = "$APPLOG"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
identifier = "scope-audio-recursive"
|
||||
description = "This scope permits recursive access to the complete `$AUDIO` folder, including sub directories and files."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$AUDIO"
|
||||
[[permission.scope.allow]]
|
||||
path = "$AUDIO/**"
|
||||
|
||||
@@ -16,6 +18,8 @@ path = "$AUDIO/**"
|
||||
identifier = "scope-audio"
|
||||
description = "This scope permits access to all files and list content of top level directories in the `$AUDIO`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$AUDIO"
|
||||
[[permission.scope.allow]]
|
||||
path = "$AUDIO/*"
|
||||
|
||||
@@ -24,7 +28,7 @@ identifier = "scope-audio-index"
|
||||
description = "This scope permits to list all files and folders in the `$AUDIO`folder."
|
||||
|
||||
[[permission.scope.allow]]
|
||||
path = "$AUDIO/"
|
||||
path = "$AUDIO"
|
||||
|
||||
# Sets Section
|
||||
# This section combines the scope elements with enablement of commands
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user