mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-24 15:09:56 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14381190e7 |
Generated
+84
-151
@@ -207,7 +207,7 @@ checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "api"
|
name = "api"
|
||||||
version = "2.0.35"
|
version = "2.0.31"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -878,7 +878,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
|
checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"toml 0.8.20",
|
"toml",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1574,9 +1574,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dlopen2"
|
name = "dlopen2"
|
||||||
version = "0.8.0"
|
version = "0.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b54f373ccf864bf587a89e880fb7610f8d73f3045f13580948ccbcaff26febff"
|
checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dlopen2_derive",
|
"dlopen2_derive",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -1736,7 +1736,7 @@ dependencies = [
|
|||||||
"cc",
|
"cc",
|
||||||
"memchr",
|
"memchr",
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
"toml 0.8.20",
|
"toml",
|
||||||
"vswhom",
|
"vswhom",
|
||||||
"winreg 0.52.0",
|
"winreg 0.52.0",
|
||||||
]
|
]
|
||||||
@@ -1910,11 +1910,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "file-id"
|
name = "file-id"
|
||||||
version = "0.2.3"
|
version = "0.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e1fc6a637b6dc58414714eddd9170ff187ecb0933d4c7024d1abbd23a3cc26e9"
|
checksum = "6bc904b9bbefcadbd8e3a9fb0d464a9b979de6324c03b3c663e8994f46a5be36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.60.2",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3243,9 +3243,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kqueue"
|
name = "kqueue"
|
||||||
version = "1.1.1"
|
version = "1.0.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a"
|
checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"kqueue-sys",
|
"kqueue-sys",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -3605,9 +3605,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "muda"
|
name = "muda"
|
||||||
version = "0.17.1"
|
version = "0.16.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a"
|
checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"dpi",
|
"dpi",
|
||||||
@@ -3621,7 +3621,7 @@ dependencies = [
|
|||||||
"png",
|
"png",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"windows-sys 0.60.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3720,11 +3720,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notify"
|
name = "notify"
|
||||||
version = "8.2.0"
|
version = "8.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
|
checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
|
"filetime",
|
||||||
"fsevent-sys",
|
"fsevent-sys",
|
||||||
"inotify",
|
"inotify",
|
||||||
"kqueue",
|
"kqueue",
|
||||||
@@ -3733,14 +3734,14 @@ dependencies = [
|
|||||||
"mio",
|
"mio",
|
||||||
"notify-types",
|
"notify-types",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"windows-sys 0.60.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notify-debouncer-full"
|
name = "notify-debouncer-full"
|
||||||
version = "0.6.0"
|
version = "0.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "375bd3a138be7bfeff3480e4a623df4cbfb55b79df617c055cd810ba466fa078"
|
checksum = "d2d88b1a7538054351c8258338df7c931a590513fb3745e8c15eb9ff4199b8d1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"file-id",
|
"file-id",
|
||||||
"log",
|
"log",
|
||||||
@@ -4053,17 +4054,6 @@ dependencies = [
|
|||||||
"objc2-foundation 0.3.0",
|
"objc2-foundation 0.3.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "objc2-security"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3126341c65c5d5728423ae95d788e1b660756486ad0592307ab87ba02d9a7268"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.9.0",
|
|
||||||
"objc2 0.6.0",
|
|
||||||
"objc2-core-foundation",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "objc2-ui-kit"
|
name = "objc2-ui-kit"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
@@ -4088,7 +4078,6 @@ dependencies = [
|
|||||||
"objc2-app-kit",
|
"objc2-app-kit",
|
||||||
"objc2-core-foundation",
|
"objc2-core-foundation",
|
||||||
"objc2-foundation 0.3.0",
|
"objc2-foundation 0.3.0",
|
||||||
"objc2-security",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -5574,15 +5563,6 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_spanned"
|
|
||||||
version = "1.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_urlencoded"
|
name = "serde_urlencoded"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
@@ -5627,9 +5607,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serialize-to-javascript"
|
name = "serialize-to-javascript"
|
||||||
version = "0.1.2"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5"
|
checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -5638,13 +5618,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serialize-to-javascript-impl"
|
name = "serialize-to-javascript-impl"
|
||||||
version = "0.1.2"
|
version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d"
|
checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.100",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -6279,18 +6259,17 @@ dependencies = [
|
|||||||
"cfg-expr",
|
"cfg-expr",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"toml 0.8.20",
|
"toml",
|
||||||
"version-compare",
|
"version-compare",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tao"
|
name = "tao"
|
||||||
version = "0.34.2"
|
version = "0.34.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4daa814018fecdfb977b59a094df4bd43b42e8e21f88fddfc05807e6f46efaaf"
|
checksum = "49c380ca75a231b87b6c9dd86948f035012e7171d1a7c40a9c2890489a7ffd8a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.9.0",
|
"bitflags 2.9.0",
|
||||||
"block2 0.6.0",
|
|
||||||
"core-foundation 0.10.0",
|
"core-foundation 0.10.0",
|
||||||
"core-graphics",
|
"core-graphics",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
@@ -6359,17 +6338,16 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri"
|
name = "tauri"
|
||||||
version = "2.8.2"
|
version = "2.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a54629607ea3084a8b455c1ebe888cbdfc4de02fa5edb2e40db0dc97091007e3"
|
checksum = "2f7a0f4019c80391d143ee26cd7cd1ed271ac241d3087d333f99f3269ba90812"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
"cookie",
|
|
||||||
"dirs 6.0.0",
|
"dirs 6.0.0",
|
||||||
"dunce",
|
"dunce",
|
||||||
"embed_plist",
|
"embed_plist",
|
||||||
"getrandom 0.3.2",
|
"getrandom 0.2.15",
|
||||||
"glob",
|
"glob",
|
||||||
"gtk",
|
"gtk",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
@@ -6385,7 +6363,6 @@ dependencies = [
|
|||||||
"objc2-app-kit",
|
"objc2-app-kit",
|
||||||
"objc2-foundation 0.3.0",
|
"objc2-foundation 0.3.0",
|
||||||
"objc2-ui-kit",
|
"objc2-ui-kit",
|
||||||
"objc2-web-kit",
|
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"plist",
|
"plist",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
@@ -6415,9 +6392,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-build"
|
name = "tauri-build"
|
||||||
version = "2.4.0"
|
version = "2.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "67945dbaf8920dbe3a1e56721a419a0c3d085254ab24cff5b9ad55e2b0016e0b"
|
checksum = "12f025c389d3adb83114bec704da973142e82fc6ec799c7c750c5e21cefaec83"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cargo_toml",
|
"cargo_toml",
|
||||||
@@ -6433,15 +6410,15 @@ dependencies = [
|
|||||||
"tauri-codegen",
|
"tauri-codegen",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"tauri-winres",
|
"tauri-winres",
|
||||||
"toml 0.9.5",
|
"toml",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-codegen"
|
name = "tauri-codegen"
|
||||||
version = "2.4.0"
|
version = "2.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1ab3a62cf2e6253936a8b267c2e95839674e7439f104fa96ad0025e149d54d8a"
|
checksum = "f5df493a1075a241065bc865ed5ef8d0fbc1e76c7afdc0bf0eccfaa7d4f0e406"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"ico",
|
"ico",
|
||||||
@@ -6465,9 +6442,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-macros"
|
name = "tauri-macros"
|
||||||
version = "2.4.0"
|
version = "2.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4368ea8094e7045217edb690f493b55b30caf9f3e61f79b4c24b6db91f07995e"
|
checksum = "1f59e1d1fa9651212dcb890a0c66226d819b716490b0cf43c078514da3591705"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -6479,9 +6456,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin"
|
name = "tauri-plugin"
|
||||||
version = "2.4.0"
|
version = "2.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9946a3cede302eac0c6eb6c6070ac47b1768e326092d32efbb91f21ed58d978f"
|
checksum = "1d9a0bd00bf1930ad1a604d08b0eb6b2a9c1822686d65d7f4731a7723b8901d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"glob",
|
"glob",
|
||||||
@@ -6490,7 +6467,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"toml 0.9.5",
|
"toml",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -6559,10 +6536,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-deep-link"
|
name = "tauri-plugin-deep-link"
|
||||||
version = "2.4.2"
|
version = "2.4.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dunce",
|
"dunce",
|
||||||
"plist",
|
|
||||||
"rust-ini",
|
"rust-ini",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -6578,7 +6554,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-dialog"
|
name = "tauri-plugin-dialog"
|
||||||
version = "2.3.3"
|
version = "2.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
@@ -6594,7 +6570,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-fs"
|
name = "tauri-plugin-fs"
|
||||||
version = "2.4.2"
|
version = "2.4.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"dunce",
|
"dunce",
|
||||||
@@ -6610,7 +6586,7 @@ dependencies = [
|
|||||||
"tauri-plugin",
|
"tauri-plugin",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"toml 0.9.5",
|
"toml",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -6655,7 +6631,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-http"
|
name = "tauri-plugin-http"
|
||||||
version = "2.5.2"
|
version = "2.5.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cookie_store",
|
"cookie_store",
|
||||||
@@ -6712,7 +6688,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-nfc"
|
name = "tauri-plugin-nfc"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -6725,14 +6701,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-notification"
|
name = "tauri-plugin-notification"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color-backtrace",
|
"color-backtrace",
|
||||||
"ctor",
|
"ctor",
|
||||||
"log",
|
"log",
|
||||||
"maplit",
|
"maplit",
|
||||||
"notify-rust",
|
"notify-rust",
|
||||||
"rand 0.9.0",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_repr",
|
"serde_repr",
|
||||||
@@ -6747,7 +6723,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-opener"
|
name = "tauri-plugin-opener"
|
||||||
version = "2.5.0"
|
version = "2.4.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dunce",
|
"dunce",
|
||||||
"glob",
|
"glob",
|
||||||
@@ -6767,7 +6743,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-os"
|
name = "tauri-plugin-os"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gethostname 1.0.1",
|
"gethostname 1.0.1",
|
||||||
"log",
|
"log",
|
||||||
@@ -6783,7 +6759,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-persisted-scope"
|
name = "tauri-plugin-persisted-scope"
|
||||||
version = "2.3.2"
|
version = "2.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"bincode",
|
"bincode",
|
||||||
@@ -6818,7 +6794,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-shell"
|
name = "tauri-plugin-shell"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"log",
|
"log",
|
||||||
@@ -6837,7 +6813,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-single-instance"
|
name = "tauri-plugin-single-instance"
|
||||||
version = "2.3.3"
|
version = "2.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"semver",
|
"semver",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -6869,7 +6845,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-store"
|
name = "tauri-plugin-store"
|
||||||
version = "2.4.0"
|
version = "2.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dunce",
|
"dunce",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -6889,9 +6865,9 @@ dependencies = [
|
|||||||
"iota-crypto",
|
"iota-crypto",
|
||||||
"iota_stronghold",
|
"iota_stronghold",
|
||||||
"log",
|
"log",
|
||||||
"rand 0.9.0",
|
"rand 0.8.5",
|
||||||
"rand_chacha 0.9.0",
|
"rand_chacha 0.3.1",
|
||||||
"rand_core 0.9.3",
|
"rand_core 0.6.4",
|
||||||
"rust-argon2 2.1.0",
|
"rust-argon2 2.1.0",
|
||||||
"rusty-fork",
|
"rusty-fork",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -6957,7 +6933,7 @@ dependencies = [
|
|||||||
"futures-util",
|
"futures-util",
|
||||||
"http",
|
"http",
|
||||||
"log",
|
"log",
|
||||||
"rand 0.9.0",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri",
|
"tauri",
|
||||||
@@ -6982,9 +6958,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-runtime"
|
name = "tauri-runtime"
|
||||||
version = "2.8.0"
|
version = "2.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d4cfc9ad45b487d3fded5a4731a567872a4812e9552e3964161b08edabf93846"
|
checksum = "9e7bb73d1bceac06c20b3f755b2c8a2cb13b20b50083084a8cf3700daf397ba4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cookie",
|
"cookie",
|
||||||
"dpi",
|
"dpi",
|
||||||
@@ -6993,23 +6969,20 @@ dependencies = [
|
|||||||
"jni",
|
"jni",
|
||||||
"objc2 0.6.0",
|
"objc2 0.6.0",
|
||||||
"objc2-ui-kit",
|
"objc2-ui-kit",
|
||||||
"objc2-web-kit",
|
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"url",
|
"url",
|
||||||
"webkit2gtk",
|
|
||||||
"webview2-com",
|
|
||||||
"windows 0.61.1",
|
"windows 0.61.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-runtime-wry"
|
name = "tauri-runtime-wry"
|
||||||
version = "2.8.0"
|
version = "2.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5bb0f10f831f75832ac74d14d98f701868f9a8adccef2c249b466cf70b607db9"
|
checksum = "fe52ed0ef40fd7ad51a620ecb3018e32eba3040bb95025216a962a37f6f050c5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gtk",
|
"gtk",
|
||||||
"http",
|
"http",
|
||||||
@@ -7034,16 +7007,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-utils"
|
name = "tauri-utils"
|
||||||
version = "2.7.0"
|
version = "2.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "41a3852fdf9a4f8fbeaa63dc3e9a85284dd6ef7200751f0bd66ceee30c93f212"
|
checksum = "41743bbbeb96c3a100d234e5a0b60a46d5aa068f266160862c7afdbf828ca02e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
"ctor",
|
"ctor",
|
||||||
"dunce",
|
"dunce",
|
||||||
"getrandom 0.3.2",
|
"getrandom 0.2.15",
|
||||||
"glob",
|
"glob",
|
||||||
"html5ever",
|
"html5ever",
|
||||||
"http",
|
"http",
|
||||||
@@ -7065,7 +7038,7 @@ dependencies = [
|
|||||||
"serialize-to-javascript",
|
"serialize-to-javascript",
|
||||||
"swift-rs",
|
"swift-rs",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"toml 0.9.5",
|
"toml",
|
||||||
"url",
|
"url",
|
||||||
"urlpattern",
|
"urlpattern",
|
||||||
"uuid",
|
"uuid",
|
||||||
@@ -7079,7 +7052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "56eaa45f707bedf34d19312c26d350bc0f3c59a47e58e8adbeecdc850d2c13a0"
|
checksum = "56eaa45f707bedf34d19312c26d350bc0f3c59a47e58e8adbeecdc850d2c13a0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"embed-resource",
|
"embed-resource",
|
||||||
"toml 0.8.20",
|
"toml",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -7369,26 +7342,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
|
checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned 0.6.8",
|
"serde_spanned",
|
||||||
"toml_datetime 0.6.8",
|
"toml_datetime",
|
||||||
"toml_edit 0.22.24",
|
"toml_edit 0.22.24",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "toml"
|
|
||||||
version = "0.9.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8"
|
|
||||||
dependencies = [
|
|
||||||
"indexmap 2.9.0",
|
|
||||||
"serde",
|
|
||||||
"serde_spanned 1.0.0",
|
|
||||||
"toml_datetime 0.7.0",
|
|
||||||
"toml_parser",
|
|
||||||
"toml_writer",
|
|
||||||
"winnow 0.7.12",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_datetime"
|
name = "toml_datetime"
|
||||||
version = "0.6.8"
|
version = "0.6.8"
|
||||||
@@ -7398,15 +7356,6 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "toml_datetime"
|
|
||||||
version = "0.7.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
name = "toml_edit"
|
||||||
version = "0.19.15"
|
version = "0.19.15"
|
||||||
@@ -7414,7 +7363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.9.0",
|
"indexmap 2.9.0",
|
||||||
"toml_datetime 0.6.8",
|
"toml_datetime",
|
||||||
"winnow 0.5.40",
|
"winnow 0.5.40",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -7425,7 +7374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
|
checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.9.0",
|
"indexmap 2.9.0",
|
||||||
"toml_datetime 0.6.8",
|
"toml_datetime",
|
||||||
"winnow 0.5.40",
|
"winnow 0.5.40",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -7437,26 +7386,11 @@ checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.9.0",
|
"indexmap 2.9.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned 0.6.8",
|
"serde_spanned",
|
||||||
"toml_datetime 0.6.8",
|
"toml_datetime",
|
||||||
"winnow 0.7.12",
|
"winnow 0.7.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "toml_parser"
|
|
||||||
version = "1.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10"
|
|
||||||
dependencies = [
|
|
||||||
"winnow 0.7.12",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "toml_writer"
|
|
||||||
version = "1.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower"
|
name = "tower"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
@@ -7518,9 +7452,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tray-icon"
|
name = "tray-icon"
|
||||||
version = "0.21.1"
|
version = "0.20.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a0d92153331e7d02ec09137538996a7786fe679c629c279e82a6be762b7e6fe2"
|
checksum = "d433764348e7084bad2c5ea22c96c71b61b17afe3a11645710f533bd72b6a2b5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"dirs 6.0.0",
|
"dirs 6.0.0",
|
||||||
@@ -8721,9 +8655,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winnow"
|
name = "winnow"
|
||||||
version = "0.7.12"
|
version = "0.7.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95"
|
checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
@@ -8789,15 +8723,14 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wry"
|
name = "wry"
|
||||||
version = "0.53.1"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5698e50a589268aec06d2219f48b143222f7b5ad9aa690118b8dce0a8dcac574"
|
checksum = "b08db04817a654a7e3339647d9cf8b497ed9ddcd4ec7cfda5a3a220c10a3bba3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"block2 0.6.0",
|
"block2 0.6.0",
|
||||||
"cookie",
|
"cookie",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"dirs 6.0.0",
|
|
||||||
"dpi",
|
"dpi",
|
||||||
"dunce",
|
"dunce",
|
||||||
"gdkx11",
|
"gdkx11",
|
||||||
@@ -8958,7 +8891,7 @@ dependencies = [
|
|||||||
"tracing",
|
"tracing",
|
||||||
"uds_windows",
|
"uds_windows",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
"winnow 0.7.12",
|
"winnow 0.7.6",
|
||||||
"zbus_macros",
|
"zbus_macros",
|
||||||
"zbus_names",
|
"zbus_names",
|
||||||
"zvariant",
|
"zvariant",
|
||||||
@@ -8987,7 +8920,7 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"winnow 0.7.12",
|
"winnow 0.7.6",
|
||||||
"zvariant",
|
"zvariant",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -9174,7 +9107,7 @@ dependencies = [
|
|||||||
"enumflags2",
|
"enumflags2",
|
||||||
"serde",
|
"serde",
|
||||||
"url",
|
"url",
|
||||||
"winnow 0.7.12",
|
"winnow 0.7.6",
|
||||||
"zvariant_derive",
|
"zvariant_derive",
|
||||||
"zvariant_utils",
|
"zvariant_utils",
|
||||||
]
|
]
|
||||||
@@ -9203,5 +9136,5 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"syn 2.0.100",
|
"syn 2.0.100",
|
||||||
"winnow 0.7.12",
|
"winnow 0.7.6",
|
||||||
]
|
]
|
||||||
|
|||||||
+4
-4
@@ -12,10 +12,10 @@ resolver = "2"
|
|||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
tauri = { version = "2.8.2", default-features = false }
|
tauri = { version = "2.6", default-features = false }
|
||||||
tauri-build = "2.4"
|
tauri-build = "2.3"
|
||||||
tauri-plugin = "2.4"
|
tauri-plugin = "2.3"
|
||||||
tauri-utils = "2.7"
|
tauri-utils = "2.5"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
thiserror = "2"
|
thiserror = "2"
|
||||||
url = "2"
|
url = "2"
|
||||||
|
|||||||
@@ -1,35 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.0.31]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `shell-js@2.3.1`
|
|
||||||
|
|
||||||
## \[2.0.30]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `notification-js@2.3.1`
|
|
||||||
|
|
||||||
## \[2.0.29]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `fs-js@2.4.2`
|
|
||||||
- Upgraded to `nfc-js@2.3.1`
|
|
||||||
- Upgraded to `opener-js@2.5.0`
|
|
||||||
- Upgraded to `os-js@2.3.1`
|
|
||||||
- Upgraded to `store-js@2.4.0`
|
|
||||||
- Upgraded to `dialog-js@2.3.3`
|
|
||||||
- Upgraded to `http-js@2.5.2`
|
|
||||||
|
|
||||||
## \[2.0.28]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `dialog-js@2.3.2`
|
|
||||||
|
|
||||||
## \[2.0.27]
|
## \[2.0.27]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta
|
<meta
|
||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=0"
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
||||||
/>
|
/>
|
||||||
<title>Svelte + Vite App</title>
|
<title>Svelte + Vite App</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+12
-12
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.31",
|
"version": "2.0.27",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --clearScreen false",
|
"dev": "vite --clearScreen false",
|
||||||
@@ -10,24 +10,24 @@
|
|||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.8.0",
|
"@tauri-apps/api": "2.7.0",
|
||||||
"@tauri-apps/plugin-barcode-scanner": "^2.4.0",
|
"@tauri-apps/plugin-barcode-scanner": "^2.4.0",
|
||||||
"@tauri-apps/plugin-biometric": "^2.3.0",
|
"@tauri-apps/plugin-biometric": "^2.3.0",
|
||||||
"@tauri-apps/plugin-cli": "^2.4.0",
|
"@tauri-apps/plugin-cli": "^2.4.0",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "^2.3.0",
|
"@tauri-apps/plugin-clipboard-manager": "^2.3.0",
|
||||||
"@tauri-apps/plugin-dialog": "^2.3.3",
|
"@tauri-apps/plugin-dialog": "^2.3.1",
|
||||||
"@tauri-apps/plugin-fs": "^2.4.2",
|
"@tauri-apps/plugin-fs": "^2.4.1",
|
||||||
"@tauri-apps/plugin-geolocation": "^2.2.0",
|
"@tauri-apps/plugin-geolocation": "^2.2.0",
|
||||||
"@tauri-apps/plugin-global-shortcut": "^2.3.0",
|
"@tauri-apps/plugin-global-shortcut": "^2.3.0",
|
||||||
"@tauri-apps/plugin-haptics": "^2.2.0",
|
"@tauri-apps/plugin-haptics": "^2.2.0",
|
||||||
"@tauri-apps/plugin-http": "^2.5.2",
|
"@tauri-apps/plugin-http": "^2.5.1",
|
||||||
"@tauri-apps/plugin-nfc": "^2.3.1",
|
"@tauri-apps/plugin-nfc": "^2.3.0",
|
||||||
"@tauri-apps/plugin-notification": "^2.3.1",
|
"@tauri-apps/plugin-notification": "^2.3.0",
|
||||||
"@tauri-apps/plugin-opener": "^2.5.0",
|
"@tauri-apps/plugin-opener": "^2.4.0",
|
||||||
"@tauri-apps/plugin-os": "^2.3.1",
|
"@tauri-apps/plugin-os": "^2.3.0",
|
||||||
"@tauri-apps/plugin-process": "^2.3.0",
|
"@tauri-apps/plugin-process": "^2.3.0",
|
||||||
"@tauri-apps/plugin-shell": "^2.3.1",
|
"@tauri-apps/plugin-shell": "^2.3.0",
|
||||||
"@tauri-apps/plugin-store": "^2.4.0",
|
"@tauri-apps/plugin-store": "^2.3.0",
|
||||||
"@tauri-apps/plugin-updater": "^2.9.0",
|
"@tauri-apps/plugin-updater": "^2.9.0",
|
||||||
"@tauri-apps/plugin-upload": "^2.3.0",
|
"@tauri-apps/plugin-upload": "^2.3.0",
|
||||||
"@zerodevx/svelte-json-view": "1.0.11"
|
"@zerodevx/svelte-json-view": "1.0.11"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"@iconify-json/codicon": "^1.2.12",
|
"@iconify-json/codicon": "^1.2.12",
|
||||||
"@iconify-json/ph": "^1.2.2",
|
"@iconify-json/ph": "^1.2.2",
|
||||||
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
||||||
"@tauri-apps/cli": "2.8.2",
|
"@tauri-apps/cli": "2.7.1",
|
||||||
"@unocss/extractor-svelte": "^66.3.3",
|
"@unocss/extractor-svelte": "^66.3.3",
|
||||||
"svelte": "^5.20.4",
|
"svelte": "^5.20.4",
|
||||||
"unocss": "^66.3.3",
|
"unocss": "^66.3.3",
|
||||||
|
|||||||
@@ -1,35 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.0.35]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `shell@2.3.1`
|
|
||||||
|
|
||||||
## \[2.0.34]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `notification@2.3.1`
|
|
||||||
|
|
||||||
## \[2.0.33]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `fs@2.4.2`
|
|
||||||
- Upgraded to `nfc@2.3.1`
|
|
||||||
- Upgraded to `opener@2.5.0`
|
|
||||||
- Upgraded to `os@2.3.1`
|
|
||||||
- Upgraded to `store@2.4.0`
|
|
||||||
- Upgraded to `dialog@2.3.3`
|
|
||||||
- Upgraded to `http@2.5.2`
|
|
||||||
|
|
||||||
## \[2.0.32]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `dialog@2.3.2`
|
|
||||||
|
|
||||||
## \[2.0.31]
|
## \[2.0.31]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "api"
|
name = "api"
|
||||||
publish = false
|
publish = false
|
||||||
version = "2.0.35"
|
version = "2.0.31"
|
||||||
description = "An example Tauri Application showcasing the api"
|
description = "An example Tauri Application showcasing the api"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
@@ -21,23 +21,23 @@ tiny_http = "0.12"
|
|||||||
time = "0.3"
|
time = "0.3"
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.6.0" }
|
tauri-plugin-log = { path = "../../../plugins/log", version = "2.6.0" }
|
||||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.4.2", features = [
|
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.4.1", features = [
|
||||||
"watch",
|
"watch",
|
||||||
] }
|
] }
|
||||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.0" }
|
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.0" }
|
||||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.3.3" }
|
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.3.1" }
|
||||||
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
||||||
"multipart",
|
"multipart",
|
||||||
"cookies",
|
"cookies",
|
||||||
], version = "2.5.2" }
|
], version = "2.5.1" }
|
||||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.3.1", features = [
|
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.3.0", features = [
|
||||||
"windows7-compat",
|
"windows7-compat",
|
||||||
] }
|
] }
|
||||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.3.1" }
|
tauri-plugin-os = { path = "../../../plugins/os", version = "2.3.0" }
|
||||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.0" }
|
tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.0" }
|
||||||
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.0" }
|
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.4.0" }
|
||||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.1" }
|
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.0" }
|
||||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.0" }
|
tauri-plugin-store = { path = "../../../plugins/store", version = "2.3.0" }
|
||||||
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
|
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
|
||||||
|
|
||||||
[dependencies.tauri]
|
[dependencies.tauri]
|
||||||
@@ -62,7 +62,7 @@ tauri-plugin-window-state = { path = "../../../plugins/window-state", version =
|
|||||||
|
|
||||||
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
||||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.4.0" }
|
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.4.0" }
|
||||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.3.1" }
|
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.3.0" }
|
||||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.3.0" }
|
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.3.0" }
|
||||||
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.3.0" }
|
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.3.0" }
|
||||||
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.0" }
|
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.0" }
|
||||||
|
|||||||
@@ -68,9 +68,6 @@
|
|||||||
"fs:allow-rename",
|
"fs:allow-rename",
|
||||||
"fs:allow-mkdir",
|
"fs:allow-mkdir",
|
||||||
"fs:allow-remove",
|
"fs:allow-remove",
|
||||||
"fs:allow-stat",
|
|
||||||
"fs:allow-fstat",
|
|
||||||
"fs:allow-lstat",
|
|
||||||
"fs:allow-write-text-file",
|
"fs:allow-write-text-file",
|
||||||
"fs:read-meta",
|
"fs:read-meta",
|
||||||
"fs:scope-download-recursive",
|
"fs:scope-download-recursive",
|
||||||
@@ -78,9 +75,6 @@
|
|||||||
{
|
{
|
||||||
"identifier": "fs:scope-appdata-recursive",
|
"identifier": "fs:scope-appdata-recursive",
|
||||||
"allow": [
|
"allow": [
|
||||||
{
|
|
||||||
"path": "$APPDATA/db/"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "$APPDATA/db/**"
|
"path": "$APPDATA/db/**"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ pub struct RequestBody {
|
|||||||
|
|
||||||
#[command]
|
#[command]
|
||||||
pub fn log_operation(event: String, payload: Option<String>) {
|
pub fn log_operation(event: String, payload: Option<String>) {
|
||||||
log::info!("{} {:?}", event, payload);
|
log::info!("{event} {payload:?}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[command]
|
#[command]
|
||||||
pub fn perform_request(endpoint: String, body: RequestBody) -> String {
|
pub fn perform_request(endpoint: String, body: RequestBody) -> String {
|
||||||
println!("{} {:?}", endpoint, body);
|
println!("{endpoint} {body:?}");
|
||||||
"message response".into()
|
"message response".into()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ pub fn run() {
|
|||||||
let server = match tiny_http::Server::http("localhost:3003") {
|
let server = match tiny_http::Server::http("localhost:3003") {
|
||||||
Ok(s) => s,
|
Ok(s) => s,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
eprintln!("{}", e);
|
eprintln!("{e}");
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,214 +1,194 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as fs from '@tauri-apps/plugin-fs'
|
import * as fs from "@tauri-apps/plugin-fs";
|
||||||
import * as os from '@tauri-apps/plugin-os'
|
import { convertFileSrc } from "@tauri-apps/api/core";
|
||||||
import { convertFileSrc } from '@tauri-apps/api/core'
|
import { arrayBufferToBase64 } from "../lib/utils";
|
||||||
import { arrayBufferToBase64 } from '../lib/utils'
|
import { onDestroy } from "svelte";
|
||||||
import { onDestroy, onMount } from 'svelte'
|
|
||||||
|
|
||||||
const { onMessage, insecureRenderHtml } = $props()
|
export let onMessage;
|
||||||
|
export let insecureRenderHtml;
|
||||||
|
|
||||||
let path = $state('')
|
let path = "";
|
||||||
let img
|
let img;
|
||||||
/** @type {fs.FileHandle} */
|
/** @type {fs.FileHandle} */
|
||||||
let file = $state()
|
let file;
|
||||||
let renameTo = $state()
|
let renameTo;
|
||||||
let watchPath = $state('')
|
let watchPath = "";
|
||||||
let watchDebounceDelay = $state(0)
|
let watchDebounceDelay = "0";
|
||||||
let watchRecursive = $state(false)
|
let watchRecursive = false;
|
||||||
/** @type {fs.BaseDirectory | undefined} */
|
let unwatchFn;
|
||||||
let baseDir = $state()
|
let unwatchPath = "";
|
||||||
let unwatchFn
|
|
||||||
let unwatchPath = ''
|
|
||||||
let isMobile = $state(false)
|
|
||||||
|
|
||||||
onMount(() => {
|
function getDir() {
|
||||||
let platform = os.platform()
|
const dirSelect = document.getElementById("dir");
|
||||||
isMobile = platform === 'android' || platform === 'ios'
|
return dirSelect.value ? parseInt(dir.value) : null;
|
||||||
})
|
}
|
||||||
|
|
||||||
const dirOptions = Object.keys(fs.BaseDirectory).filter((key) =>
|
const DirOptions = Object.keys(fs.BaseDirectory)
|
||||||
isNaN(parseInt(key))
|
.filter((key) => isNaN(parseInt(key)))
|
||||||
)
|
.map((dir) => [dir, fs.BaseDirectory[dir]]);
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
fs.open(path, {
|
fs.open(path, {
|
||||||
baseDir,
|
baseDir: getDir(),
|
||||||
read: true,
|
read: true,
|
||||||
write: true,
|
write: true,
|
||||||
create: true
|
create: true,
|
||||||
})
|
})
|
||||||
.then((f) => {
|
.then((f) => {
|
||||||
file = f
|
file = f;
|
||||||
onMessage(`Opened ${path}`)
|
onMessage(`Opened ${path}`);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function mkdir() {
|
function mkdir() {
|
||||||
fs.mkdir(path, { baseDir, recursive: true })
|
fs.mkdir(path, { baseDir: getDir() })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
onMessage(`Created dir ${path}`)
|
onMessage(`Created dir ${path}`);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove() {
|
function remove() {
|
||||||
fs.remove(path, { baseDir })
|
fs.remove(path, { baseDir: getDir() })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
onMessage(`Removed ${path}`)
|
onMessage(`Removed ${path}`);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function rename() {
|
function rename() {
|
||||||
fs.rename(path, renameTo, {
|
fs.rename(path, renameTo, {
|
||||||
oldPathBaseDir,
|
oldPathBaseDir: getDir(),
|
||||||
newPathBaseDir
|
newPathBaseDir: getDir(),
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
onMessage(`Renamed ${path} to ${renameTo}`)
|
onMessage(`Renamed ${path} to ${renameTo}`);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function truncate() {
|
function truncate() {
|
||||||
file
|
file
|
||||||
.truncate(0)
|
.truncate(0)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
onMessage(`Truncated file`)
|
onMessage(`Truncated file`);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
|
||||||
|
|
||||||
function write() {
|
|
||||||
const encoder = new TextEncoder()
|
|
||||||
file
|
|
||||||
.write(encoder.encode('Hello from Tauri :)'))
|
|
||||||
.then(() => {
|
|
||||||
onMessage(`wrote to file`)
|
|
||||||
})
|
|
||||||
.catch(onMessage)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function stat() {
|
function stat() {
|
||||||
file
|
file
|
||||||
.stat()
|
.stat()
|
||||||
.then((stat) => {
|
.then((stat) => {
|
||||||
onMessage(`File stat ${JSON.stringify(stat)}`)
|
onMessage(`File stat ${JSON.stringify(stat)}`);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function read() {
|
function read() {
|
||||||
const opts = {
|
const opts = {
|
||||||
baseDir
|
baseDir: getDir(),
|
||||||
}
|
};
|
||||||
fs.stat(path, opts)
|
fs.stat(path, opts)
|
||||||
.then((stat) => {
|
.then((stat) => {
|
||||||
const isFile = stat.isFile
|
const isFile = stat.isFile;
|
||||||
|
|
||||||
const promise = isFile
|
const promise = isFile
|
||||||
? fs.readFile(path, opts)
|
? fs.readFile(path, opts)
|
||||||
: fs.readDir(path, opts)
|
: fs.readDir(path, opts);
|
||||||
promise
|
promise
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
if (isFile) {
|
if (isFile) {
|
||||||
if (path.includes('.png') || path.includes('.jpg')) {
|
if (path.includes(".png") || path.includes(".jpg")) {
|
||||||
arrayBufferToBase64(
|
arrayBufferToBase64(
|
||||||
new Uint8Array(response),
|
new Uint8Array(response),
|
||||||
function (base64) {
|
function (base64) {
|
||||||
const src = 'data:image/png;base64,' + base64
|
const src = "data:image/png;base64," + base64;
|
||||||
insecureRenderHtml('<img src="' + src + '"></img>')
|
insecureRenderHtml('<img src="' + src + '"></img>');
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
} else {
|
} else {
|
||||||
const value = String.fromCharCode.apply(null, response)
|
const value = String.fromCharCode.apply(null, response);
|
||||||
insecureRenderHtml(
|
insecureRenderHtml(
|
||||||
'<textarea id="file-response"></textarea><button id="file-save">Save</button>'
|
'<textarea id="file-response"></textarea><button id="file-save">Save</button>'
|
||||||
)
|
);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const fileInput = document.getElementById('file-response')
|
const fileInput = document.getElementById("file-response");
|
||||||
fileInput.value = value
|
fileInput.value = value;
|
||||||
document
|
document
|
||||||
.getElementById('file-save')
|
.getElementById("file-save")
|
||||||
.addEventListener('click', function () {
|
.addEventListener("click", function () {
|
||||||
fs.writeTextFile(path, fileInput.value, {
|
fs.writeTextFile(path, fileInput.value, {
|
||||||
baseDir
|
baseDir: getDir(),
|
||||||
}).catch(onMessage)
|
}).catch(onMessage);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
onMessage(response)
|
onMessage(response);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSrc() {
|
function setSrc() {
|
||||||
img.src = convertFileSrc(path)
|
img.src = convertFileSrc(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
function watch() {
|
function watch() {
|
||||||
unwatch()
|
unwatch();
|
||||||
if (watchPath) {
|
if (watchPath) {
|
||||||
onMessage(`Watching ${watchPath} for changes`)
|
onMessage(`Watching ${watchPath} for changes`);
|
||||||
let options = {
|
let options = {
|
||||||
recursive: watchRecursive,
|
recursive: watchRecursive,
|
||||||
delayMs: watchDebounceDelay
|
delayMs: parseInt(watchDebounceDelay),
|
||||||
}
|
};
|
||||||
if (options.delayMs === 0) {
|
if (options.delayMs === 0) {
|
||||||
fs.watchImmediate(watchPath, onMessage, options)
|
fs.watchImmediate(watchPath, onMessage, options)
|
||||||
.then((fn) => {
|
.then((fn) => {
|
||||||
unwatchFn = fn
|
unwatchFn = fn;
|
||||||
unwatchPath = watchPath
|
unwatchPath = watchPath;
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
} else {
|
} else {
|
||||||
fs.watch(watchPath, onMessage, options)
|
fs.watch(watchPath, onMessage, options)
|
||||||
.then((fn) => {
|
.then((fn) => {
|
||||||
unwatchFn = fn
|
unwatchFn = fn;
|
||||||
unwatchPath = watchPath
|
unwatchPath = watchPath;
|
||||||
})
|
})
|
||||||
.catch(onMessage)
|
.catch(onMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function unwatch() {
|
function unwatch() {
|
||||||
if (unwatchFn) {
|
if (unwatchFn) {
|
||||||
onMessage(`Stopped watching ${unwatchPath} for changes`)
|
onMessage(`Stopped watching ${unwatchPath} for changes`);
|
||||||
unwatchFn()
|
unwatchFn();
|
||||||
}
|
}
|
||||||
unwatchFn = undefined
|
unwatchFn = undefined;
|
||||||
unwatchPath = undefined
|
unwatchPath = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
if (file) {
|
if (file) {
|
||||||
file.close()
|
file.close();
|
||||||
}
|
}
|
||||||
if (unwatchFn) {
|
if (unwatchFn) {
|
||||||
unwatchFn()
|
unwatchFn();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
{#if isMobile}
|
|
||||||
<div>
|
|
||||||
On mobile, paths outside of App* paths require the use of dialogs
|
|
||||||
regardless of Tauri's scope mechanism.
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{/if}
|
|
||||||
<div class="flex gap-1">
|
<div class="flex gap-1">
|
||||||
<select class="input" bind:value={baseDir}>
|
<select class="input" id="dir">
|
||||||
<option value={undefined} selected>None</option>
|
<option value="">None</option>
|
||||||
{#each dirOptions as dir}
|
{#each DirOptions as dir}
|
||||||
<option value={fs.BaseDirectory[dir]}>{dir}</option>
|
<option value={dir[1]}>{dir[0]}</option>
|
||||||
{/each}
|
{/each}
|
||||||
</select>
|
</select>
|
||||||
<input
|
<input
|
||||||
@@ -219,21 +199,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<button class="btn" onclick={open}>Open</button>
|
<button class="btn" on:click={open}>Open</button>
|
||||||
<button class="btn" onclick={read}>Read</button>
|
<button class="btn" on:click={read}>Read</button>
|
||||||
<button class="btn" onclick={mkdir}>Mkdir</button>
|
<button class="btn" on:click={mkdir}>Mkdir</button>
|
||||||
<button class="btn" onclick={remove}>Remove</button>
|
<button class="btn" on:click={remove}>Remove</button>
|
||||||
<div class="flex flex-row">
|
<div class="flex flex-row">
|
||||||
<button class="btn" onclick={rename}>Rename</button>
|
<button class="btn" on:click={rename}>Rename</button>
|
||||||
<input class="input" bind:value={renameTo} placeholder="To" />
|
<input class="input" bind:value={renameTo} placeholder="To" />
|
||||||
</div>
|
</div>
|
||||||
<button class="btn" type="button" onclick={setSrc}>Use as img src</button>
|
<button class="btn" type="button" on:click={setSrc}>Use as img src</button>
|
||||||
</div>
|
</div>
|
||||||
{#if file}
|
{#if file}
|
||||||
<div>
|
<div>
|
||||||
<button class="btn" onclick={write}>Write</button>
|
<button class="btn" on:click={truncate}>Truncate</button>
|
||||||
<button class="btn" onclick={truncate}>Truncate</button>
|
<button class="btn" on:click={stat}>Stat</button>
|
||||||
<button class="btn" onclick={stat}>Stat</button>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@@ -262,8 +241,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<button class="btn" onclick={watch}>Watch</button>
|
<button class="btn" on:click={watch}>Watch</button>
|
||||||
<button class="btn" onclick={unwatch}>Unwatch</button>
|
<button class="btn" on:click={unwatch}>Unwatch</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import { sendNotification } from '@tauri-apps/plugin-notification'
|
|
||||||
export let onMessage
|
export let onMessage
|
||||||
|
|
||||||
let sound = ''
|
|
||||||
|
|
||||||
// send the notification directly
|
// send the notification directly
|
||||||
// the backend is responsible for checking the permission
|
// the backend is responsible for checking the permission
|
||||||
function _sendNotification() {
|
function _sendNotification() {
|
||||||
sendNotification({
|
new Notification('Notification title', {
|
||||||
title: 'Notification title',
|
body: 'This is the notification body'
|
||||||
body: 'This is the notification body',
|
|
||||||
sound: sound || null
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// alternatively, check the permission ourselves
|
// alternatively, check the permission ourselves
|
||||||
function triggerNotification() {
|
function sendNotification() {
|
||||||
if (Notification.permission === 'default') {
|
if (Notification.permission === 'default') {
|
||||||
Notification.requestPermission()
|
Notification.requestPermission()
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
@@ -34,11 +29,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<input
|
<button class="btn" id="notification" on:click={sendNotification}>
|
||||||
class="input grow"
|
|
||||||
placeholder="Notification sound..."
|
|
||||||
bind:value={sound}
|
|
||||||
/>
|
|
||||||
<button class="btn" id="notification" on:click={triggerNotification}>
|
|
||||||
Send test notification
|
Send test notification
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,85 +1,71 @@
|
|||||||
<script>
|
<script>
|
||||||
import { appDataDir, resolve } from '@tauri-apps/api/path'
|
import { LazyStore } from "@tauri-apps/plugin-store";
|
||||||
import { LazyStore } from '@tauri-apps/plugin-store'
|
import { onMount } from "svelte";
|
||||||
import { onMount } from 'svelte'
|
|
||||||
|
|
||||||
let { onMessage } = $props()
|
export let onMessage;
|
||||||
|
|
||||||
let key = $state()
|
let key;
|
||||||
let value = $state()
|
let value;
|
||||||
|
|
||||||
const storeName = 'cache.json'
|
let store = new LazyStore("cache.json");
|
||||||
|
let cache = {};
|
||||||
let store = new LazyStore(storeName)
|
|
||||||
let path = $state('')
|
|
||||||
let cache = $state({})
|
|
||||||
|
|
||||||
async function refreshEntries() {
|
async function refreshEntries() {
|
||||||
try {
|
try {
|
||||||
const values = await store.entries()
|
const values = await store.entries();
|
||||||
cache = {}
|
cache = {};
|
||||||
for (const [key, value] of values) {
|
for (const [key, value] of values) {
|
||||||
cache[key] = value
|
cache[key] = value;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onMessage(error)
|
onMessage(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
path = await resolve(await appDataDir(), storeName)
|
await refreshEntries();
|
||||||
await refreshEntries()
|
});
|
||||||
})
|
|
||||||
|
|
||||||
async function write(key, value) {
|
async function write(key, value) {
|
||||||
try {
|
try {
|
||||||
if (value) {
|
if (value) {
|
||||||
await store.set(key, value)
|
await store.set(key, value);
|
||||||
} else {
|
} else {
|
||||||
await store.delete(key)
|
await store.delete(key);
|
||||||
}
|
}
|
||||||
const v = await store.get(key)
|
const v = await store.get(key);
|
||||||
if (v === undefined) {
|
if (v === undefined) {
|
||||||
delete cache[key]
|
delete cache[key];
|
||||||
cache = cache
|
cache = cache;
|
||||||
} else {
|
} else {
|
||||||
cache[key] = v
|
cache[key] = v;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onMessage(error)
|
onMessage(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function reset() {
|
async function reset() {
|
||||||
try {
|
try {
|
||||||
await store.reset()
|
await store.reset();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onMessage(error)
|
onMessage(error);
|
||||||
}
|
}
|
||||||
await refreshEntries()
|
await refreshEntries();
|
||||||
}
|
|
||||||
|
|
||||||
async function reload() {
|
|
||||||
try {
|
|
||||||
await store.reload({ overrideDefaults: true })
|
|
||||||
} catch (error) {
|
|
||||||
onMessage(error)
|
|
||||||
}
|
|
||||||
await refreshEntries()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function close() {
|
async function close() {
|
||||||
try {
|
try {
|
||||||
await store.close()
|
await store.close();
|
||||||
onMessage('Store is now closed, any new operations will error out')
|
onMessage("Store is now closed, any new operations will error out");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
onMessage(error)
|
onMessage(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reopen() {
|
function reopen() {
|
||||||
store = new LazyStore(storeName)
|
store = new LazyStore("cache.json");
|
||||||
onMessage('We made a new `LazyStore` instance, operations will now work')
|
onMessage("We made a new `LazyStore` instance, operations will now work");
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -96,17 +82,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button class="btn" onclick={() => write(key, value)}>Write</button>
|
<button class="btn" on:click={() => write(key, value)}>Write</button>
|
||||||
<button class="btn" onclick={() => reset()}>Reset</button>
|
<button class="btn" on:click={() => reset()}>Reset</button>
|
||||||
<button class="btn" onclick={() => reload()}>Reload</button>
|
<button class="btn" on:click={() => close()}>Close</button>
|
||||||
<button class="btn" onclick={() => close()}>Close</button>
|
<button class="btn" on:click={() => reopen()}>Re-open</button>
|
||||||
<button class="btn" onclick={() => reopen()}>Re-open</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div>Store at <code>{path}</code> on disk</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>Store Values</h2>
|
|
||||||
{#each Object.entries(cache) as [k, v]}
|
{#each Object.entries(cache) as [k, v]}
|
||||||
<div>{k} = {v}</div>
|
<div>{k} = {v}</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
+5
-5
@@ -11,19 +11,19 @@
|
|||||||
"example:api:dev": "pnpm run --filter \"api\" tauri dev"
|
"example:api:dev": "pnpm run --filter \"api\" tauri dev"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "9.34.0",
|
"@eslint/js": "9.31.0",
|
||||||
"@rollup/plugin-node-resolve": "16.0.1",
|
"@rollup/plugin-node-resolve": "16.0.1",
|
||||||
"@rollup/plugin-terser": "0.4.4",
|
"@rollup/plugin-terser": "0.4.4",
|
||||||
"@rollup/plugin-typescript": "12.1.4",
|
"@rollup/plugin-typescript": "12.1.4",
|
||||||
"covector": "^0.12.4",
|
"covector": "^0.12.4",
|
||||||
"eslint": "9.34.0",
|
"eslint": "9.31.0",
|
||||||
"eslint-config-prettier": "10.1.8",
|
"eslint-config-prettier": "10.1.8",
|
||||||
"eslint-plugin-security": "3.0.1",
|
"eslint-plugin-security": "3.0.1",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.6.2",
|
||||||
"rollup": "4.48.0",
|
"rollup": "4.45.1",
|
||||||
"tslib": "2.8.1",
|
"tslib": "2.8.1",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.8.3",
|
||||||
"typescript-eslint": "8.40.0"
|
"typescript-eslint": "8.38.0"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspac
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-autostart
|
pnpm add @tauri-apps/plugin-autostart
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-autostart
|
npm add @tauri-apps/plugin-autostart
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-autostart
|
yarn add @tauri-apps/plugin-autostart
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-autostart#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-autostart#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-autostart#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-barcode-scanner = { git = "https://github.com/tauri-apps/plugins-wo
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-barcode-scanner
|
pnpm add @tauri-apps/plugin-barcode-scanner
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-barcode-scanner
|
npm add @tauri-apps/plugin-barcode-scanner
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-barcode-scanner
|
yarn add @tauri-apps/plugin-barcode-scanner
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-barcode-scanner#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-barcode-scanner#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-barcode-scanner#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ tauri-plugin-biometric = { git = "https://github.com/tauri-apps/plugins-workspac
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
<!-- Add the branch for installations using git! -->
|
<!-- Add the branch for installations using git! -->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -41,6 +43,13 @@ pnpm add @tauri-apps/plugin-biometric
|
|||||||
npm add @tauri-apps/plugin-biometric
|
npm add @tauri-apps/plugin-biometric
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-biometric
|
yarn add @tauri-apps/plugin-biometric
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-biometric#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-biometric#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-biometric#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,21 @@ tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", br
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-cli
|
pnpm add @tauri-apps/plugin-cli
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-cli
|
npm add @tauri-apps/plugin-cli
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-cli
|
yarn add @tauri-apps/plugin-cli
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-cli#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-cli#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-cli#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-clipboard-manager = { git = "https://github.com/tauri-apps/plugins-
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-clipboard-manager
|
pnpm add @tauri-apps/plugin-clipboard-manager
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-clipboard-manager
|
npm add @tauri-apps/plugin-clipboard-manager
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-clipboard-manager
|
yarn add @tauri-apps/plugin-clipboard-manager
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-clipboard-manager#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-clipboard-manager#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-clipboard-manager#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.4.2]
|
|
||||||
|
|
||||||
- [`21d721a0`](https://github.com/tauri-apps/plugins-workspace/commit/21d721a0c2731fc201872f5b99ea8bbdc61b0b60) ([#2928](https://github.com/tauri-apps/plugins-workspace/pull/2928) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) On Linux, improved error messages when OS commands fail.
|
|
||||||
|
|
||||||
## \[2.4.1]
|
## \[2.4.1]
|
||||||
|
|
||||||
- [`d4f8299b`](https://github.com/tauri-apps/plugins-workspace/commit/d4f8299b12f107718c70692840a63768d65baaf9) ([#2844](https://github.com/tauri-apps/plugins-workspace/pull/2844) by [@yobson1](https://github.com/tauri-apps/plugins-workspace/../../yobson1)) Fix deep link protocol handler not set as default on linux
|
- [`d4f8299b`](https://github.com/tauri-apps/plugins-workspace/commit/d4f8299b12f107718c70692840a63768d65baaf9) ([#2844](https://github.com/tauri-apps/plugins-workspace/pull/2844) by [@yobson1](https://github.com/tauri-apps/plugins-workspace/../../yobson1)) Fix deep link protocol handler not set as default on linux
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-deep-link"
|
name = "tauri-plugin-deep-link"
|
||||||
version = "2.4.2"
|
version = "2.4.1"
|
||||||
description = "Set your Tauri application as the default handler for an URL"
|
description = "Set your Tauri application as the default handler for an URL"
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
@@ -27,9 +27,6 @@ serde_json = { workspace = true }
|
|||||||
tauri-utils = { workspace = true }
|
tauri-utils = { workspace = true }
|
||||||
tauri-plugin = { workspace = true, features = ["build"] }
|
tauri-plugin = { workspace = true, features = ["build"] }
|
||||||
|
|
||||||
[target."cfg(target_os = \"macos\")".build-dependencies]
|
|
||||||
plist = "1"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-deep-link = { git = "https://github.com/tauri-apps/plugins-workspac
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-deep-link
|
pnpm add @tauri-apps/plugin-deep-link
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-deep-link
|
npm add @tauri-apps/plugin-deep-link
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-deep-link
|
yarn add @tauri-apps/plugin-deep-link
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-deep-link#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-deep-link#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-deep-link#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting up
|
## Setting up
|
||||||
|
|||||||
+26
-119
@@ -10,64 +10,50 @@ const COMMANDS: &[&str] = &["get_current", "register", "unregister", "is_registe
|
|||||||
|
|
||||||
// TODO: Consider using activity-alias in case users may have multiple activities in their app.
|
// TODO: Consider using activity-alias in case users may have multiple activities in their app.
|
||||||
fn intent_filter(domain: &AssociatedDomain) -> String {
|
fn intent_filter(domain: &AssociatedDomain) -> String {
|
||||||
let host = domain
|
|
||||||
.host
|
|
||||||
.as_ref()
|
|
||||||
.map(|h| format!(r#"<data android:host="{h}" />"#))
|
|
||||||
.unwrap_or_default();
|
|
||||||
|
|
||||||
let auto_verify = if domain.is_app_link() {
|
|
||||||
r#"android:autoVerify="true" "#.to_string()
|
|
||||||
} else {
|
|
||||||
String::new()
|
|
||||||
};
|
|
||||||
|
|
||||||
format!(
|
format!(
|
||||||
r#"<intent-filter {auto_verify}>
|
r#"<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
{schemes}
|
{}
|
||||||
{host}
|
<data android:host="{}" />
|
||||||
{domains}
|
{}
|
||||||
{path_patterns}
|
{}
|
||||||
{path_prefixes}
|
{}
|
||||||
{path_suffixes}
|
{}
|
||||||
</intent-filter>"#,
|
</intent-filter>"#,
|
||||||
schemes = domain
|
domain
|
||||||
.scheme
|
.scheme
|
||||||
.iter()
|
.iter()
|
||||||
.map(|scheme| format!(r#"<data android:scheme="{scheme}" />"#))
|
.map(|scheme| format!(r#"<data android:scheme="{scheme}" />"#))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join("\n "),
|
.join("\n "),
|
||||||
host = host,
|
domain.host,
|
||||||
domains = domain
|
domain
|
||||||
.path
|
.path
|
||||||
.iter()
|
.iter()
|
||||||
.map(|path| format!(r#"<data android:path="{path}" />"#))
|
.map(|path| format!(r#"<data android:path="{path}" />"#))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join("\n "),
|
.join("\n "),
|
||||||
path_patterns = domain
|
domain
|
||||||
.path_pattern
|
.path_pattern
|
||||||
.iter()
|
.iter()
|
||||||
.map(|pattern| format!(r#"<data android:pathPattern="{pattern}" />"#))
|
.map(|pattern| format!(r#"<data android:pathPattern="{pattern}" />"#))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join("\n "),
|
.join("\n "),
|
||||||
path_prefixes = domain
|
domain
|
||||||
.path_prefix
|
.path_prefix
|
||||||
.iter()
|
.iter()
|
||||||
.map(|prefix| format!(r#"<data android:pathPrefix="{prefix}" />"#))
|
.map(|prefix| format!(r#"<data android:pathPrefix="{prefix}" />"#))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join("\n "),
|
.join("\n "),
|
||||||
path_suffixes = domain
|
domain
|
||||||
.path_suffix
|
.path_suffix
|
||||||
.iter()
|
.iter()
|
||||||
.map(|suffix| format!(r#"<data android:pathSuffix="{suffix}" />"#))
|
.map(|suffix| format!(r#"<data android:pathSuffix="{suffix}" />"#))
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join("\n "),
|
.join("\n "),
|
||||||
)
|
)
|
||||||
.trim()
|
|
||||||
.to_string()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
@@ -82,16 +68,6 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(config) = tauri_plugin::plugin_config::<Config>("deep-link") {
|
if let Some(config) = tauri_plugin::plugin_config::<Config>("deep-link") {
|
||||||
let errors: Vec<String> = config
|
|
||||||
.mobile
|
|
||||||
.iter()
|
|
||||||
.filter_map(|d| d.validate().err())
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
if !errors.is_empty() {
|
|
||||||
panic!("Deep link config validation failed:\n{}", errors.join("\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
tauri_plugin::mobile::update_android_manifest(
|
tauri_plugin::mobile::update_android_manifest(
|
||||||
"DEEP LINK PLUGIN",
|
"DEEP LINK PLUGIN",
|
||||||
"activity",
|
"activity",
|
||||||
@@ -104,89 +80,20 @@ fn main() {
|
|||||||
)
|
)
|
||||||
.expect("failed to rewrite AndroidManifest.xml");
|
.expect("failed to rewrite AndroidManifest.xml");
|
||||||
|
|
||||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
// we need to ensure that the entitlements are only
|
tauri_plugin::mobile::update_entitlements(|entitlements| {
|
||||||
// generated for explicit app links and not
|
entitlements.insert(
|
||||||
// other deep links because then they
|
"com.apple.developer.associated-domains".into(),
|
||||||
// are just going to complain and not be built or signed
|
config
|
||||||
let has_app_links = config.mobile.iter().any(|d| d.is_app_link());
|
.mobile
|
||||||
|
.into_iter()
|
||||||
if !has_app_links {
|
.map(|d| format!("applinks:{}", d.host).into())
|
||||||
tauri_plugin::mobile::update_entitlements(|entitlements| {
|
.collect::<Vec<_>>()
|
||||||
entitlements.remove("com.apple.developer.associated-domains");
|
.into(),
|
||||||
})
|
);
|
||||||
.expect("failed to update entitlements");
|
})
|
||||||
} else {
|
.expect("failed to update entitlements");
|
||||||
tauri_plugin::mobile::update_entitlements(|entitlements| {
|
|
||||||
entitlements.insert(
|
|
||||||
"com.apple.developer.associated-domains".into(),
|
|
||||||
config
|
|
||||||
.mobile
|
|
||||||
.iter()
|
|
||||||
.filter(|d| d.is_app_link())
|
|
||||||
.filter_map(|d| d.host.as_ref())
|
|
||||||
.map(|host| format!("applinks:{}", host).into())
|
|
||||||
.collect::<Vec<_>>()
|
|
||||||
.into(),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.expect("failed to update entitlements");
|
|
||||||
}
|
|
||||||
|
|
||||||
let deep_link_domains = config
|
|
||||||
.mobile
|
|
||||||
.iter()
|
|
||||||
.filter_map(|domain| {
|
|
||||||
if domain.is_app_link() {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
Some(domain)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
if deep_link_domains.is_empty() {
|
|
||||||
tauri_plugin::mobile::update_info_plist(|info_plist| {
|
|
||||||
info_plist.remove("CFBundleURLTypes");
|
|
||||||
})
|
|
||||||
.expect("failed to update Info.plist");
|
|
||||||
} else {
|
|
||||||
tauri_plugin::mobile::update_info_plist(|info_plist| {
|
|
||||||
info_plist.insert(
|
|
||||||
"CFBundleURLTypes".into(),
|
|
||||||
deep_link_domains
|
|
||||||
.iter()
|
|
||||||
.map(|domain| {
|
|
||||||
let schemes = domain
|
|
||||||
.scheme
|
|
||||||
.iter()
|
|
||||||
.filter(|scheme| {
|
|
||||||
scheme.as_str() != "https" && scheme.as_str() != "http"
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
let mut dict = plist::Dictionary::new();
|
|
||||||
dict.insert(
|
|
||||||
"CFBundleURLSchemes".into(),
|
|
||||||
schemes
|
|
||||||
.iter()
|
|
||||||
.map(|s| s.to_string().into())
|
|
||||||
.collect::<Vec<_>>()
|
|
||||||
.into(),
|
|
||||||
);
|
|
||||||
dict.insert(
|
|
||||||
"CFBundleURLName".into(),
|
|
||||||
format!("{}", domain.scheme[0]).into(),
|
|
||||||
);
|
|
||||||
plist::Value::Dictionary(dict)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>()
|
|
||||||
.into(),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.expect("failed to update Info.plist");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.2.5]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `deep-link-js@2.4.2`
|
|
||||||
|
|
||||||
## \[2.2.4]
|
## \[2.2.4]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "deep-link-example",
|
"name": "deep-link-example",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.2.5",
|
"version": "2.2.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -10,11 +10,11 @@
|
|||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.8.0",
|
"@tauri-apps/api": "2.7.0",
|
||||||
"@tauri-apps/plugin-deep-link": "2.4.2"
|
"@tauri-apps/plugin-deep-link": "2.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "2.8.2",
|
"@tauri-apps/cli": "2.7.1",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
"vite": "^7.0.4"
|
"vite": "^7.0.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ val tauriProperties = Properties().apply {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk = 36
|
compileSdk = 34
|
||||||
namespace = "com.tauri.deep_link_example"
|
namespace = "com.tauri.deep_link_example"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||||
applicationId = "com.tauri.deep_link_example"
|
applicationId = "com.tauri.deep_link_example"
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 36
|
targetSdk = 34
|
||||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||||
}
|
}
|
||||||
@@ -58,10 +58,9 @@ rust {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("androidx.webkit:webkit:1.14.0")
|
implementation("androidx.webkit:webkit:1.6.1")
|
||||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
implementation("androidx.activity:activity-ktx:1.10.1")
|
implementation("com.google.android.material:material:1.8.0")
|
||||||
implementation("com.google.android.material:material:1.12.0")
|
|
||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||||
|
|||||||
+4
-21
@@ -23,40 +23,23 @@
|
|||||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- DEEP LINK PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
<!-- DEEP LINK PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
||||||
<intent-filter android:autoVerify="true" >
|
<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<data android:scheme="https" />
|
|
||||||
<data android:scheme="http" />
|
<data android:scheme="http" />
|
||||||
|
<data android:scheme="https" />
|
||||||
<data android:host="fabianlars.de" />
|
<data android:host="fabianlars.de" />
|
||||||
|
|
||||||
|
|
||||||
<data android:pathPrefix="/intent" />
|
<data android:pathPrefix="/intent" />
|
||||||
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter android:autoVerify="true" >
|
<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<data android:scheme="https" />
|
|
||||||
<data android:scheme="http" />
|
<data android:scheme="http" />
|
||||||
|
<data android:scheme="https" />
|
||||||
<data android:host="tauri.app" />
|
<data android:host="tauri.app" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter >
|
|
||||||
<action android:name="android.intent.action.VIEW" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
|
||||||
<data android:scheme="taurideeplink" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- DEEP LINK PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
<!-- DEEP LINK PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
||||||
</activity>
|
</activity>
|
||||||
|
|||||||
+5
-9
@@ -1,11 +1,7 @@
|
|||||||
|
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
package com.tauri.deep_link_example
|
package com.tauri.deep_link_example
|
||||||
|
|
||||||
import android.os.Bundle
|
class MainActivity : TauriActivity()
|
||||||
import androidx.activity.enableEdgeToEdge
|
|
||||||
|
|
||||||
class MainActivity : TauriActivity() {
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
enableEdgeToEdge()
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools.build:gradle:8.11.0")
|
classpath("com.android.tools.build:gradle:8.5.1")
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(gradleApi())
|
compileOnly(gradleApi())
|
||||||
implementation("com.android.tools.build:gradle:8.11.0")
|
implementation("com.android.tools.build:gradle:8.5.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#Tue May 10 19:22:52 CST 2022
|
#Tue May 10 19:22:52 CST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
+77
-77
@@ -1,116 +1,116 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images": [
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-20x20@2x.png",
|
"filename": "AppIcon-20x20@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-20x20@3x.png",
|
"filename": "AppIcon-20x20@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-29x29@2x-1.png",
|
"filename": "AppIcon-29x29@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-29x29@3x.png",
|
"filename": "AppIcon-29x29@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-40x40@2x.png",
|
"filename": "AppIcon-40x40@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-40x40@3x.png",
|
"filename": "AppIcon-40x40@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size": "60x60",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-60x60@2x.png",
|
"filename": "AppIcon-60x60@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "60x60",
|
"size": "60x60",
|
||||||
"idiom" : "iphone",
|
"idiom": "iphone",
|
||||||
"filename" : "AppIcon-60x60@3x.png",
|
"filename": "AppIcon-60x60@3x.png",
|
||||||
"scale" : "3x"
|
"scale": "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-20x20@1x.png",
|
"filename": "AppIcon-20x20@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size": "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-20x20@2x-1.png",
|
"filename": "AppIcon-20x20@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-29x29@1x.png",
|
"filename": "AppIcon-29x29@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size": "29x29",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-29x29@2x.png",
|
"filename": "AppIcon-29x29@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-40x40@1x.png",
|
"filename": "AppIcon-40x40@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size": "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-40x40@2x-1.png",
|
"filename": "AppIcon-40x40@2x-1.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size": "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-76x76@1x.png",
|
"filename": "AppIcon-76x76@1x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size": "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-76x76@2x.png",
|
"filename": "AppIcon-76x76@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "83.5x83.5",
|
"size": "83.5x83.5",
|
||||||
"idiom" : "ipad",
|
"idiom": "ipad",
|
||||||
"filename" : "AppIcon-83.5x83.5@2x.png",
|
"filename": "AppIcon-83.5x83.5@2x.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "1024x1024",
|
"size": "1024x1024",
|
||||||
"idiom" : "ios-marketing",
|
"idiom": "ios-marketing",
|
||||||
"filename" : "AppIcon-512@2x.png",
|
"filename": "AppIcon-512@2x.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info": {
|
||||||
"version" : 1,
|
"version": 1,
|
||||||
"author" : "xcode"
|
"author": "xcode"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"info" : {
|
"info": {
|
||||||
"version" : 1,
|
"version": 1,
|
||||||
"author" : "xcode"
|
"author": "xcode"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17150" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17122"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17122"/>
|
||||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
|||||||
+34
-12
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 63;
|
objectVersion = 56;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -167,8 +167,6 @@
|
|||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
name = "deep-link-example_iOS";
|
name = "deep-link-example_iOS";
|
||||||
packageProductDependencies = (
|
|
||||||
);
|
|
||||||
productName = "deep-link-example_iOS";
|
productName = "deep-link-example_iOS";
|
||||||
productReference = 1CAAFA750FD735A285DC1238 /* deep-link-example.app */;
|
productReference = 1CAAFA750FD735A285DC1238 /* deep-link-example.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
@@ -191,7 +189,6 @@
|
|||||||
en,
|
en,
|
||||||
);
|
);
|
||||||
mainGroup = 1DC58B1705AA3ECC6B887FE7;
|
mainGroup = 1DC58B1705AA3ECC6B887FE7;
|
||||||
minimizedProjectReferenceProxies = 1;
|
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
@@ -230,6 +227,7 @@
|
|||||||
outputPaths = (
|
outputPaths = (
|
||||||
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
|
"$(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a",
|
||||||
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
|
"$(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a",
|
||||||
|
"$(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
@@ -316,13 +314,18 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
ARCHS = arm64;
|
ARCHS = (
|
||||||
|
arm64,
|
||||||
|
"arm64-sim",
|
||||||
|
);
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = "deep-link-example_iOS/deep-link-example_iOS.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "deep-link-example_iOS/deep-link-example_iOS.entitlements";
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
DEVELOPMENT_TEAM = "Q93MBH6S2F";
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
|
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\".\"",
|
"\".\"",
|
||||||
@@ -332,6 +335,13 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
|
||||||
|
"$(SDKROOT)/usr/lib/swift",
|
||||||
|
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||||
|
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||||
|
);
|
||||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
||||||
@@ -350,7 +360,7 @@
|
|||||||
PRODUCT_NAME = "deep-link-example";
|
PRODUCT_NAME = "deep-link-example";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALID_ARCHS = arm64;
|
VALID_ARCHS = "arm64 arm64-sim";
|
||||||
};
|
};
|
||||||
name = debug;
|
name = debug;
|
||||||
};
|
};
|
||||||
@@ -414,13 +424,18 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
ARCHS = arm64;
|
ARCHS = (
|
||||||
|
arm64,
|
||||||
|
"arm64-sim",
|
||||||
|
);
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = "deep-link-example_iOS/deep-link-example_iOS.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "deep-link-example_iOS/deep-link-example_iOS.entitlements";
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
DEVELOPMENT_TEAM = "Q93MBH6S2F";
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
DEVELOPMENT_TEAM = Q93MBH6S2F;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = x86_64;
|
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\".\"",
|
"\".\"",
|
||||||
@@ -430,6 +445,13 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
|
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
|
||||||
|
"$(SDKROOT)/usr/lib/swift",
|
||||||
|
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
|
||||||
|
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
|
||||||
|
);
|
||||||
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
|
||||||
@@ -448,7 +470,7 @@
|
|||||||
PRODUCT_NAME = "deep-link-example";
|
PRODUCT_NAME = "deep-link-example";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
VALID_ARCHS = arm64;
|
VALID_ARCHS = "arm64 arm64-sim";
|
||||||
};
|
};
|
||||||
name = release;
|
name = release;
|
||||||
};
|
};
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?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>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
+1
-12
@@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.1.0</string>
|
<string>0.0.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.1.0</string>
|
<string>0.1.0</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
@@ -40,16 +40,5 @@
|
|||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleURLTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>taurideeplink</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>taurideeplink</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
name: deep-link-example
|
name: deep-link-example
|
||||||
options:
|
options:
|
||||||
bundleIdPrefix: com.tauri.deep-link-example
|
bundleIdPrefix: com.tauri.deep-link-example
|
||||||
@@ -12,6 +16,7 @@ settingGroups:
|
|||||||
base:
|
base:
|
||||||
PRODUCT_NAME: deep-link-example
|
PRODUCT_NAME: deep-link-example
|
||||||
PRODUCT_BUNDLE_IDENTIFIER: com.tauri.deep-link-example
|
PRODUCT_BUNDLE_IDENTIFIER: com.tauri.deep-link-example
|
||||||
|
DEVELOPMENT_TEAM: Q93MBH6S2F
|
||||||
targetTemplates:
|
targetTemplates:
|
||||||
app:
|
app:
|
||||||
type: application
|
type: application
|
||||||
@@ -51,8 +56,8 @@ targets:
|
|||||||
- UIInterfaceOrientationPortraitUpsideDown
|
- UIInterfaceOrientationPortraitUpsideDown
|
||||||
- UIInterfaceOrientationLandscapeLeft
|
- UIInterfaceOrientationLandscapeLeft
|
||||||
- UIInterfaceOrientationLandscapeRight
|
- UIInterfaceOrientationLandscapeRight
|
||||||
CFBundleShortVersionString: 0.1.0
|
CFBundleShortVersionString: 0.0.0
|
||||||
CFBundleVersion: '0.1.0'
|
CFBundleVersion: 0.0.0
|
||||||
entitlements:
|
entitlements:
|
||||||
path: deep-link-example_iOS/deep-link-example_iOS.entitlements
|
path: deep-link-example_iOS/deep-link-example_iOS.entitlements
|
||||||
scheme:
|
scheme:
|
||||||
@@ -62,12 +67,14 @@ targets:
|
|||||||
settings:
|
settings:
|
||||||
base:
|
base:
|
||||||
ENABLE_BITCODE: false
|
ENABLE_BITCODE: false
|
||||||
ARCHS: [arm64]
|
ARCHS: [arm64, arm64-sim]
|
||||||
VALID_ARCHS: arm64
|
VALID_ARCHS: arm64 arm64-sim
|
||||||
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
LIBRARY_SEARCH_PATHS[arch=x86_64]: $(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||||
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
LIBRARY_SEARCH_PATHS[arch=arm64]: $(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||||
|
LIBRARY_SEARCH_PATHS[arch=arm64-sim]: $(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
|
||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: true
|
||||||
EXCLUDED_ARCHS[sdk=iphoneos*]: x86_64
|
EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64
|
||||||
|
EXCLUDED_ARCHS[sdk=iphoneos*]: arm64-sim x86_64
|
||||||
groups: [app]
|
groups: [app]
|
||||||
dependencies:
|
dependencies:
|
||||||
- framework: libapp.a
|
- framework: libapp.a
|
||||||
@@ -86,3 +93,4 @@ targets:
|
|||||||
outputFiles:
|
outputFiles:
|
||||||
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
|
- $(SRCROOT)/Externals/x86_64/${CONFIGURATION}/libapp.a
|
||||||
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
- $(SRCROOT)/Externals/arm64/${CONFIGURATION}/libapp.a
|
||||||
|
- $(SRCROOT)/Externals/arm64-sim/${CONFIGURATION}/libapp.a
|
||||||
|
|||||||
@@ -35,9 +35,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"host": "tauri.app"
|
"host": "tauri.app"
|
||||||
},
|
|
||||||
{
|
|
||||||
"scheme": ["taurideeplink"]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"desktop": {
|
"desktop": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-deep-link",
|
"name": "@tauri-apps/plugin-deep-link",
|
||||||
"version": "2.4.2",
|
"version": "2.4.1",
|
||||||
"description": "Set your Tauri application as the default handler for an URL",
|
"description": "Set your Tauri application as the default handler for an URL",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
@@ -25,9 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@tauri-apps/cli": "2.8.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,10 @@ use tauri_utils::config::DeepLinkProtocol;
|
|||||||
pub struct AssociatedDomain {
|
pub struct AssociatedDomain {
|
||||||
#[serde(default = "default_schemes")]
|
#[serde(default = "default_schemes")]
|
||||||
pub scheme: Vec<String>,
|
pub scheme: Vec<String>,
|
||||||
#[serde(default, deserialize_with = "deserialize_associated_host")]
|
|
||||||
pub host: Option<String>, // Optional custom uri schemes dont NEED a host (may have one still), but required for https/http schemes
|
#[serde(deserialize_with = "deserialize_associated_host")]
|
||||||
|
pub host: String,
|
||||||
|
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub path: Vec<String>,
|
pub path: Vec<String>,
|
||||||
#[serde(default, alias = "path-pattern", rename = "pathPattern")]
|
#[serde(default, alias = "path-pattern", rename = "pathPattern")]
|
||||||
@@ -21,41 +23,6 @@ pub struct AssociatedDomain {
|
|||||||
pub path_prefix: Vec<String>,
|
pub path_prefix: Vec<String>,
|
||||||
#[serde(default, alias = "path-suffix", rename = "pathSuffix")]
|
#[serde(default, alias = "path-suffix", rename = "pathSuffix")]
|
||||||
pub path_suffix: Vec<String>,
|
pub path_suffix: Vec<String>,
|
||||||
#[serde(default, alias = "app-link", rename = "appLink")]
|
|
||||||
pub app_link: Option<bool>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl AssociatedDomain {
|
|
||||||
/// Returns true if the domain uses http or https scheme.
|
|
||||||
pub fn is_web_link(&self) -> bool {
|
|
||||||
self.scheme.iter().any(|s| s == "https" || s == "http")
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the domain uses http or https scheme and has proper host configuration.
|
|
||||||
pub fn is_app_link(&self) -> bool {
|
|
||||||
self.app_link
|
|
||||||
.unwrap_or_else(|| self.is_web_link() && self.host.is_some())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn validate(&self) -> Result<(), String> {
|
|
||||||
// Rule 1: All web links require a host.
|
|
||||||
if self.is_web_link() && self.host.is_none() {
|
|
||||||
return Err("Web link requires a host".into());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rule 2: If it's an App Link, ensure http(s) and host.
|
|
||||||
if self.is_app_link() {
|
|
||||||
if !self.is_web_link() {
|
|
||||||
return Err("AppLink must be a valid web link (https/http + host)".into());
|
|
||||||
}
|
|
||||||
if self.scheme.iter().any(|s| s == "http") && !self.scheme.iter().any(|s| s == "https")
|
|
||||||
{
|
|
||||||
eprintln!("Warning: AppLink uses only 'http' — allowed on Android but not secure for production.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Consider removing this in v3
|
// TODO: Consider removing this in v3
|
||||||
@@ -63,19 +30,18 @@ fn default_schemes() -> Vec<String> {
|
|||||||
vec!["https".to_string(), "http".to_string()]
|
vec!["https".to_string(), "http".to_string()]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_associated_host<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
|
fn deserialize_associated_host<'de, D>(deserializer: D) -> Result<String, D::Error>
|
||||||
where
|
where
|
||||||
D: Deserializer<'de>,
|
D: Deserializer<'de>,
|
||||||
{
|
{
|
||||||
let opt = Option::<String>::deserialize(deserializer)?;
|
let host = String::deserialize(deserializer)?;
|
||||||
if let Some(ref host) = opt {
|
if let Some((scheme, _host)) = host.split_once("://") {
|
||||||
if let Some((scheme, _)) = host.split_once("://") {
|
Err(serde::de::Error::custom(format!(
|
||||||
return Err(serde::de::Error::custom(format!(
|
"host `{host}` cannot start with a scheme, please remove the `{scheme}://` prefix"
|
||||||
"host `{host}` cannot start with a scheme, please remove the `{scheme}://` prefix"
|
)))
|
||||||
)));
|
} else {
|
||||||
}
|
Ok(host)
|
||||||
}
|
}
|
||||||
Ok(opt)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Clone)]
|
#[derive(Deserialize, Clone)]
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ pub enum Error {
|
|||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
ParseIni(#[from] ini::ParseError),
|
ParseIni(#[from] ini::ParseError),
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
#[error("Failed to run OS command `{0}`: {1}")]
|
|
||||||
Execute(&'static str, #[source] std::io::Error),
|
|
||||||
#[cfg(mobile)]
|
#[cfg(mobile)]
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError),
|
PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError),
|
||||||
|
|||||||
@@ -254,7 +254,6 @@ mod imp {
|
|||||||
///
|
///
|
||||||
/// ## Platform-specific:
|
/// ## Platform-specific:
|
||||||
///
|
///
|
||||||
/// - **Linux**: Needs the `xdg-mime` and `update-desktop-database` commands available on the system.
|
|
||||||
/// - **macOS / Android / iOS**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
|
/// - **macOS / Android / iOS**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
|
||||||
pub fn register<S: AsRef<str>>(&self, _protocol: S) -> crate::Result<()> {
|
pub fn register<S: AsRef<str>>(&self, _protocol: S) -> crate::Result<()> {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
@@ -333,13 +332,11 @@ mod imp {
|
|||||||
|
|
||||||
Command::new("update-desktop-database")
|
Command::new("update-desktop-database")
|
||||||
.arg(target)
|
.arg(target)
|
||||||
.status()
|
.status()?;
|
||||||
.map_err(|error| crate::Error::Execute("update-desktop-database", error))?;
|
|
||||||
|
|
||||||
Command::new("xdg-mime")
|
Command::new("xdg-mime")
|
||||||
.args(["default", &file_name, mime_type.as_str()])
|
.args(["default", &file_name, mime_type.as_str()])
|
||||||
.status()
|
.status()?;
|
||||||
.map_err(|error| crate::Error::Execute("xdg-mime", error))?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -408,7 +405,6 @@ mod imp {
|
|||||||
///
|
///
|
||||||
/// ## Platform-specific:
|
/// ## Platform-specific:
|
||||||
///
|
///
|
||||||
/// - **Linux**: Needs the `xdg-mime` command available on the system.
|
|
||||||
/// - **macOS / Android / iOS**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
|
/// - **macOS / Android / iOS**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
|
||||||
pub fn is_registered<S: AsRef<str>>(&self, _protocol: S) -> crate::Result<bool> {
|
pub fn is_registered<S: AsRef<str>>(&self, _protocol: S) -> crate::Result<bool> {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
@@ -443,8 +439,7 @@ mod imp {
|
|||||||
"default",
|
"default",
|
||||||
&format!("x-scheme-handler/{}", _protocol.as_ref()),
|
&format!("x-scheme-handler/{}", _protocol.as_ref()),
|
||||||
])
|
])
|
||||||
.output()
|
.output()?;
|
||||||
.map_err(|error| crate::Error::Execute("xdg-mime", error))?;
|
|
||||||
|
|
||||||
Ok(String::from_utf8_lossy(&output.stdout).contains(&file_name))
|
Ok(String::from_utf8_lossy(&output.stdout).contains(&file_name))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.3.3]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `fs-js@2.4.2`
|
|
||||||
|
|
||||||
## \[2.3.2]
|
|
||||||
|
|
||||||
- [`af08c66f`](https://github.com/tauri-apps/plugins-workspace/commit/af08c66faafe0dffc4b0a80aef030cd3f0f89a9c) ([#2871](https://github.com/tauri-apps/plugins-workspace/pull/2871) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Fixed an issue that caused the file picker not to open on Android when extension filters were set.
|
|
||||||
|
|
||||||
## \[2.3.1]
|
## \[2.3.1]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-dialog"
|
name = "tauri-plugin-dialog"
|
||||||
version = "2.3.3"
|
version = "2.3.1"
|
||||||
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
@@ -34,7 +34,7 @@ tauri = { workspace = true }
|
|||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
tauri-plugin-fs = { path = "../fs", version = "2.4.2" }
|
tauri-plugin-fs = { path = "../fs", version = "2.4.1" }
|
||||||
|
|
||||||
[target.'cfg(target_os = "ios")'.dependencies]
|
[target.'cfg(target_os = "ios")'.dependencies]
|
||||||
tauri = { workspace = true, features = ["wry"] }
|
tauri = { workspace = true, features = ["wry"] }
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-dialog = { git = "https://github.com/tauri-apps/plugins-workspace",
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-dialog
|
pnpm add @tauri-apps/plugin-dialog
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-dialog
|
npm add @tauri-apps/plugin-dialog
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-dialog
|
yarn add @tauri-apps/plugin-dialog
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-dialog#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-dialog#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-dialog#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -56,18 +56,20 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
try {
|
try {
|
||||||
val args = invoke.parseArgs(FilePickerOptions::class.java)
|
val args = invoke.parseArgs(FilePickerOptions::class.java)
|
||||||
val parsedTypes = parseFiltersOption(args.filters)
|
val parsedTypes = parseFiltersOption(args.filters)
|
||||||
|
|
||||||
// TODO: ACTION_OPEN_DOCUMENT ??
|
val intent = if (parsedTypes.isNotEmpty()) {
|
||||||
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
val intent = Intent(Intent.ACTION_PICK)
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
setIntentMimeTypes(intent, parsedTypes)
|
||||||
intent.type = "*/*"
|
intent
|
||||||
|
} else {
|
||||||
if (parsedTypes.isNotEmpty()) {
|
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
||||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, parsedTypes)
|
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||||
|
intent.type = "*/*"
|
||||||
|
intent
|
||||||
}
|
}
|
||||||
|
|
||||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, args.multiple ?: false)
|
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, args.multiple ?: false)
|
||||||
|
|
||||||
startActivityForResult(invoke, intent, "filePickerResult")
|
startActivityForResult(invoke, intent, "filePickerResult")
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
val message = ex.message ?: "Failed to pick file"
|
val message = ex.message ?: "Failed to pick file"
|
||||||
@@ -113,7 +115,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
callResult.put("files", JSArray.from(uris.toTypedArray()))
|
callResult.put("files", JSArray.from(uris.toTypedArray()))
|
||||||
return callResult
|
return callResult
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseFiltersOption(filters: Array<Filter>): Array<String> {
|
private fun parseFiltersOption(filters: Array<Filter>): Array<String> {
|
||||||
val mimeTypes = mutableListOf<String>()
|
val mimeTypes = mutableListOf<String>()
|
||||||
for (filter in filters) {
|
for (filter in filters) {
|
||||||
@@ -130,10 +132,38 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
return mimeTypes.toTypedArray()
|
return mimeTypes.toTypedArray()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setIntentMimeTypes(intent: Intent, mimeTypes: Array<String>) {
|
||||||
|
if (mimeTypes.isNotEmpty()) {
|
||||||
|
var uniqueMimeKind = true
|
||||||
|
var mimeKind: String? = null
|
||||||
|
for (mime in mimeTypes) {
|
||||||
|
val kind = mime.split("/")[0]
|
||||||
|
if (mimeKind == null) {
|
||||||
|
mimeKind = kind
|
||||||
|
} else if (mimeKind != kind) {
|
||||||
|
uniqueMimeKind = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uniqueMimeKind) {
|
||||||
|
if (mimeTypes.size > 1) {
|
||||||
|
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes)
|
||||||
|
intent.type = Intent.normalizeMimeType("$mimeKind/*")
|
||||||
|
} else {
|
||||||
|
intent.type = mimeTypes[0]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
intent.type = "*/*"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
intent.type = "*/*"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
fun showMessageDialog(invoke: Invoke) {
|
fun showMessageDialog(invoke: Invoke) {
|
||||||
val args = invoke.parseArgs(MessageOptions::class.java)
|
val args = invoke.parseArgs(MessageOptions::class.java)
|
||||||
|
|
||||||
if (activity.isFinishing) {
|
if (activity.isFinishing) {
|
||||||
invoke.reject("App is finishing")
|
invoke.reject("App is finishing")
|
||||||
return
|
return
|
||||||
@@ -149,7 +179,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
Handler(Looper.getMainLooper())
|
Handler(Looper.getMainLooper())
|
||||||
.post {
|
.post {
|
||||||
val builder = AlertDialog.Builder(activity)
|
val builder = AlertDialog.Builder(activity)
|
||||||
|
|
||||||
if (args.title != null) {
|
if (args.title != null) {
|
||||||
builder.setTitle(args.title)
|
builder.setTitle(args.title)
|
||||||
}
|
}
|
||||||
@@ -183,14 +213,10 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
|||||||
val parsedTypes = parseFiltersOption(args.filters)
|
val parsedTypes = parseFiltersOption(args.filters)
|
||||||
|
|
||||||
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
|
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
|
||||||
|
setIntentMimeTypes(intent, parsedTypes)
|
||||||
|
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||||
intent.putExtra(Intent.EXTRA_TITLE, args.fileName ?: "")
|
intent.putExtra(Intent.EXTRA_TITLE, args.fileName ?: "")
|
||||||
intent.type = "*/*"
|
|
||||||
|
|
||||||
if (parsedTypes.isNotEmpty()) {
|
|
||||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, parsedTypes)
|
|
||||||
}
|
|
||||||
|
|
||||||
startActivityForResult(invoke, intent, "saveFileDialogResult")
|
startActivityForResult(invoke, intent, "saveFileDialogResult")
|
||||||
} catch (ex: Exception) {
|
} catch (ex: Exception) {
|
||||||
val message = ex.message ?: "Failed to pick save file"
|
val message = ex.message ?: "Failed to pick save file"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-dialog",
|
"name": "@tauri-apps/plugin-dialog",
|
||||||
"version": "2.3.3",
|
"version": "2.3.1",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.4.2]
|
|
||||||
|
|
||||||
- [`4eb36b0f`](https://github.com/tauri-apps/plugins-workspace/commit/4eb36b0ff57acb0bb1b911c583efa3bf2f56aa32) ([#2907](https://github.com/tauri-apps/plugins-workspace/pull/2907) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fixed calling `writeFile` with `data: ReadableStream` throws `Invalid argument`
|
|
||||||
- [`515182a1`](https://github.com/tauri-apps/plugins-workspace/commit/515182a179d4439079b2b7f6927555ba5ab0b035) ([#2915](https://github.com/tauri-apps/plugins-workspace/pull/2915) by [@samhinshaw](https://github.com/tauri-apps/plugins-workspace/../../samhinshaw)) `readFile` now returns a more specific type `Promise<Uint8Array<ArrayBuffer>>` instead of the default `Promise<Uint8Array<ArrayBufferLike>`
|
|
||||||
|
|
||||||
## \[2.4.1]
|
## \[2.4.1]
|
||||||
|
|
||||||
- [`44a1f659`](https://github.com/tauri-apps/plugins-workspace/commit/44a1f659125a341191420e650608b0b6ff316a0e) ([#2846](https://github.com/tauri-apps/plugins-workspace/pull/2846) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix `writeFile` doesn't create a new file by default when the data is a `ReadableStream`
|
- [`44a1f659`](https://github.com/tauri-apps/plugins-workspace/commit/44a1f659125a341191420e650608b0b6ff316a0e) ([#2846](https://github.com/tauri-apps/plugins-workspace/pull/2846) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix `writeFile` doesn't create a new file by default when the data is a `ReadableStream`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-fs"
|
name = "tauri-plugin-fs"
|
||||||
version = "2.4.2"
|
version = "2.4.1"
|
||||||
description = "Access the file system."
|
description = "Access the file system."
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
@@ -24,7 +24,7 @@ ios = { level = "partial", notes = "Access is restricted to Application folder b
|
|||||||
tauri-plugin = { workspace = true, features = ["build"] }
|
tauri-plugin = { workspace = true, features = ["build"] }
|
||||||
schemars = { workspace = true }
|
schemars = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
toml = "0.9"
|
toml = "0.8"
|
||||||
tauri-utils = { workspace = true, features = ["build"] }
|
tauri-utils = { workspace = true, features = ["build"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
@@ -41,7 +41,7 @@ notify = { version = "8", optional = true, features = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serialization-compat-6",
|
"serialization-compat-6",
|
||||||
] }
|
] }
|
||||||
notify-debouncer-full = { version = "0.6", optional = true }
|
notify-debouncer-full = { version = "0.5", optional = true }
|
||||||
dunce = { workspace = true }
|
dunce = { workspace = true }
|
||||||
percent-encoding = "2"
|
percent-encoding = "2"
|
||||||
|
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", bra
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-fs
|
pnpm add @tauri-apps/plugin-fs
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-fs
|
npm add @tauri-apps/plugin-fs
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-fs
|
yarn add @tauri-apps/plugin-fs
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-fs#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-fs#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-fs#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -739,7 +739,7 @@ interface ReadFileOptions {
|
|||||||
async function readFile(
|
async function readFile(
|
||||||
path: string | URL,
|
path: string | URL,
|
||||||
options?: ReadFileOptions
|
options?: ReadFileOptions
|
||||||
): Promise<Uint8Array<ArrayBuffer>> {
|
): Promise<Uint8Array> {
|
||||||
if (path instanceof URL && path.protocol !== 'file:') {
|
if (path instanceof URL && path.protocol !== 'file:') {
|
||||||
throw new TypeError('Must be a file URL.')
|
throw new TypeError('Must be a file URL.')
|
||||||
}
|
}
|
||||||
@@ -1074,12 +1074,7 @@ async function writeFile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data instanceof ReadableStream) {
|
if (data instanceof ReadableStream) {
|
||||||
const file = await open(path, {
|
const file = await open(path, { create: true, ...options })
|
||||||
read: false,
|
|
||||||
create: true,
|
|
||||||
write: true,
|
|
||||||
...options
|
|
||||||
})
|
|
||||||
const reader = data.getReader()
|
const reader = data.getReader()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-fs",
|
"name": "@tauri-apps/plugin-fs",
|
||||||
"version": "2.4.2",
|
"version": "2.4.1",
|
||||||
"description": "Access the file system.",
|
"description": "Access the file system.",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ tauri-plugin-geolocation = { git = "https://github.com/tauri-apps/plugins-worksp
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
<!-- Add the branch for installations using git! -->
|
<!-- Add the branch for installations using git! -->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -41,6 +43,13 @@ pnpm add @tauri-apps/plugin-geolocation
|
|||||||
npm add @tauri-apps/plugin-geolocation
|
npm add @tauri-apps/plugin-geolocation
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-geolocation
|
yarn add @tauri-apps/plugin-geolocation
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-geolocation#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-geolocation#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-geolocation#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting up
|
## Setting up
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,21 @@ tauri-plugin-global-shortcut = { git = "https://github.com/tauri-apps/plugins-wo
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-global-shortcut
|
pnpm add @tauri-apps/plugin-global-shortcut
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-global-shortcut
|
npm add @tauri-apps/plugin-global-shortcut
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-global-shortcut
|
yarn add @tauri-apps/plugin-global-shortcut
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ tauri-plugin-haptics = { git = "https://github.com/tauri-apps/plugins-workspace"
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
<!-- Add the branch for installations using git! -->
|
<!-- Add the branch for installations using git! -->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -43,6 +45,13 @@ pnpm add @tauri-apps/plugin-haptics
|
|||||||
npm add @tauri-apps/plugin-haptics
|
npm add @tauri-apps/plugin-haptics
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-haptics
|
yarn add @tauri-apps/plugin-haptics
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-haptics#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-haptics#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-haptics#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.5.2]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `fs-js@2.4.2`
|
|
||||||
|
|
||||||
## \[2.5.1]
|
## \[2.5.1]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-http"
|
name = "tauri-plugin-http"
|
||||||
version = "2.5.2"
|
version = "2.5.1"
|
||||||
description = "Access an HTTP client written in Rust."
|
description = "Access an HTTP client written in Rust."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
@@ -34,7 +34,7 @@ serde_json = { workspace = true }
|
|||||||
tauri = { workspace = true }
|
tauri = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
tokio = { version = "1", features = ["sync", "macros"] }
|
tokio = { version = "1", features = ["sync", "macros"] }
|
||||||
tauri-plugin-fs = { path = "../fs", version = "2.4.2" }
|
tauri-plugin-fs = { path = "../fs", version = "2.4.1" }
|
||||||
urlpattern = "0.3"
|
urlpattern = "0.3"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
http = "1"
|
http = "1"
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", b
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-http
|
pnpm add @tauri-apps/plugin-http
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-http
|
npm add @tauri-apps/plugin-http
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-http
|
yarn add @tauri-apps/plugin-http
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-http#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-http#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-http#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-http",
|
"name": "@tauri-apps/plugin-http",
|
||||||
"version": "2.5.2",
|
"version": "2.5.1",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,21 @@ If you want the single instance mechanism to only trigger for semver compatible
|
|||||||
|
|
||||||
Then you can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
Then you can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-log
|
pnpm add @tauri-apps/plugin-log
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-log
|
npm add @tauri-apps/plugin-log
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-log
|
yarn add @tauri-apps/plugin-log
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-log#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-log#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-log#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.3.1]
|
|
||||||
|
|
||||||
- [`fe23a5e0`](https://github.com/tauri-apps/plugins-workspace/commit/fe23a5e01399a6ad61426bf8a94a6bb97227cf88) ([#2885](https://github.com/tauri-apps/plugins-workspace/pull/2885) by [@zaphim12](https://github.com/tauri-apps/plugins-workspace/../../zaphim12)) On iOS, the reader session will now get closed properly on errors, preventing dangling invalid sessions that could prevent subsequent write attempts.
|
|
||||||
|
|
||||||
## \[2.3.0]
|
## \[2.3.0]
|
||||||
|
|
||||||
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-nfc"
|
name = "tauri-plugin-nfc"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
description = "Read and write NFC tags on Android and iOS."
|
description = "Read and write NFC tags on Android and iOS."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ tauri-plugin-nfc = { git = "https://github.com/tauri-apps/plugins-workspace", br
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
<!-- Add the branch for installations using git! -->
|
<!-- Add the branch for installations using git! -->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -41,6 +43,13 @@ pnpm add @tauri-apps/plugin-nfc
|
|||||||
npm add @tauri-apps/plugin-nfc
|
npm add @tauri-apps/plugin-nfc
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-nfc
|
yarn add @tauri-apps/plugin-nfc
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-nfc#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-nfc#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-nfc#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ class NfcPlugin: Plugin, NFCTagReaderSessionDelegate, NFCNDEFReaderSessionDelega
|
|||||||
func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error) {
|
func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error) {
|
||||||
Logger.error("Tag reader session error \(error)")
|
Logger.error("Tag reader session error \(error)")
|
||||||
self.session?.invoke.reject("session invalidated with error: \(error)")
|
self.session?.invoke.reject("session invalidated with error: \(error)")
|
||||||
self.session = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) {
|
func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) {
|
||||||
@@ -201,7 +200,6 @@ class NfcPlugin: Plugin, NFCTagReaderSessionDelegate, NFCNDEFReaderSessionDelega
|
|||||||
} else {
|
} else {
|
||||||
Logger.error("NDEF reader session error \(error)")
|
Logger.error("NDEF reader session error \(error)")
|
||||||
self.session?.invoke.reject("session invalidated with error: \(error)")
|
self.session?.invoke.reject("session invalidated with error: \(error)")
|
||||||
self.session = nil
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-nfc",
|
"name": "@tauri-apps/plugin-nfc",
|
||||||
"version": "2.3.1",
|
"version": "2.3.0",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.3.1]
|
|
||||||
|
|
||||||
- [`8abb31ee`](https://github.com/tauri-apps/plugins-workspace/commit/8abb31ee59c68197102c0aa699d690b34646ec3c) ([#2905](https://github.com/tauri-apps/plugins-workspace/pull/2905) by [@ChristianPavilonis](https://github.com/tauri-apps/plugins-workspace/../../ChristianPavilonis)) Fix notification scheduling on iOS.
|
|
||||||
- [`2d03e2ea`](https://github.com/tauri-apps/plugins-workspace/commit/2d03e2eac2c19ad997d81d23836ab6a219252ffb) ([#2678](https://github.com/tauri-apps/plugins-workspace/pull/2678) by [@Keerthi421](https://github.com/tauri-apps/plugins-workspace/../../Keerthi421)) Added sound support for desktop notifications which was previously only available on mobile platforms.
|
|
||||||
|
|
||||||
## \[2.3.0]
|
## \[2.3.0]
|
||||||
|
|
||||||
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-notification"
|
name = "tauri-plugin-notification"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
description = "Send desktop and mobile notifications on your Tauri application."
|
description = "Send desktop and mobile notifications on your Tauri application."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
@@ -30,7 +30,7 @@ serde_json = { workspace = true }
|
|||||||
tauri = { workspace = true }
|
tauri = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
rand = "0.9"
|
rand = "0.8"
|
||||||
time = { version = "0.3", features = ["serde", "parsing", "formatting"] }
|
time = { version = "0.3", features = ["serde", "parsing", "formatting"] }
|
||||||
url = { version = "2", features = ["serde"] }
|
url = { version = "2", features = ["serde"] }
|
||||||
serde_repr = "0.1"
|
serde_repr = "0.1"
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-notification = { git = "https://github.com/tauri-apps/plugins-works
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-notification
|
pnpm add @tauri-apps/plugin-notification
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-notification
|
npm add @tauri-apps/plugin-notification
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-notification
|
yarn add @tauri-apps/plugin-notification
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-notification#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-notification#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-notification#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -95,45 +104,6 @@ export async function enqueueNotification(title, body) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Notification with Sound
|
|
||||||
|
|
||||||
You can add sound to your notifications on all platforms (desktop and mobile):
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
import { sendNotification } from '@tauri-apps/plugin-notification'
|
|
||||||
import { platform } from '@tauri-apps/api/os'
|
|
||||||
|
|
||||||
// Basic notification with sound
|
|
||||||
sendNotification({
|
|
||||||
title: 'New Message',
|
|
||||||
body: 'You have a new message',
|
|
||||||
sound: 'notification.wav' // Path to sound file
|
|
||||||
})
|
|
||||||
|
|
||||||
// Platform-specific sounds
|
|
||||||
async function sendPlatformSpecificNotification() {
|
|
||||||
const platformName = platform()
|
|
||||||
|
|
||||||
let soundPath
|
|
||||||
if (platformName === 'darwin') {
|
|
||||||
// On macOS: use system sounds or sound files in the app bundle
|
|
||||||
soundPath = 'Ping' // macOS system sound
|
|
||||||
} else if (platformName === 'linux') {
|
|
||||||
// On Linux: use XDG theme sounds or file paths
|
|
||||||
soundPath = 'message-new-instant' // XDG theme sound
|
|
||||||
} else {
|
|
||||||
// On Windows: use file paths
|
|
||||||
soundPath = 'notification.wav'
|
|
||||||
}
|
|
||||||
|
|
||||||
sendNotification({
|
|
||||||
title: 'Platform-specific Notification',
|
|
||||||
body: 'This notification uses platform-specific sound',
|
|
||||||
sound: soundPath
|
|
||||||
})
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
|
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
|
||||||
|
|||||||
@@ -71,13 +71,7 @@ interface Options {
|
|||||||
*/
|
*/
|
||||||
groupSummary?: boolean
|
groupSummary?: boolean
|
||||||
/**
|
/**
|
||||||
* The sound resource name or file path for the notification.
|
* The sound resource name. Only available on mobile.
|
||||||
*
|
|
||||||
* Platform specific behavior:
|
|
||||||
* - On macOS: use system sounds (e.g., "Ping", "Blow") or sound files in the app bundle
|
|
||||||
* - On Linux: use XDG theme sounds (e.g., "message-new-instant") or file paths
|
|
||||||
* - On Windows: use file paths to sound files (.wav format)
|
|
||||||
* - On Mobile: use resource names
|
|
||||||
*/
|
*/
|
||||||
sound?: string
|
sound?: string
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -38,17 +38,10 @@ func makeNotificationContent(_ notification: Notification) throws -> UNNotificat
|
|||||||
arguments: nil)
|
arguments: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
var userInfo: [String: Any] = [:]
|
content.userInfo = [
|
||||||
|
"__EXTRA__": notification.extra as Any,
|
||||||
if let extra = notification.extra {
|
"__SCHEDULE__": notification.schedule as Any,
|
||||||
userInfo["__EXTRA__"] = extra
|
]
|
||||||
}
|
|
||||||
|
|
||||||
if let schedule = notification.schedule {
|
|
||||||
userInfo["__SCHEDULE__"] = scheduleToDictionary(schedule)
|
|
||||||
}
|
|
||||||
|
|
||||||
content.userInfo = userInfo
|
|
||||||
|
|
||||||
if let actionTypeId = notification.actionTypeId {
|
if let actionTypeId = notification.actionTypeId {
|
||||||
content.categoryIdentifier = actionTypeId
|
content.categoryIdentifier = actionTypeId
|
||||||
@@ -73,56 +66,6 @@ func makeNotificationContent(_ notification: Notification) throws -> UNNotificat
|
|||||||
return content
|
return content
|
||||||
}
|
}
|
||||||
|
|
||||||
func scheduleToDictionary(_ schedule: NotificationSchedule) -> [String: Any] {
|
|
||||||
switch schedule {
|
|
||||||
case .at(let date, let repeating):
|
|
||||||
return [
|
|
||||||
"type": "at",
|
|
||||||
"date": date,
|
|
||||||
"repeating": repeating
|
|
||||||
]
|
|
||||||
case .interval(let interval):
|
|
||||||
return [
|
|
||||||
"type": "interval",
|
|
||||||
"interval": scheduleIntervalToDictionary(interval)
|
|
||||||
]
|
|
||||||
case .every(let interval, let count):
|
|
||||||
return [
|
|
||||||
"type": "every",
|
|
||||||
"interval": interval.rawValue,
|
|
||||||
"count": count
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func scheduleIntervalToDictionary(_ interval: ScheduleInterval) -> [String: Any] {
|
|
||||||
var dict: [String: Any] = [:]
|
|
||||||
|
|
||||||
if let year = interval.year {
|
|
||||||
dict["year"] = year
|
|
||||||
}
|
|
||||||
if let month = interval.month {
|
|
||||||
dict["month"] = month
|
|
||||||
}
|
|
||||||
if let day = interval.day {
|
|
||||||
dict["day"] = day
|
|
||||||
}
|
|
||||||
if let weekday = interval.weekday {
|
|
||||||
dict["weekday"] = weekday
|
|
||||||
}
|
|
||||||
if let hour = interval.hour {
|
|
||||||
dict["hour"] = hour
|
|
||||||
}
|
|
||||||
if let minute = interval.minute {
|
|
||||||
dict["minute"] = minute
|
|
||||||
}
|
|
||||||
if let second = interval.second {
|
|
||||||
dict["second"] = second
|
|
||||||
}
|
|
||||||
|
|
||||||
return dict
|
|
||||||
}
|
|
||||||
|
|
||||||
func makeAttachments(_ attachments: [NotificationAttachment]) throws -> [UNNotificationAttachment] {
|
func makeAttachments(_ attachments: [NotificationAttachment]) throws -> [UNNotificationAttachment] {
|
||||||
var createdAttachments = [UNNotificationAttachment]()
|
var createdAttachments = [UNNotificationAttachment]()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-notification",
|
"name": "@tauri-apps/plugin-notification",
|
||||||
"version": "2.3.1",
|
"version": "2.3.0",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ impl<R: Runtime> crate::NotificationBuilder<R> {
|
|||||||
if let Some(icon) = self.data.icon {
|
if let Some(icon) = self.data.icon {
|
||||||
notification = notification.icon(icon);
|
notification = notification.icon(icon);
|
||||||
}
|
}
|
||||||
if let Some(sound) = self.data.sound {
|
|
||||||
notification = notification.sound(sound);
|
|
||||||
}
|
|
||||||
#[cfg(feature = "windows7-compat")]
|
#[cfg(feature = "windows7-compat")]
|
||||||
{
|
{
|
||||||
notification.notify(&self.app)?;
|
notification.notify(&self.app)?;
|
||||||
@@ -105,8 +102,6 @@ mod imp {
|
|||||||
title: Option<String>,
|
title: Option<String>,
|
||||||
/// The notification icon.
|
/// The notification icon.
|
||||||
icon: Option<String>,
|
icon: Option<String>,
|
||||||
/// The notification sound.
|
|
||||||
sound: Option<String>,
|
|
||||||
/// The notification identifier
|
/// The notification identifier
|
||||||
identifier: String,
|
identifier: String,
|
||||||
}
|
}
|
||||||
@@ -141,13 +136,6 @@ mod imp {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the notification sound file.
|
|
||||||
#[must_use]
|
|
||||||
pub fn sound(mut self, sound: impl Into<String>) -> Self {
|
|
||||||
self.sound = Some(sound.into());
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Shows the notification.
|
/// Shows the notification.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
@@ -189,9 +177,6 @@ mod imp {
|
|||||||
} else {
|
} else {
|
||||||
notification.auto_icon();
|
notification.auto_icon();
|
||||||
}
|
}
|
||||||
if let Some(sound) = self.sound {
|
|
||||||
notification.sound_name(&sound);
|
|
||||||
}
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
{
|
{
|
||||||
let exe = tauri::utils::platform::current_exe()?;
|
let exe = tauri::utils::platform::current_exe()?;
|
||||||
@@ -265,7 +250,6 @@ mod imp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shows the notification on Windows 7.
|
|
||||||
#[cfg(all(windows, feature = "windows7-compat"))]
|
#[cfg(all(windows, feature = "windows7-compat"))]
|
||||||
fn notify_win7<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
|
fn notify_win7<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
|
||||||
let app_ = app.clone();
|
let app_ = app.clone();
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ impl<R: Runtime> NotificationBuilder<R> {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The sound resource name for the notification.
|
/// The sound resource name. Only available on mobile.
|
||||||
pub fn sound(mut self, sound: impl Into<String>) -> Self {
|
pub fn sound(mut self, sound: impl Into<String>) -> Self {
|
||||||
self.data.sound.replace(sound.into());
|
self.data.sound.replace(sound.into());
|
||||||
self
|
self
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.5.0]
|
|
||||||
|
|
||||||
### enhance
|
|
||||||
|
|
||||||
- [`b8056f48`](https://github.com/tauri-apps/plugins-workspace/commit/b8056f484c7144af095d4d6ded1e8adbb9b8a865) ([#2897](https://github.com/tauri-apps/plugins-workspace/pull/2897) by [@petersamokhin](https://github.com/tauri-apps/plugins-workspace/../../petersamokhin)) Allow reveal multiple items in the file explorer.
|
|
||||||
|
|
||||||
## \[2.4.0]
|
## \[2.4.0]
|
||||||
|
|
||||||
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-opener"
|
name = "tauri-plugin-opener"
|
||||||
version = "2.5.0"
|
version = "2.4.0"
|
||||||
description = "Open files and URLs using their default application."
|
description = "Open files and URLs using their default application."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
@@ -35,6 +35,8 @@ tauri = { workspace = true }
|
|||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
open = { version = "5", features = ["shellexecute-on-windows"] }
|
open = { version = "5", features = ["shellexecute-on-windows"] }
|
||||||
glob = { workspace = true }
|
glob = { workspace = true }
|
||||||
|
|
||||||
|
[target."cfg(windows)".dependencies]
|
||||||
dunce = { workspace = true }
|
dunce = { workspace = true }
|
||||||
|
|
||||||
[target."cfg(windows)".dependencies.windows]
|
[target."cfg(windows)".dependencies.windows]
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ tauri-plugin-opener = { git = "https://github.com/tauri-apps/plugins-workspace",
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
<!-- Add the branch for installations using git! -->
|
<!-- Add the branch for installations using git! -->
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -41,6 +43,13 @@ pnpm add @tauri-apps/plugin-opener
|
|||||||
npm add @tauri-apps/plugin-opener
|
npm add @tauri-apps/plugin-opener
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-opener
|
yarn add @tauri-apps/plugin-opener
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-opener#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-opener#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-opener#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -75,10 +84,6 @@ await openPath('/path/to/file', 'firefox')
|
|||||||
|
|
||||||
// Reveal a path with the system's default explorer
|
// Reveal a path with the system's default explorer
|
||||||
await revealItemInDir('/path/to/file')
|
await revealItemInDir('/path/to/file')
|
||||||
|
|
||||||
// Reveal multiple paths with the system's default explorer
|
|
||||||
// Note: will be renamed to `revealItemsInDir` in the next major version
|
|
||||||
await revealItemInDir(['/path/to/file', '/path/to/another/file'])
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage from Rust
|
### Usage from Rust
|
||||||
@@ -106,9 +111,6 @@ fn main() {
|
|||||||
|
|
||||||
// Reveal a path with the system's default explorer
|
// Reveal a path with the system's default explorer
|
||||||
opener.reveal_item_in_dir("/path/to/file")?;
|
opener.reveal_item_in_dir("/path/to/file")?;
|
||||||
|
|
||||||
// Reveal multiple paths with the system's default explorer
|
|
||||||
opener.reveal_items_in_dir(["/path/to/file"])?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
if("__TAURI__"in window){var __TAURI_PLUGIN_OPENER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}return"function"==typeof SuppressedError&&SuppressedError,n.openPath=async function(n,r){await e("plugin:opener|open_path",{path:n,with:r})},n.openUrl=async function(n,r){await e("plugin:opener|open_url",{url:n,with:r})},n.revealItemInDir=async function(n){return e("plugin:opener|reveal_item_in_dir",{paths:"string"==typeof n?[n]:n})},n}({});Object.defineProperty(window.__TAURI__,"opener",{value:__TAURI_PLUGIN_OPENER__})}
|
if("__TAURI__"in window){var __TAURI_PLUGIN_OPENER__=function(n){"use strict";async function e(n,e={},_){return window.__TAURI_INTERNALS__.invoke(n,e,_)}return"function"==typeof SuppressedError&&SuppressedError,n.openPath=async function(n,_){await e("plugin:opener|open_path",{path:n,with:_})},n.openUrl=async function(n,_){await e("plugin:opener|open_url",{url:n,with:_})},n.revealItemInDir=async function(n){return e("plugin:opener|reveal_item_in_dir",{path:n})},n}({});Object.defineProperty(window.__TAURI__,"opener",{value:__TAURI_PLUGIN_OPENER__})}
|
||||||
|
|||||||
@@ -86,14 +86,12 @@ export async function openPath(path: string, openWith?: string): Promise<void> {
|
|||||||
* ```typescript
|
* ```typescript
|
||||||
* import { revealItemInDir } from '@tauri-apps/plugin-opener';
|
* import { revealItemInDir } from '@tauri-apps/plugin-opener';
|
||||||
* await revealItemInDir('/path/to/file');
|
* await revealItemInDir('/path/to/file');
|
||||||
* await revealItemInDir([ '/path/to/file', '/path/to/another/file' ]);
|
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param path The path to reveal.
|
* @param path The path to reveal.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
export async function revealItemInDir(path: string | string[]): Promise<void> {
|
export async function revealItemInDir(path: string) {
|
||||||
const paths = typeof path === 'string' ? [path] : path
|
return invoke('plugin:opener|reveal_item_in_dir', { path })
|
||||||
return invoke('plugin:opener|reveal_item_in_dir', { paths })
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-opener",
|
"name": "@tauri-apps/plugin-opener",
|
||||||
"version": "2.5.0",
|
"version": "2.4.0",
|
||||||
"description": "Open files and URLs using their default application.",
|
"description": "Open files and URLs using their default application.",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
@@ -25,6 +25,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ pub async fn open_path<R: Runtime>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: in the next major version, rename to `reveal_items_in_dir`
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub async fn reveal_item_in_dir(paths: Vec<PathBuf>) -> crate::Result<()> {
|
pub async fn reveal_item_in_dir(path: PathBuf) -> crate::Result<()> {
|
||||||
crate::reveal_items_in_dir(&paths)
|
crate::reveal_item_in_dir(path)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ pub enum Error {
|
|||||||
Win32Error(#[from] windows::core::Error),
|
Win32Error(#[from] windows::core::Error),
|
||||||
#[error("Path doesn't have a parent: {0}")]
|
#[error("Path doesn't have a parent: {0}")]
|
||||||
NoParent(PathBuf),
|
NoParent(PathBuf),
|
||||||
#[cfg(windows)]
|
|
||||||
#[error("Failed to convert path '{0}' to ITEMIDLIST")]
|
|
||||||
FailedToConvertPathToItemIdList(PathBuf),
|
|
||||||
#[error("Failed to convert path to file:// url")]
|
#[error("Failed to convert path to file:// url")]
|
||||||
FailedToConvertPathToFileUrl,
|
FailedToConvertPathToFileUrl,
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ pub use error::Error;
|
|||||||
type Result<T> = std::result::Result<T, Error>;
|
type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
||||||
pub use open::{open_path, open_url};
|
pub use open::{open_path, open_url};
|
||||||
pub use reveal_item_in_dir::{reveal_item_in_dir, reveal_items_in_dir};
|
pub use reveal_item_in_dir::reveal_item_in_dir;
|
||||||
|
|
||||||
pub struct Opener<R: Runtime> {
|
pub struct Opener<R: Runtime> {
|
||||||
// we use `fn() -> R` to silence the unused generic error
|
// we use `fn() -> R` to silence the unused generic error
|
||||||
@@ -146,15 +146,7 @@ impl<R: Runtime> Opener<R> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn reveal_item_in_dir<P: AsRef<Path>>(&self, p: P) -> Result<()> {
|
pub fn reveal_item_in_dir<P: AsRef<Path>>(&self, p: P) -> Result<()> {
|
||||||
reveal_item_in_dir(p)
|
crate::reveal_item_in_dir::reveal_item_in_dir(p)
|
||||||
}
|
|
||||||
|
|
||||||
pub fn reveal_items_in_dir<I, P>(&self, paths: I) -> Result<()>
|
|
||||||
where
|
|
||||||
I: IntoIterator<Item = P>,
|
|
||||||
P: AsRef<Path>,
|
|
||||||
{
|
|
||||||
reveal_items_in_dir(paths)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +213,7 @@ impl Builder {
|
|||||||
.invoke_handler(tauri::generate_handler![
|
.invoke_handler(tauri::generate_handler![
|
||||||
commands::open_url,
|
commands::open_url,
|
||||||
commands::open_path,
|
commands::open_path,
|
||||||
commands::reveal_item_in_dir,
|
commands::reveal_item_in_dir
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if self.open_js_links_on_click {
|
if self.open_js_links_on_click {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use std::path::Path;
|
|||||||
///
|
///
|
||||||
/// - **Android / iOS:** Unsupported.
|
/// - **Android / iOS:** Unsupported.
|
||||||
pub fn reveal_item_in_dir<P: AsRef<Path>>(path: P) -> crate::Result<()> {
|
pub fn reveal_item_in_dir<P: AsRef<Path>>(path: P) -> crate::Result<()> {
|
||||||
let path = dunce::canonicalize(path.as_ref())?;
|
let path = path.as_ref().canonicalize()?;
|
||||||
|
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
windows,
|
windows,
|
||||||
@@ -21,47 +21,7 @@ pub fn reveal_item_in_dir<P: AsRef<Path>>(path: P) -> crate::Result<()> {
|
|||||||
target_os = "netbsd",
|
target_os = "netbsd",
|
||||||
target_os = "openbsd"
|
target_os = "openbsd"
|
||||||
))]
|
))]
|
||||||
return imp::reveal_items_in_dir(&[path]);
|
return imp::reveal_item_in_dir(&path);
|
||||||
|
|
||||||
#[cfg(not(any(
|
|
||||||
windows,
|
|
||||||
target_os = "macos",
|
|
||||||
target_os = "linux",
|
|
||||||
target_os = "dragonfly",
|
|
||||||
target_os = "freebsd",
|
|
||||||
target_os = "netbsd",
|
|
||||||
target_os = "openbsd"
|
|
||||||
)))]
|
|
||||||
Err(crate::Error::UnsupportedPlatform)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Reveal the paths the system's default explorer.
|
|
||||||
///
|
|
||||||
/// ## Platform-specific:
|
|
||||||
///
|
|
||||||
/// - **Android / iOS:** Unsupported.
|
|
||||||
pub fn reveal_items_in_dir<I, P>(paths: I) -> crate::Result<()>
|
|
||||||
where
|
|
||||||
I: IntoIterator<Item = P>,
|
|
||||||
P: AsRef<Path>,
|
|
||||||
{
|
|
||||||
let mut canonicalized = vec![];
|
|
||||||
|
|
||||||
for path in paths {
|
|
||||||
let path = dunce::canonicalize(path.as_ref())?;
|
|
||||||
canonicalized.push(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(
|
|
||||||
windows,
|
|
||||||
target_os = "macos",
|
|
||||||
target_os = "linux",
|
|
||||||
target_os = "dragonfly",
|
|
||||||
target_os = "freebsd",
|
|
||||||
target_os = "netbsd",
|
|
||||||
target_os = "openbsd"
|
|
||||||
))]
|
|
||||||
return imp::reveal_items_in_dir(&canonicalized);
|
|
||||||
|
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
windows,
|
windows,
|
||||||
@@ -77,10 +37,8 @@ where
|
|||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
mod imp {
|
mod imp {
|
||||||
use std::collections::HashMap;
|
use super::*;
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
use windows::Win32::UI::Shell::Common::ITEMIDLIST;
|
|
||||||
use windows::{
|
use windows::{
|
||||||
core::{w, HSTRING, PCWSTR},
|
core::{w, HSTRING, PCWSTR},
|
||||||
Win32::{
|
Win32::{
|
||||||
@@ -96,98 +54,57 @@ mod imp {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn reveal_items_in_dir(paths: &[PathBuf]) -> crate::Result<()> {
|
pub fn reveal_item_in_dir(path: &Path) -> crate::Result<()> {
|
||||||
if paths.is_empty() {
|
let file = dunce::simplified(path);
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut grouped_paths: HashMap<&Path, Vec<&Path>> = HashMap::new();
|
|
||||||
for path in paths {
|
|
||||||
let parent = path
|
|
||||||
.parent()
|
|
||||||
.ok_or_else(|| crate::Error::NoParent(path.to_path_buf()))?;
|
|
||||||
grouped_paths.entry(parent).or_default().push(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
let _ = unsafe { CoInitialize(None) };
|
let _ = unsafe { CoInitialize(None) };
|
||||||
|
|
||||||
for (parent, to_reveals) in grouped_paths {
|
let dir = file
|
||||||
let parent_item_id_list = OwnedItemIdList::new(parent)?;
|
.parent()
|
||||||
let to_reveals_item_id_list = to_reveals
|
.ok_or_else(|| crate::Error::NoParent(file.to_path_buf()))?;
|
||||||
.iter()
|
|
||||||
.map(|to_reveal| OwnedItemIdList::new(*to_reveal))
|
let dir = HSTRING::from(dir);
|
||||||
.collect::<crate::Result<Vec<_>>>()?;
|
let dir_item = unsafe { ILCreateFromPathW(&dir) };
|
||||||
if let Err(e) = unsafe {
|
|
||||||
SHOpenFolderAndSelectItems(
|
let file_h = HSTRING::from(file);
|
||||||
parent_item_id_list.item,
|
let file_item = unsafe { ILCreateFromPathW(&file_h) };
|
||||||
Some(
|
|
||||||
&to_reveals_item_id_list
|
unsafe {
|
||||||
.iter()
|
if let Err(e) = SHOpenFolderAndSelectItems(dir_item, Some(&[file_item]), 0) {
|
||||||
.map(|item| item.item)
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
),
|
|
||||||
0,
|
|
||||||
)
|
|
||||||
} {
|
|
||||||
// from https://github.com/electron/electron/blob/10d967028af2e72382d16b7e2025d243b9e204ae/shell/common/platform_util_win.cc#L302
|
// from https://github.com/electron/electron/blob/10d967028af2e72382d16b7e2025d243b9e204ae/shell/common/platform_util_win.cc#L302
|
||||||
// On some systems, the above call mysteriously fails with "file not
|
// On some systems, the above call mysteriously fails with "file not
|
||||||
// found" even though the file is there. In these cases, ShellExecute()
|
// found" even though the file is there. In these cases, ShellExecute()
|
||||||
// seems to work as a fallback (although it won't select the file).
|
// seems to work as a fallback (although it won't select the file).
|
||||||
//
|
|
||||||
// Note: we only handle the first file here if multiple of are present
|
|
||||||
if e.code().0 == ERROR_FILE_NOT_FOUND.0 as i32 {
|
if e.code().0 == ERROR_FILE_NOT_FOUND.0 as i32 {
|
||||||
let first_path = to_reveals[0];
|
let is_dir = file.is_dir();
|
||||||
let is_dir = first_path.is_dir();
|
|
||||||
let mut info = SHELLEXECUTEINFOW {
|
let mut info = SHELLEXECUTEINFOW {
|
||||||
cbSize: std::mem::size_of::<SHELLEXECUTEINFOW>() as _,
|
cbSize: std::mem::size_of::<SHELLEXECUTEINFOW>() as _,
|
||||||
nShow: SW_SHOWNORMAL.0,
|
nShow: SW_SHOWNORMAL.0,
|
||||||
lpFile: PCWSTR(parent_item_id_list.hstring.as_ptr()),
|
lpFile: PCWSTR(dir.as_ptr()),
|
||||||
lpClass: if is_dir { w!("folder") } else { PCWSTR::null() },
|
lpClass: if is_dir { w!("folder") } else { PCWSTR::null() },
|
||||||
lpVerb: if is_dir {
|
lpVerb: if is_dir {
|
||||||
w!("explore")
|
w!("explore")
|
||||||
} else {
|
} else {
|
||||||
PCWSTR::null()
|
PCWSTR::null()
|
||||||
},
|
},
|
||||||
..Default::default()
|
..std::mem::zeroed()
|
||||||
};
|
};
|
||||||
|
|
||||||
unsafe { ShellExecuteExW(&mut info) }?;
|
ShellExecuteExW(&mut info).inspect_err(|_| {
|
||||||
|
ILFree(Some(dir_item));
|
||||||
|
ILFree(Some(file_item));
|
||||||
|
})?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe {
|
||||||
|
ILFree(Some(dir_item));
|
||||||
|
ILFree(Some(file_item));
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
struct OwnedItemIdList {
|
|
||||||
hstring: HSTRING,
|
|
||||||
item: *const ITEMIDLIST,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl OwnedItemIdList {
|
|
||||||
fn new(path: &Path) -> crate::Result<Self> {
|
|
||||||
let path_hstring = HSTRING::from(path);
|
|
||||||
let item_id_list = unsafe { ILCreateFromPathW(&path_hstring) };
|
|
||||||
if item_id_list.is_null() {
|
|
||||||
Err(crate::Error::FailedToConvertPathToItemIdList(
|
|
||||||
path.to_owned(),
|
|
||||||
))
|
|
||||||
} else {
|
|
||||||
Ok(Self {
|
|
||||||
hstring: path_hstring,
|
|
||||||
item: item_id_list,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Drop for OwnedItemIdList {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
if !self.item.is_null() {
|
|
||||||
unsafe { ILFree(Some(self.item)) };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
@@ -198,36 +115,24 @@ mod imp {
|
|||||||
target_os = "openbsd"
|
target_os = "openbsd"
|
||||||
))]
|
))]
|
||||||
mod imp {
|
mod imp {
|
||||||
use super::*;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
pub fn reveal_items_in_dir(paths: &[PathBuf]) -> crate::Result<()> {
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
pub fn reveal_item_in_dir(path: &Path) -> crate::Result<()> {
|
||||||
let connection = zbus::blocking::Connection::session()?;
|
let connection = zbus::blocking::Connection::session()?;
|
||||||
|
|
||||||
reveal_with_filemanager1(paths, &connection).or_else(|e| {
|
reveal_with_filemanager1(path, &connection)
|
||||||
// Fallback to opening the directory of the first item if revealing multiple items fails.
|
.or_else(|_| reveal_with_open_uri_portal(path, &connection))
|
||||||
if let Some(first_path) = paths.first() {
|
|
||||||
reveal_with_open_uri_portal(first_path, &connection)
|
|
||||||
} else {
|
|
||||||
Err(e)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reveal_with_filemanager1(
|
fn reveal_with_filemanager1(
|
||||||
paths: &[PathBuf],
|
path: &Path,
|
||||||
connection: &zbus::blocking::Connection,
|
connection: &zbus::blocking::Connection,
|
||||||
) -> crate::Result<()> {
|
) -> crate::Result<()> {
|
||||||
let uris: Result<Vec<_>, _> = paths
|
let uri = url::Url::from_file_path(path)
|
||||||
.iter()
|
.map_err(|_| crate::Error::FailedToConvertPathToFileUrl)?;
|
||||||
.map(|path| {
|
|
||||||
url::Url::from_file_path(path)
|
|
||||||
.map_err(|_| crate::Error::FailedToConvertPathToFileUrl)
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
let uris = uris?;
|
|
||||||
let uri_strs: Vec<&str> = uris.iter().map(|uri| uri.as_str()).collect();
|
|
||||||
|
|
||||||
#[zbus::proxy(
|
#[zbus::proxy(
|
||||||
interface = "org.freedesktop.FileManager1",
|
interface = "org.freedesktop.FileManager1",
|
||||||
@@ -240,7 +145,7 @@ mod imp {
|
|||||||
|
|
||||||
let proxy = FileManager1ProxyBlocking::new(connection)?;
|
let proxy = FileManager1ProxyBlocking::new(connection)?;
|
||||||
|
|
||||||
proxy.ShowItems(uri_strs, "")
|
proxy.ShowItems(vec![uri.as_str()], "")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reveal_with_open_uri_portal(
|
fn reveal_with_open_uri_portal(
|
||||||
@@ -272,22 +177,14 @@ mod imp {
|
|||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
mod imp {
|
mod imp {
|
||||||
|
use super::*;
|
||||||
use objc2_app_kit::NSWorkspace;
|
use objc2_app_kit::NSWorkspace;
|
||||||
use objc2_foundation::{NSArray, NSString, NSURL};
|
use objc2_foundation::{NSArray, NSString, NSURL};
|
||||||
use std::path::PathBuf;
|
pub fn reveal_item_in_dir(path: &Path) -> crate::Result<()> {
|
||||||
|
|
||||||
pub fn reveal_items_in_dir(paths: &[PathBuf]) -> crate::Result<()> {
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut urls = Vec::new();
|
let path = path.to_string_lossy();
|
||||||
|
let path = NSString::from_str(&path);
|
||||||
for path in paths {
|
let urls = vec![NSURL::fileURLWithPath(&path)];
|
||||||
let path = path.to_string_lossy();
|
|
||||||
let path = NSString::from_str(&path);
|
|
||||||
let url = NSURL::fileURLWithPath(&path);
|
|
||||||
|
|
||||||
urls.push(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
let urls = NSArray::from_retained_slice(&urls);
|
let urls = NSArray::from_retained_slice(&urls);
|
||||||
|
|
||||||
let workspace = NSWorkspace::new();
|
let workspace = NSWorkspace::new();
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.3.1]
|
|
||||||
|
|
||||||
- [`d3d290ab`](https://github.com/tauri-apps/plugins-workspace/commit/d3d290ab8a8913981a98e2eb7f2c5d4aba3bc36c) ([#2912](https://github.com/tauri-apps/plugins-workspace/pull/2912) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Unlocked version of `serialize-to-javascript` from `=0.1.1` to `^0.1.1` for compatibility with Tauri's upcoming version `2.8`.
|
|
||||||
|
|
||||||
## \[2.3.0]
|
## \[2.3.0]
|
||||||
|
|
||||||
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
- [`f209b2f2`](https://github.com/tauri-apps/plugins-workspace/commit/f209b2f23cb29133c97ad5961fb46ef794dbe063) ([#2804](https://github.com/tauri-apps/plugins-workspace/pull/2804) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated tauri to 2.6
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-os"
|
name = "tauri-plugin-os"
|
||||||
version = "2.3.1"
|
version = "2.3.0"
|
||||||
description = "Read information about the operating system."
|
description = "Read information about the operating system."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
@@ -32,4 +32,4 @@ thiserror = { workspace = true }
|
|||||||
os_info = "3"
|
os_info = "3"
|
||||||
sys-locale = "0.3"
|
sys-locale = "0.3"
|
||||||
gethostname = "1.0"
|
gethostname = "1.0"
|
||||||
serialize-to-javascript = "0.1.1"
|
serialize-to-javascript = "=0.1.1"
|
||||||
|
|||||||
@@ -33,12 +33,21 @@ tauri-plugin-os = { git = "https://github.com/tauri-apps/plugins-workspace", bra
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
|
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add @tauri-apps/plugin-os
|
pnpm add @tauri-apps/plugin-os
|
||||||
# or
|
# or
|
||||||
npm add @tauri-apps/plugin-os
|
npm add @tauri-apps/plugin-os
|
||||||
# or
|
# or
|
||||||
yarn add @tauri-apps/plugin-os
|
yarn add @tauri-apps/plugin-os
|
||||||
|
|
||||||
|
# alternatively with Git:
|
||||||
|
pnpm add https://github.com/tauri-apps/tauri-plugin-os#v2
|
||||||
|
# or
|
||||||
|
npm add https://github.com/tauri-apps/tauri-plugin-os#v2
|
||||||
|
# or
|
||||||
|
yarn add https://github.com/tauri-apps/tauri-plugin-os#v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-os",
|
"name": "@tauri-apps/plugin-os",
|
||||||
"version": "2.3.1",
|
"version": "2.3.0",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -24,6 +24,6 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2.8.0"
|
"@tauri-apps/api": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## \[2.3.2]
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
- Upgraded to `fs@2.4.2`
|
|
||||||
|
|
||||||
## \[2.3.1]
|
## \[2.3.1]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-persisted-scope"
|
name = "tauri-plugin-persisted-scope"
|
||||||
version = "2.3.2"
|
version = "2.3.1"
|
||||||
description = "Save filesystem and asset scopes and restore them when the app is reopened."
|
description = "Save filesystem and asset scopes and restore them when the app is reopened."
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
@@ -27,7 +27,7 @@ log = { workspace = true }
|
|||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
aho-corasick = "1"
|
aho-corasick = "1"
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
tauri-plugin-fs = { path = "../fs", version = "2.4.2" }
|
tauri-plugin-fs = { path = "../fs", version = "2.4.1" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
protocol-asset = ["tauri/protocol-asset"]
|
protocol-asset = ["tauri/protocol-asset"]
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user