diff --git a/Cargo.lock b/Cargo.lock index e6039fdc..9815a686 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -531,9 +531,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -787,7 +787,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "cairo-sys-rs", "glib", "libc", @@ -971,31 +971,15 @@ dependencies = [ "error-code", ] -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation 0.1.2", - "core-foundation 0.9.4", - "core-graphics 0.23.2", - "foreign-types", - "libc", - "objc", -] - [[package]] name = "cocoa" version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "block", - "cocoa-foundation 0.2.0", + "cocoa-foundation", "core-foundation 0.10.0", "core-graphics 0.24.0", "foreign-types", @@ -1003,27 +987,13 @@ dependencies = [ "objc", ] -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", - "libc", - "objc", -] - [[package]] name = "cocoa-foundation" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "block", "core-foundation 0.10.0", "core-graphics-types 0.2.0", @@ -1164,7 +1134,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "core-foundation 0.10.0", "core-graphics-types 0.2.0", "foreign-types", @@ -1188,7 +1158,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "core-foundation 0.10.0", "libc", ] @@ -1299,7 +1269,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "crossterm_winapi", "libc", "parking_lot 0.12.0", @@ -1757,6 +1727,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + [[package]] name = "enum-as-inner" version = "0.3.3" @@ -2327,7 +2306,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "libc", "libgit2-sys", "log", @@ -2340,7 +2319,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "futures-channel", "futures-core", "futures-executor", @@ -2990,6 +2969,15 @@ dependencies = [ "nom", ] +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + [[package]] name = "is-terminal" version = "0.4.12" @@ -3001,6 +2989,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + [[package]] name = "itertools" version = "0.10.5" @@ -3290,7 +3288,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "serde", "unicode-segmentation", ] @@ -4034,11 +4032,11 @@ dependencies = [ [[package]] name = "muda" -version = "0.13.5" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b959f97c97044e4c96e32e1db292a7d594449546a3c6b77ae613dc3a5b5145" +checksum = "ba8ac4080fb1e097c2c22acae467e46e4da72d941f02e82b67a87a2a89fa38b1" dependencies = [ - "cocoa 0.25.0", + "cocoa", "crossbeam-channel", "dpi", "gtk", @@ -4048,7 +4046,7 @@ dependencies = [ "png", "serde", "thiserror", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4132,7 +4130,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "jni-sys", "log", "ndk-sys", @@ -4236,7 +4234,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", "syn 2.0.46", @@ -4279,25 +4277,42 @@ dependencies = [ [[package]] name = "objc2-app-kit" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ + "bitflags 2.6.0", "block2", + "libc", "objc2", "objc2-core-data", + "objc2-core-image", "objc2-foundation", + "objc2-quartz-core", ] [[package]] name = "objc2-core-data" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ "block2", "objc2", "objc2-foundation", + "objc2-metal", ] [[package]] @@ -4308,25 +4323,42 @@ checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" [[package]] name = "objc2-foundation" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ + "bitflags 2.6.0", "block2", "dispatch", + "libc", "objc2", ] [[package]] -name = "objc2-quartz-core" -version = "0.2.0" +name = "objc2-metal" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "153140331e87b21327f0be072ac7108e67b43986f64098e937077b1eed6e3191" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ + "bitflags 2.6.0", + "block2", "objc2", "objc2-foundation", ] +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + [[package]] name = "objc_exception" version = "0.1.2" @@ -4366,6 +4398,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "open" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +dependencies = [ + "is-wsl", + "libc", + "pathdiff", +] + [[package]] name = "open-metrics-client" version = "0.14.0" @@ -4401,6 +4444,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "os_pipe" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "overload" version = "0.1.1" @@ -4928,7 +4981,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.0", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand 0.8.3", @@ -5263,7 +5316,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", ] [[package]] @@ -5510,7 +5563,7 @@ version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -6192,6 +6245,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shared_child" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "shell-words" version = "1.1.0" @@ -6803,8 +6866,8 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a97abbc7d6cfd0720da3e06fcb1cf2ac87cbfdb5bbbce103a1279a211c4d81" dependencies = [ - "bitflags 2.4.0", - "cocoa 0.26.0", + "bitflags 2.6.0", + "cocoa", "core-foundation 0.10.0", "core-graphics 0.24.0", "crossbeam-channel", @@ -6855,13 +6918,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.0.0-rc.2" +version = "2.0.0-rc.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ee93e545e49458813d4ed16179c67ee6141dba140ec3d4f078dda3b8d4e0d1" +checksum = "e8345ccc676ef16e26b61fc0f5340b4e770678b1e1f53f08c69ebdac5e56b422" dependencies = [ "anyhow", "bytes", - "cocoa 0.25.0", + "cocoa", "dirs", "dunce", "embed_plist", @@ -6897,9 +6960,9 @@ dependencies = [ "url", "urlpattern", "webkit2gtk", - "webview2-com 0.31.0", + "webview2-com", "window-vibrancy", - "windows 0.57.0", + "windows 0.58.0", ] [[package]] @@ -6998,6 +7061,27 @@ dependencies = [ "thiserror", ] +[[package]] +name = "tauri-plugin-shell" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83800ddf78b820172efb5ed7310344e8e4f97fd30cd8237a3f20c12a79eb136" +dependencies = [ + "encoding_rs", + "log", + "open", + "os_pipe", + "regex", + "schemars", + "serde", + "serde_json", + "shared_child", + "tauri", + "tauri-plugin", + "thiserror", + "tokio", +] + [[package]] name = "tauri-runtime" version = "2.0.0-rc.7" @@ -7023,7 +7107,7 @@ version = "2.0.0-rc.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73accf936a7cd01d1382de7850726fdf6c1f6ab3b01ccb7a0950cb852e332596" dependencies = [ - "cocoa 0.26.0", + "cocoa", "gtk", "http 1.1.0", "jni", @@ -7036,7 +7120,7 @@ dependencies = [ "tauri-utils", "url", "webkit2gtk", - "webview2-com 0.33.0", + "webview2-com", "windows 0.58.0", "wry", ] @@ -7644,22 +7728,23 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.14.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad8319cca93189ea9ab1b290de0595960529750b6b8b501a399ed1ec3775d60" +checksum = "131a65b2cef2081bc14dbcd414c906edbfa3bb5323dd7e748cc298614681196b" dependencies = [ - "cocoa 0.25.0", - "core-graphics 0.23.2", + "core-graphics 0.24.0", "crossbeam-channel", "dirs", "libappindicator", "muda", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", "png", "serde", "thiserror", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -7922,6 +8007,7 @@ dependencies = [ "tauri", "tauri-build", "tauri-plugin-clipboard-manager", + "tauri-plugin-shell", ] [[package]] @@ -8273,43 +8359,18 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "webview2-com" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6516cfa64c6b3212686080eeec378e662c2af54bb2a5b2a22749673f5cb2226f" -dependencies = [ - "webview2-com-macros 0.7.0", - "webview2-com-sys 0.31.0", - "windows 0.57.0", - "windows-core 0.57.0", - "windows-implement 0.57.0", - "windows-interface 0.57.0", -] - [[package]] name = "webview2-com" version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" dependencies = [ - "webview2-com-macros 0.8.0", - "webview2-com-sys 0.33.0", + "webview2-com-macros", + "webview2-com-sys", "windows 0.58.0", "windows-core 0.58.0", - "windows-implement 0.58.0", - "windows-interface 0.58.0", -] - -[[package]] -name = "webview2-com-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.46", + "windows-implement", + "windows-interface", ] [[package]] @@ -8323,17 +8384,6 @@ dependencies = [ "syn 2.0.46", ] -[[package]] -name = "webview2-com-sys" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76d5b77320ff155660be1df3e6588bc85c75f1a9feef938cc4dc4dd60d1d7cf" -dependencies = [ - "thiserror", - "windows 0.57.0", - "windows-core 0.57.0", -] - [[package]] name = "webview2-com-sys" version = "0.33.0" @@ -8404,7 +8454,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8cdd6999298d969289d8078dae02ce798ad23452075985cccba8b6326711ecf" dependencies = [ - "cocoa 0.26.0", + "cocoa", "objc", "raw-window-handle", "windows-sys 0.59.0", @@ -8420,16 +8470,6 @@ dependencies = [ "windows-targets 0.48.0", ] -[[package]] -name = "windows" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" -dependencies = [ - "windows-core 0.57.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.58.0" @@ -8449,42 +8489,19 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" -dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", + "windows-implement", + "windows-interface", + "windows-result", "windows-strings", "windows-targets 0.52.6", ] -[[package]] -name = "windows-implement" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.46", -] - [[package]] name = "windows-implement" version = "0.58.0" @@ -8496,17 +8513,6 @@ dependencies = [ "syn 2.0.46", ] -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.46", -] - [[package]] name = "windows-interface" version = "0.58.0" @@ -8524,20 +8530,11 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-result 0.2.0", + "windows-result", "windows-strings", "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.2.0" @@ -8553,7 +8550,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-result 0.2.0", + "windows-result", "windows-targets 0.52.6", ] @@ -8859,7 +8856,7 @@ checksum = "49b8049c8f239cdbfaaea4bacb9646f6b208938ceec0acd5b3e99cd05f70903f" dependencies = [ "base64 0.22.1", "block", - "cocoa 0.26.0", + "cocoa", "core-graphics 0.24.0", "crossbeam-channel", "dpi", @@ -8884,7 +8881,7 @@ dependencies = [ "thiserror", "webkit2gtk", "webkit2gtk-sys", - "webview2-com 0.33.0", + "webview2-com", "windows 0.58.0", "windows-core 0.58.0", "windows-version", diff --git a/src-gui/eslint.config.js b/src-gui/eslint.config.js index 7259274d..801fe7d4 100644 --- a/src-gui/eslint.config.js +++ b/src-gui/eslint.config.js @@ -15,6 +15,25 @@ export default [ languageOptions: { globals: globals.browser }, rules: { "react/react-in-jsx-scope": "off", + // Disallow the use of the `open` on the gloal object + "no-restricted-globals": [ + "warn", + { + name: "open", + message: + "Use the open(...) function from @tauri-apps/plugin-shell instead", + }, + ], + // Disallow the use of the `open` on the `window` object + "no-restricted-properties": [ + "warn", + { + object: "window", + property: "open", + message: + "Use the open(...) function from @tauri-apps/plugin-shell instead", + }, + ], }, }, ]; diff --git a/src-gui/package.json b/src-gui/package.json index a3072122..cc156ca8 100644 --- a/src-gui/package.json +++ b/src-gui/package.json @@ -19,6 +19,7 @@ "@reduxjs/toolkit": "^2.2.6", "@tauri-apps/api": "2.0.0-rc.1", "@tauri-apps/plugin-clipboard-manager": "^2.0.0-rc.0", + "@tauri-apps/plugin-shell": "^2.0.0-rc.0", "humanize-duration": "^3.32.1", "lodash": "^4.17.21", "multiaddr": "^10.0.1", diff --git a/src-gui/src/renderer/components/App.tsx b/src-gui/src/renderer/components/App.tsx index 7e4dc89a..1d612f29 100644 --- a/src-gui/src/renderer/components/App.tsx +++ b/src-gui/src/renderer/components/App.tsx @@ -1,6 +1,7 @@ import { Box, CssBaseline, makeStyles } from "@material-ui/core"; import { indigo } from "@material-ui/core/colors"; import { createTheme, ThemeProvider } from "@material-ui/core/styles"; +import "@tauri-apps/plugin-shell"; import { Route, MemoryRouter as Router, Routes } from "react-router-dom"; import Navigation, { drawerWidth } from "./navigation/Navigation"; import HelpPage from "./pages/help/HelpPage"; diff --git a/src-gui/src/renderer/components/icons/LinkIconButton.tsx b/src-gui/src/renderer/components/icons/LinkIconButton.tsx index a5d969ee..8ef925b8 100644 --- a/src-gui/src/renderer/components/icons/LinkIconButton.tsx +++ b/src-gui/src/renderer/components/icons/LinkIconButton.tsx @@ -1,4 +1,5 @@ import { IconButton } from "@material-ui/core"; +import { open } from "@tauri-apps/plugin-shell"; import { ReactNode } from "react"; export default function LinkIconButton({ @@ -9,7 +10,7 @@ export default function LinkIconButton({ children: ReactNode; }) { return ( - window.open(url, "_blank")}> + open(url)}> {children} ); diff --git a/src-gui/src/renderer/components/pages/help/ContactInfoBox.tsx b/src-gui/src/renderer/components/pages/help/ContactInfoBox.tsx index bda8efcd..4b151081 100644 --- a/src-gui/src/renderer/components/pages/help/ContactInfoBox.tsx +++ b/src-gui/src/renderer/components/pages/help/ContactInfoBox.tsx @@ -1,4 +1,5 @@ import { Box, Button, makeStyles, Typography } from "@material-ui/core"; +import { open } from "@tauri-apps/plugin-shell"; import InfoBox from "../../modal/swap/InfoBox"; const useStyles = makeStyles((theme) => ({ @@ -27,19 +28,13 @@ export default function ContactInfoBox() { } additionalContent={ - - - diff --git a/src-gui/yarn.lock b/src-gui/yarn.lock index eccb1e90..2de964bf 100644 --- a/src-gui/yarn.lock +++ b/src-gui/yarn.lock @@ -635,6 +635,11 @@ resolved "https://registry.yarnpkg.com/@tauri-apps/api/-/api-2.0.0-rc.3.tgz#1dd17530de9cafd854f77d3feeca1732a985a81e" integrity sha512-k1erUfnoOFJwL5VNFZz0BQZ2agNstG7CNOjwpdWMl1vOaVuSn4DhJtXB0Deh9lZaaDlfrykKOyZs9c3XXpMi5Q== +"@tauri-apps/api@^2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@tauri-apps/api/-/api-2.0.0-rc.4.tgz#2b4c3493d86382981787c52006c6c9e5bf16bc08" + integrity sha512-UNiIhhKG08j4ooss2oEEVexffmWkgkYlC2M3GcX3VPtNsqFgVNL8Mcw/4Y7rO9M9S+ffAMnLOF5ypzyuyb8tyg== + "@tauri-apps/cli-darwin-arm64@2.0.0-beta.21": version "2.0.0-beta.21" resolved "https://registry.yarnpkg.com/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.0.0-beta.21.tgz#9dc6f306b14d58b0b4fbf218ffbb31831e28cf4d" @@ -708,6 +713,13 @@ dependencies: "@tauri-apps/api" "^2.0.0-rc.0" +"@tauri-apps/plugin-shell@^2.0.0-rc.0": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@tauri-apps/plugin-shell/-/plugin-shell-2.0.0-rc.1.tgz#9facf3bbcedfa2de676cb4cfc703687377aa12a3" + integrity sha512-JtNROc0rqEwN/g93ig5pK4cl1vUo2yn+osCpY9de64cy/d9hRzof7AuYOgvt/Xcd5VPQmlgo2AGvUh5sQRSR1A== + dependencies: + "@tauri-apps/api" "^2.0.0-rc.4" + "@types/babel__core@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index dad0bb66..18426da6 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -22,3 +22,4 @@ serde_json = "1" swap = { path = "../swap", features = [ "tauri" ] } tauri = { version = "2.0.0-rc.1", features = [ "config-json5" ] } tauri-plugin-clipboard-manager = "2.1.0-beta.7" +tauri-plugin-shell = "2.0.0-rc.2" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index b28f71b8..773af9f0 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -2,12 +2,11 @@ "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", "description": "Capability for the main window", - "windows": [ - "main" - ], + "windows": ["main"], "permissions": [ "core:event:allow-emit", "core:event:default", - "clipboard-manager:allow-write-text" + "clipboard-manager:allow-write-text", + "shell:allow-open" ] -} \ No newline at end of file +} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 85dfcbb9..516539a7 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -159,6 +159,7 @@ fn setup(app: &mut tauri::App) -> Result<(), Box> { pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_clipboard_manager::init()) + .plugin(tauri_plugin_shell::init()) .invoke_handler(tauri::generate_handler![ get_balance, get_swap_infos_all,