mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-05-03 12:15:11 +02:00
Compare commits
199 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fcb2f5f40 | |||
| 3a79266b8c | |||
| 0469f025b2 | |||
| 77b855074a | |||
| 6b1a6d62f0 | |||
| ae002af2d6 | |||
| f7ad349ed2 | |||
| 5b8efde906 | |||
| 69d508ee69 | |||
| fe610d6759 | |||
| a7e58f5654 | |||
| 715a0477be | |||
| 05c62d731f | |||
| ce83d53775 | |||
| 6dbc304c28 | |||
| ab8cf45bb9 | |||
| 3ef756f4ce | |||
| 664c452697 | |||
| 82fa1e1f45 | |||
| 3195646996 | |||
| 6f6a178ae4 | |||
| 28935b65be | |||
| 1f5ed2fbb0 | |||
| de4808f96d | |||
| 59076b0a35 | |||
| 484eadaf33 | |||
| 2572018e3f | |||
| ab9a24b89b | |||
| 33e924574a | |||
| 76f99ce999 | |||
| 241319ae1d | |||
| 40ea6e0b4e | |||
| 3fa0fc09bb | |||
| fef76bd504 | |||
| f8f2eefe03 | |||
| c665818395 | |||
| 2ba68760b9 | |||
| 5070476816 | |||
| 51cd283a5f | |||
| d44f0ee7a7 | |||
| b1b0565d12 | |||
| db526a1c97 | |||
| a3b553ddb4 | |||
| fecfd5533a | |||
| ed981027dd | |||
| 5092ea5e89 | |||
| ac2edc2159 | |||
| 59dd5f105a | |||
| 4db626354c | |||
| 383e636a8e | |||
| 1051db406a | |||
| ee3fb1dba6 | |||
| c34b2ea824 | |||
| 8a33595bbe | |||
| ff05a59e60 | |||
| bea474c550 | |||
| e5476aac94 | |||
| 7f025e5240 | |||
| 5700bd2213 | |||
| d402c3865a | |||
| 90ef77c872 | |||
| 51856e9e0a | |||
| 9741b97e8c | |||
| e421b9a2c0 | |||
| 371a2f7361 | |||
| 52c093ac9d | |||
| 6d6508f18e | |||
| 3fa814d1f0 | |||
| 1fe3dab64c | |||
| 5dadd205f5 | |||
| 3e15acea9a | |||
| 3e78173df9 | |||
| 64fac08bfb | |||
| fdc382dff0 | |||
| b2aea04567 | |||
| 3449dd5a8f | |||
| 57f69c6615 | |||
| cfb3ec0e21 | |||
| b8bf4ad360 | |||
| 87cc58527d | |||
| e0d2e2c53f | |||
| 9a7092ca44 | |||
| 606fa08dae | |||
| 62f1e40682 | |||
| c8e5614063 | |||
| 03c255ae20 | |||
| a706748dd3 | |||
| 7c1046d239 | |||
| a90f36b07e | |||
| e5249cff0b | |||
| d57df4debe | |||
| 1f649c7f1f | |||
| 0ca4cc914c | |||
| 9dcad78f44 | |||
| 4341d7f500 | |||
| 77149dc432 | |||
| 525abc4be5 | |||
| 14cee64c82 | |||
| 3fd283121f | |||
| ae8024565f | |||
| 2302c2db1c | |||
| 44c50c1275 | |||
| 415bf2abc3 | |||
| 36207a93f3 | |||
| 854754e10b | |||
| 1c2f137a8a | |||
| 8c67d44aef | |||
| cfd48b3b2e | |||
| 558e14bb4c | |||
| aef5dd6157 | |||
| 74ee7edc43 | |||
| 7e1c17a635 | |||
| 3c1f3874f4 | |||
| 51ddf6a715 | |||
| 62082b7086 | |||
| aee14ed426 | |||
| 9b2840db94 | |||
| 60064fce52 | |||
| 0058583583 | |||
| fb676626f1 | |||
| f445c704a1 | |||
| fd785ab5de | |||
| a1a82208ed | |||
| dc49de5341 | |||
| 4c2454d410 | |||
| fe6dd0ff9e | |||
| ab8d089b2b | |||
| ee02ea7746 | |||
| 9501cfa5f5 | |||
| e8069af804 | |||
| 0975a687a0 | |||
| 654a7299c3 | |||
| 58eab11faf | |||
| fb62d03f73 | |||
| 7e5e34420b | |||
| f12d35609a | |||
| 44273b9889 | |||
| 2f7e32b5e0 | |||
| 30bcf5dcc2 | |||
| 68579934c9 | |||
| 04459afbb6 | |||
| 3b2bd3065d | |||
| f930505de4 | |||
| 34319bd977 | |||
| 34737186fe | |||
| 4bd1f15bb9 | |||
| aabc4d3a24 | |||
| fc9b189e83 | |||
| b7ff3a6bdb | |||
| 04a0aea0ab | |||
| e564e2aa91 | |||
| 118f6b4334 | |||
| fd0a52aa86 | |||
| 52e3bdab26 | |||
| dd09e3c3f4 | |||
| 2797954799 | |||
| 025210be28 | |||
| 221f50f53b | |||
| 6bf1bd8d44 | |||
| 41fe9053a0 | |||
| 27bb5d9a27 | |||
| 3168e17603 | |||
| dd514e7a88 | |||
| 6e142b4230 | |||
| fd1c7c8dbb | |||
| 59c63f31cc | |||
| 3cbb55aa7b | |||
| 60765694f5 | |||
| fd75401aee | |||
| ca34972266 | |||
| 179184326b | |||
| d8efd3cd20 | |||
| 5d39ddcf22 | |||
| 2050a3bea2 | |||
| c078f57a09 | |||
| dc5721ac13 | |||
| 1d9741b52b | |||
| 7a37355e17 | |||
| 5cbd593e76 | |||
| f7600b5fff | |||
| fb85e5dd76 | |||
| 6f3f66794a | |||
| 79d6e19c4b | |||
| aebd4f6185 | |||
| 341a5320c3 | |||
| cc03ccf5e0 | |||
| 009299ebec | |||
| 204e5aacad | |||
| 8a45c35160 | |||
| ebf821afd1 | |||
| 984110a978 | |||
| 2b898f0786 | |||
| b2269333e3 | |||
| 41afcae399 | |||
| 9291e4d2ca | |||
| 3715f3c9a6 | |||
| 253ae66210 | |||
| 949e2d6c45 | |||
| 64a6240f79 |
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"dialog": patch:feat
|
||||
---
|
||||
|
||||
Implement `save` API on Android.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"barcode-scanner": patch
|
||||
---
|
||||
|
||||
Remove unused Android dependencies.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"barcode-scanner": patch
|
||||
---
|
||||
|
||||
Validate missing `NSCameraUsageDescription` Info.plist value.
|
||||
+31
-6
@@ -14,10 +14,20 @@
|
||||
"command": "pnpm build",
|
||||
"dryRunCommand": "pnpm build"
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "npm publish --provenance --access public",
|
||||
"dryRunCommand": "npm publish --provenance --access public --dry-run",
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -56,12 +66,13 @@
|
||||
"dependencies": [
|
||||
"barcode-scanner",
|
||||
"biometric",
|
||||
"log-plugin",
|
||||
"log",
|
||||
"cli",
|
||||
"clipboard-manager",
|
||||
"dialog",
|
||||
"fs",
|
||||
"global-shortcut",
|
||||
"opener",
|
||||
"http",
|
||||
"nfc",
|
||||
"notification",
|
||||
@@ -69,7 +80,9 @@
|
||||
"process",
|
||||
"shell",
|
||||
"store",
|
||||
"updater"
|
||||
"updater",
|
||||
"geolocation",
|
||||
"haptics"
|
||||
]
|
||||
},
|
||||
"api-example-js": {
|
||||
@@ -85,6 +98,7 @@
|
||||
"dialog-js",
|
||||
"fs-js",
|
||||
"global-shortcut-js",
|
||||
"opener-js",
|
||||
"http-js",
|
||||
"nfc-js",
|
||||
"notification-js",
|
||||
@@ -166,7 +180,8 @@
|
||||
},
|
||||
"dialog-js": {
|
||||
"path": "./plugins/dialog",
|
||||
"manager": "javascript"
|
||||
"manager": "javascript",
|
||||
"dependencies": ["fs-js"]
|
||||
},
|
||||
"geolocation": {
|
||||
"path": "./plugins/geolocation",
|
||||
@@ -184,6 +199,14 @@
|
||||
"path": "./plugins/global-shortcut",
|
||||
"manager": "javascript"
|
||||
},
|
||||
"opener": {
|
||||
"path": "./plugins/opener",
|
||||
"manager": "rust"
|
||||
},
|
||||
"opener-js": {
|
||||
"path": "./plugins/opener",
|
||||
"manager": "javascript"
|
||||
},
|
||||
"haptics": {
|
||||
"path": "./plugins/haptics",
|
||||
"manager": "rust"
|
||||
@@ -199,13 +222,14 @@
|
||||
},
|
||||
"http-js": {
|
||||
"path": "./plugins/http",
|
||||
"manager": "javascript"
|
||||
"manager": "javascript",
|
||||
"dependencies": ["fs-js"]
|
||||
},
|
||||
"localhost": {
|
||||
"path": "./plugins/localhost",
|
||||
"manager": "rust"
|
||||
},
|
||||
"log-plugin": {
|
||||
"log": {
|
||||
"path": "./plugins/log",
|
||||
"manager": "rust"
|
||||
},
|
||||
@@ -268,7 +292,8 @@
|
||||
},
|
||||
"single-instance": {
|
||||
"path": "./plugins/single-instance",
|
||||
"manager": "rust"
|
||||
"manager": "rust",
|
||||
"dependencies": ["deep-link"]
|
||||
},
|
||||
"sql": {
|
||||
"path": "./plugins/sql",
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
"barcode-scanner": patch
|
||||
"barcode-scanner-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
"notification": patch
|
||||
"notification-js": patch
|
||||
---
|
||||
|
||||
Use `PermissionState` from the `tauri` crate, which now also includes a "prompt with rationale" variant for Android (returned when your app must explain to the user why it needs the permission).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"dialog": "patch"
|
||||
---
|
||||
|
||||
Mark `FileResponse` as `non_exhaustive`.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
"dialog": patch
|
||||
"dialog-js": patch
|
||||
---
|
||||
|
||||
The `open` function now returns a string representing either the file path or URI instead of an object.
|
||||
To read the file data, use the `fs` APIs.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"deep-link": patch
|
||||
---
|
||||
|
||||
Allow empty configuration values.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"fs": patch:bug
|
||||
---
|
||||
|
||||
Fixes `writeFile` command implementation on Android.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"http-js": patch
|
||||
---
|
||||
|
||||
Fixed an issue with abort signal not aborting the fetch request.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"dialog": patch:breaking
|
||||
---
|
||||
|
||||
If no filters are specified, the file picker dialog now defaults to a file selection instead of photos.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"updater": patch
|
||||
---
|
||||
|
||||
Fixes the updater not preserving AppImage file permissions.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"window-state": patch
|
||||
---
|
||||
|
||||
Fix saving a minimized window's state changes its position to -32000
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
"fs": patch
|
||||
"dialog": patch
|
||||
---
|
||||
|
||||
Add utility methods on `FilePath` and `SafeFilePath` enums which are:
|
||||
|
||||
- `path`
|
||||
- `simplified`
|
||||
- `into_path`
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"fs": patch
|
||||
"dialog": patch
|
||||
---
|
||||
|
||||
Implement `Serialize`, `Deserialize`, `From`, `TryFrom` and `FromStr` traits for `FilePath` and `SafeFilePath` enums.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"fs": patch
|
||||
"dialog": patch
|
||||
---
|
||||
|
||||
Mark `Error` enum as `#[non_exhuastive]`.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"fs": patch
|
||||
"dialog": patch
|
||||
---
|
||||
|
||||
Add `SafeFilePath` enum.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"fs": patch:enhance
|
||||
---
|
||||
|
||||
The `scope-*-recursive` permissions now also allow reading the contents of the directory.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"fs": patch
|
||||
---
|
||||
|
||||
Fix can't use Windows paths like `C:/Users/UserName/file.txt`
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"geolocation": major
|
||||
"geolocation-js": major
|
||||
---
|
||||
|
||||
Initial release.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"global-shortcut": "patch"
|
||||
---
|
||||
|
||||
Updated `global-hotkey` crate dependency to `0.6`
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"haptics": major
|
||||
"haptics-js": major
|
||||
---
|
||||
|
||||
Initial release.
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
barcode-scanner: patch
|
||||
clipboard-manager: patch
|
||||
deep-link: patch
|
||||
global-shortcut: patch
|
||||
window-state: patch
|
||||
---
|
||||
|
||||
Fixed an issue that caused multi-word IIFE names to not be formatted correctly. For example the `barcode-scanner` was defined as `window.__TAURI_PLUGIN_CLIPBOARDMANAGER__` instead of `window.__TAURI_PLUGIN_CLIPBOARD_MANAGER__`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"dialog": patch:feat
|
||||
---
|
||||
|
||||
Implement `save` API on iOS.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"notification": patch
|
||||
---
|
||||
|
||||
The notification body is now optional on iOS to match the other platforms.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"notification-js": patch
|
||||
---
|
||||
|
||||
**Breaking change**: The permission type when using the API is now `'granted' | 'denied' | 'prompt' | 'prompt-with-rationale'` instead of `'granted' | 'denied' | 'default'` for consistency with Rust types. When using the `window.Notification` API the type is unchanged to match the Web API type.
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"tag": "rc",
|
||||
"changes": [
|
||||
".changes/android-dialog-save.md",
|
||||
".changes/barcode-dependencies.md",
|
||||
".changes/barcode-scanner-validate-plist.md",
|
||||
".changes/consolidate-permission-state.md",
|
||||
".changes/dialog-file-response-non-exhaustive.md",
|
||||
".changes/dialog-return-path.md",
|
||||
".changes/fix-deep-link-config.md",
|
||||
".changes/fix-fs-write-file-android.md",
|
||||
".changes/fix-http-plugin-abort.md",
|
||||
".changes/fix-ios-file-dialog-default-mode.md",
|
||||
".changes/fix-linux-updater-permission-error.md",
|
||||
".changes/fix-restore-minimized-window-position.md",
|
||||
".changes/fs-dialog-file-path-methods.md",
|
||||
".changes/fs-dialog-file-path-traits.md",
|
||||
".changes/fs-dialog-non-exhaustive-error.md",
|
||||
".changes/fs-dialog-safe-file-path.md",
|
||||
".changes/fs-scope-recursive-allow-read-dir.md",
|
||||
".changes/fs-windows-path.md",
|
||||
".changes/geolocation-release.md",
|
||||
".changes/global-shortcut-0.6.md",
|
||||
".changes/haptics-release.md",
|
||||
".changes/iife-varname-spacing.md",
|
||||
".changes/ios-dialog-save.md",
|
||||
".changes/notification-body-optional-ios.md",
|
||||
".changes/notification-permission-type-change.md",
|
||||
".changes/rc.md",
|
||||
".changes/remove-target-sdk.md",
|
||||
".changes/resolve-content-uris.md",
|
||||
".changes/shell-open-regex-match-string.md",
|
||||
".changes/shell-regex-match-string.md",
|
||||
".changes/single-instance-windows-sys.0.59.md",
|
||||
".changes/sql-uuid-type.md",
|
||||
".changes/store-remove-mobile-plugin.md",
|
||||
".changes/swift-build-older-versions.md",
|
||||
".changes/tauri-rc-8.md",
|
||||
".changes/update-fs-api-docs.md",
|
||||
".changes/update-tauri-rc-3.md",
|
||||
".changes/updater-js-headers-download-crate.md",
|
||||
".changes/updater-js-headers-download.md"
|
||||
]
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
"authenticator": patch
|
||||
"autostart": patch
|
||||
"barcode-scanner": patch
|
||||
"biometric": patch
|
||||
"cli": patch
|
||||
"clipboard-manager": patch
|
||||
"deep-link": patch
|
||||
"dialog": patch
|
||||
"fs": patch
|
||||
"global-shortcut": patch
|
||||
"http": patch
|
||||
"localhost": patch
|
||||
"log-plugin": patch
|
||||
"nfc": patch
|
||||
"notification": patch
|
||||
"os": patch
|
||||
"persisted-scope": patch
|
||||
"positioner": patch
|
||||
"process": patch
|
||||
"shell": patch
|
||||
"single-instance": patch
|
||||
"sql": patch
|
||||
"store": patch
|
||||
"stronghold": patch
|
||||
"updater": patch
|
||||
"upload": patch
|
||||
"websocket": patch
|
||||
"window-state": patch
|
||||
"authenticator-js": patch
|
||||
"autostart-js": patch
|
||||
"barcode-scanner-js": patch
|
||||
"biometric-js": patch
|
||||
"cli-js": patch
|
||||
"clipboard-manager-js": patch
|
||||
"deep-link-js": patch
|
||||
"dialog-js": patch
|
||||
"fs-js": patch
|
||||
"global-shortcut-js": patch
|
||||
"http-js": patch
|
||||
"log-js": patch
|
||||
"nfc-js": patch
|
||||
"notification-js": patch
|
||||
"os-js": patch
|
||||
"positioner-js": patch
|
||||
"process-js": patch
|
||||
"shell-js": patch
|
||||
"sql-js": patch
|
||||
"store-js": patch
|
||||
"stronghold-js": patch
|
||||
"updater-js": patch
|
||||
"upload-js": patch
|
||||
"websocket-js": patch
|
||||
"window-state-js": patch
|
||||
"haptics": patch
|
||||
"haptics-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
---
|
||||
|
||||
Update to tauri RC.
|
||||
@@ -6,6 +6,8 @@ As you create PRs and make changes that require a version bump, please add a new
|
||||
|
||||
When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
|
||||
|
||||
**Note, that in this repository, even if only the Rust code or only the JavaScript code of a plugin changed, both packages need to be bumped with the same increment!**
|
||||
|
||||
Use the following format:
|
||||
|
||||
```md
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
"barcode-scanner": patch:changes
|
||||
"biometric": patch:changes
|
||||
"clipboard-manager": patch:changes
|
||||
"deep-link": patch:changes
|
||||
"dialog": patch:changes
|
||||
"geolocation": patch:changes
|
||||
"haptics": patch:changes
|
||||
"nfc": patch:changes
|
||||
"notification": patch:changes
|
||||
"shell": patch:changes
|
||||
"store": patch:changes
|
||||
---
|
||||
|
||||
Remove targetSdk from build.kts files as it is deprecated and will be removed from DSL v9.0
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"fs": patch:feat
|
||||
---
|
||||
|
||||
Resolve `content://` path URIs on Android.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"shell": patch
|
||||
---
|
||||
|
||||
Change the `open` scope validator regex to match on the entire string.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"shell": patch
|
||||
---
|
||||
|
||||
Change the `execute` scope argument validator regex to match on the entire string by default.
|
||||
If this behavior is not desired check the `raw` boolean configuration option that is available along the `validator` string.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"single-instance": "patch"
|
||||
---
|
||||
|
||||
Updated `windows-sys` crate to `0.59`
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"sql": patch
|
||||
---
|
||||
|
||||
Added support for `UUID` columns to the postgres implementation.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"store": patch:breaking
|
||||
---
|
||||
|
||||
Implement mobile support in Rust directly. This changes the store directories, invalidating all previously generated stores.
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
"barcode-scanner": patch
|
||||
"biometric": patch
|
||||
"clipboard-manager": patch
|
||||
"dialog": patch
|
||||
"geolocation": patch
|
||||
"haptics": patch
|
||||
"log-plugin": patch
|
||||
"nfc": patch
|
||||
"notification": patch
|
||||
"shell": patch
|
||||
"store": patch
|
||||
---
|
||||
|
||||
Explicitly set a minimum macOS version for the Swift package.
|
||||
@@ -1,61 +0,0 @@
|
||||
---
|
||||
"authenticator": patch
|
||||
"autostart": patch
|
||||
"barcode-scanner": patch
|
||||
"biometric": patch
|
||||
"cli": patch
|
||||
"clipboard-manager": patch
|
||||
"deep-link": patch
|
||||
"dialog": patch
|
||||
"fs": patch
|
||||
"global-shortcut": patch
|
||||
"http": patch
|
||||
"localhost": patch
|
||||
"log-plugin": patch
|
||||
"nfc": patch
|
||||
"notification": patch
|
||||
"os": patch
|
||||
"persisted-scope": patch
|
||||
"positioner": patch
|
||||
"process": patch
|
||||
"shell": patch
|
||||
"single-instance": patch
|
||||
"sql": patch
|
||||
"store": patch
|
||||
"stronghold": patch
|
||||
"updater": patch
|
||||
"upload": patch
|
||||
"websocket": patch
|
||||
"window-state": patch
|
||||
"authenticator-js": patch
|
||||
"autostart-js": patch
|
||||
"barcode-scanner-js": patch
|
||||
"biometric-js": patch
|
||||
"cli-js": patch
|
||||
"clipboard-manager-js": patch
|
||||
"deep-link-js": patch
|
||||
"dialog-js": patch
|
||||
"fs-js": patch
|
||||
"global-shortcut-js": patch
|
||||
"http-js": patch
|
||||
"log-js": patch
|
||||
"nfc-js": patch
|
||||
"notification-js": patch
|
||||
"os-js": patch
|
||||
"positioner-js": patch
|
||||
"process-js": patch
|
||||
"shell-js": patch
|
||||
"sql-js": patch
|
||||
"store-js": patch
|
||||
"stronghold-js": patch
|
||||
"updater-js": patch
|
||||
"upload-js": patch
|
||||
"websocket-js": patch
|
||||
"window-state-js": patch
|
||||
"haptics": patch
|
||||
"haptics-js": patch
|
||||
"geolocation": patch
|
||||
"geolocation-js": patch
|
||||
---
|
||||
|
||||
Update to tauri 2.0.0-rc.8
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"fs-js": patch
|
||||
---
|
||||
|
||||
Update documentation.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
"geolocation": patch
|
||||
"deep-link": patch
|
||||
"updater": patch
|
||||
---
|
||||
|
||||
Update to tauri 2.0.0-rc.3.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"updater": "patch"
|
||||
---
|
||||
|
||||
Add a second argument in `Update.download` and `Update.donloadAndInstall` JS APIs to modify headers and timeout when downloading the update.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"updater-js": "patch"
|
||||
---
|
||||
|
||||
Add a second argument in `Update.download` and `Update.donloadAndInstall` JS APIs to modify headers and timeout when downloading the update.
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: check change files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.changes/*.md'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: check change files end with .md
|
||||
run: |
|
||||
for file in .changes/*
|
||||
do
|
||||
if [[ ! "$file" =~ \.(md|json)$ ]]; then
|
||||
echo ".changes directory should only contain files that end with .md"
|
||||
echo "found an invalid file in .changes directory:"
|
||||
echo "$file"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
list-files: shell
|
||||
filters: |
|
||||
changes:
|
||||
- added|modified: '.changes/*.md'
|
||||
|
||||
- name: check
|
||||
run: node ./.scripts/ci/check-change-files.js ${{ steps.filter.outputs.changes_files }}
|
||||
if: ${{ steps.filter.outputs.changes == 'true' }}
|
||||
@@ -53,6 +53,10 @@ jobs:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/global-shortcut/guest-js/**
|
||||
- plugins/global-shortcut/src/api-iife.js
|
||||
opener:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/opener/guest-js/**
|
||||
- plugins/opener/src/api-iife.js
|
||||
haptics:
|
||||
- .github/workflows/check-generated-files.yml
|
||||
- plugins/haptics/guest-js/**
|
||||
|
||||
@@ -66,6 +66,9 @@ jobs:
|
||||
tauri-plugin-global-shortcut:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/global-shortcut/**
|
||||
tauri-plugin-opener:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/opener/**
|
||||
tauri-plugin-haptics:
|
||||
- .github/workflows/lint-rust.yml
|
||||
- plugins/haptics/**
|
||||
@@ -126,7 +129,7 @@ jobs:
|
||||
clippy:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -148,13 +151,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: clippy ${{ matrix.package }}
|
||||
if: matrix.package != 'tauri-plugin-sql'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets -- -D warnings
|
||||
|
||||
- name: clippy ${{ matrix.package }} mysql
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features mysql -- -D warnings
|
||||
|
||||
- name: clippy ${{ matrix.package }} postgres
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --no-default-features --features postgres -- -D warnings
|
||||
- name: clippy ${{ matrix.package }} --all-features
|
||||
run: cargo clippy --package ${{ matrix.package }} --all-targets --all-features -- -D warnings
|
||||
|
||||
@@ -47,109 +47,140 @@ jobs:
|
||||
tauri-plugin-autostart:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/autostart/**
|
||||
tauri-plugin-cli:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/cli/**
|
||||
tauri-plugin-clipboard-manager:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/clipboard-manager/**
|
||||
tauri-plugin-deep-link:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/deep-link/**
|
||||
tauri-plugin-dialog:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/dialog/**
|
||||
- plugins/fs/**
|
||||
tauri-plugin-fs:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/fs/**
|
||||
tauri-plugin-geolocation:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/geolocation/**
|
||||
tauri-plugin-global-shortcut:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/global-shortcut/**
|
||||
tauri-plugin-opener:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/opener/**
|
||||
tauri-plugin-haptics:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/haptics/**
|
||||
tauri-plugin-http:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/http/**
|
||||
- plugins/fs/**
|
||||
tauri-plugin-localhost:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/localhost/**
|
||||
tauri-plugin-log:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/log/**
|
||||
tauri-plugin-notification:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/notification/**
|
||||
tauri-plugin-os:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/os/**
|
||||
tauri-plugin-persisted-scope:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/persisted-scope/**
|
||||
- plugins/fs/**
|
||||
tauri-plugin-positioner:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/positioner/**
|
||||
tauri-plugin-process:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/process/**
|
||||
tauri-plugin-shell:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/shell/**
|
||||
tauri-plugin-single-instance:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/single-instance/**
|
||||
tauri-plugin-sql:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/sql/**
|
||||
tauri-plugin-store:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/store/**
|
||||
tauri-plugin-stronghold:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/stronghold/**
|
||||
tauri-plugin-updater:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/updater/**
|
||||
tauri-plugin-upload:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/upload/**
|
||||
tauri-plugin-websocket:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/websocket/**
|
||||
tauri-plugin-window-state:
|
||||
- .github/workflows/test-rust.yml
|
||||
- Cargo.toml
|
||||
- Cargo.lock
|
||||
- plugins/window-state/**
|
||||
|
||||
test:
|
||||
@@ -168,7 +199,7 @@ jobs:
|
||||
}
|
||||
- {
|
||||
target: x86_64-unknown-linux-gnu,
|
||||
os: ubuntu-latest,
|
||||
os: ubuntu-22.04,
|
||||
runner: 'cargo',
|
||||
command: 'test'
|
||||
}
|
||||
@@ -202,7 +233,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
|
||||
|
||||
- uses: dtolnay/rust-toolchain@1.75.0
|
||||
- uses: dtolnay/rust-toolchain@1.77.2
|
||||
with:
|
||||
targets: ${{ matrix.platform.target }}
|
||||
|
||||
@@ -215,21 +246,9 @@ jobs:
|
||||
run: cargo +stable install cross --git https://github.com/cross-rs/cross
|
||||
|
||||
- name: test ${{ matrix.package }}
|
||||
if: matrix.package != 'tauri-plugin-sql' && matrix.package != 'tauri-plugin-http'
|
||||
if: matrix.package != 'tauri-plugin-http'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features
|
||||
|
||||
- name: test ${{ matrix.package }}
|
||||
if: matrix.package == 'tauri-plugin-http'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets
|
||||
|
||||
- name: test ${{ matrix.package }} sqlite
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features sqlite
|
||||
|
||||
- name: test ${{ matrix.package }} mysql
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql
|
||||
|
||||
- name: test ${{ matrix.package }} postgres
|
||||
if: matrix.package == 'tauri-plugin-sql'
|
||||
run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres
|
||||
|
||||
+7
-1
@@ -26,9 +26,15 @@ target/
|
||||
# compiled plugins
|
||||
dist-js/
|
||||
|
||||
# plugins .tauri director
|
||||
# plugins .tauri directory
|
||||
/plugins/*/.tauri
|
||||
|
||||
# examples
|
||||
examples/*/dist
|
||||
plugins/*/examples/*/dist
|
||||
examples/*/src-tauri/gen/schemas
|
||||
plugins/*/examples/*/src-tauri/gen/schemas
|
||||
|
||||
# logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
+6
-1
@@ -19,4 +19,9 @@ plugins/*/examples/*/src-tauri/gen/
|
||||
api-iife.js
|
||||
init-iife.js
|
||||
CHANGELOG.md
|
||||
*schema.json
|
||||
*schema.json
|
||||
|
||||
# mobile build
|
||||
**/ios/.build
|
||||
**/.tauri
|
||||
plugins/*/android/build
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { readFileSync, readdirSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
|
||||
/* const ignorePackages = [
|
||||
'api-example',
|
||||
'api-example-js',
|
||||
'deep-link-example',
|
||||
'deep-link-example-js'
|
||||
] */
|
||||
|
||||
const rsOnly = ['localhost', 'persisted-scope', 'single-instance']
|
||||
|
||||
function checkChangeFiles(changeFiles) {
|
||||
let code = 0
|
||||
|
||||
for (const file of changeFiles) {
|
||||
const content = readFileSync(file, 'utf8')
|
||||
const [frontMatter] = /^---[\s\S.]*---\n/i.exec(content)
|
||||
const packages = frontMatter
|
||||
.split('\n')
|
||||
.filter((l) => !(l === '---' || !l))
|
||||
.map((l) => l.replace(/('|")/g, '').split(':'))
|
||||
|
||||
const rsPackages = Object.fromEntries(
|
||||
packages
|
||||
.filter((v) => !v[0].endsWith('-js'))
|
||||
.map((v) => [v[0], v[1].trim()])
|
||||
)
|
||||
const jsPackages = Object.fromEntries(
|
||||
packages
|
||||
.filter((v) => v[0].endsWith('-js'))
|
||||
.map((v) => [v[0].slice(0, -3), v[1].trim()])
|
||||
)
|
||||
|
||||
for (const pkg in rsPackages) {
|
||||
if (rsOnly.includes(pkg)) continue
|
||||
|
||||
if (!jsPackages[pkg]) {
|
||||
console.error(
|
||||
`Missing "${rsPackages[pkg]}" bump for JS package "${pkg}-js" in ${file}.`
|
||||
)
|
||||
code = 1
|
||||
} else if (rsPackages[pkg] != jsPackages[pkg]) {
|
||||
console.error(
|
||||
`"${pkg}" and "${pkg}-js" have different version bumps in ${file}.`
|
||||
)
|
||||
code = 1
|
||||
}
|
||||
}
|
||||
|
||||
for (const pkg in jsPackages) {
|
||||
if (!rsPackages[pkg]) {
|
||||
console.error(
|
||||
`Missing "${jsPackages[pkg]}" bump for Rust package "${pkg}" in ${file}.`
|
||||
)
|
||||
code = 1
|
||||
} else if (rsPackages[pkg] != jsPackages[pkg]) {
|
||||
console.error(
|
||||
`"${pkg}" and "${pkg}-js" have different version bumps in ${file}.`
|
||||
)
|
||||
code = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
process.exit(code)
|
||||
}
|
||||
|
||||
const [_bin, _script, ...files] = process.argv
|
||||
|
||||
if (files.length > 0) {
|
||||
checkChangeFiles(
|
||||
files.filter((f) => f.toLowerCase() !== '.changes/readme.md')
|
||||
)
|
||||
} else {
|
||||
const changeFiles = readdirSync('.changes')
|
||||
.filter((f) => f.endsWith('.md') && f.toLowerCase() !== 'readme.md')
|
||||
.map((p) => join('.changes', p))
|
||||
checkChangeFiles(changeFiles)
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
plugins/*/permissions/autogenerated/
|
||||
Generated
+1367
-1076
File diff suppressed because it is too large
Load Diff
+9
-6
@@ -10,24 +10,27 @@ resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
log = "0.4"
|
||||
tauri = { version = "2.0.0-rc.10", default-features = false }
|
||||
tauri-build = "2.0.0-rc.9"
|
||||
tauri-plugin = "2.0.0-rc.9"
|
||||
tauri-utils = "2.0.0-rc.9"
|
||||
tauri = { version = "2", default-features = false }
|
||||
tauri-build = "2"
|
||||
tauri-plugin = "2"
|
||||
tauri-utils = "2"
|
||||
serde_json = "1"
|
||||
thiserror = "1"
|
||||
thiserror = "2"
|
||||
url = "2"
|
||||
schemars = "0.8"
|
||||
dunce = "1"
|
||||
specta = "=2.0.0-rc.20"
|
||||
glob = "0.3"
|
||||
zbus = "4"
|
||||
#tauri-specta = "=2.0.0-rc.11"
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
authors = ["Tauri Programme within The Commons Conservancy"]
|
||||
license = "Apache-2.0 OR MIT"
|
||||
rust-version = "1.75"
|
||||
rust-version = "1.77.2"
|
||||
repository = "https://github.com/tauri-apps/plugins-workspace"
|
||||
|
||||
# default to small, optimized release binaries
|
||||
|
||||
@@ -1,36 +1,45 @@
|
||||
# Official Tauri Plugins
|
||||
|
||||
This repo and all plugins require a Rust version of at least **1.77.2**
|
||||
|
||||
## Plugins Found Here
|
||||
|
||||
| | | Win | Mac | Lin | iOS | And |
|
||||
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --- | --- | --- | --- |
|
||||
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [barcode-scanner](plugins/barcode-scanner) | Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes. | ? | ? | ? | ✅ | ✅ |
|
||||
| [biometric](plugins/biometric) | Prompt the user for biometric authentication on Android and iOS. | ? | ? | ? | ✅ | ✅ |
|
||||
| [cli](plugins/cli) | Parse arguments from your Command Line Interface | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [cli](plugins/cli) | Parse arguments from your Command Line Interface | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [clipboard-manager](plugins/clipboard-manager) | Read and write to the system clipboard. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [deep-link](plugins/deep-link) | Set your Tauri application as the default handler for an URL. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [dialog](plugins/dialog) | Native system dialogs for opening and saving files along with message dialogs. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [fs](plugins/fs) | Access the file system. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [geolocation](plugins/geolocation) | Get and track current device position. | ? | ? | ? | ✅ | ✅ |
|
||||
| [global-shortcut](plugins/global-shortcut) | Register global shortcuts. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [haptics](plugins/haptics) | Haptic feedback and vibrations. | ? | ? | ? | ✅ | ✅ |
|
||||
| [http](plugins/http) | Access the HTTP client written in Rust. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [localhost](plugins/localhost) | Use a localhost server in production apps. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [nfc](plugins/nfc) | Read and write NFC tags on Android and iOS. | ? | ? | ? | ✅ | ✅ |
|
||||
| [notification](plugins/notification) | Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [opener](plugins/opener) | Open files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [os](plugins/os) | Read information about the operating system. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [process](plugins/process) | This plugin provides APIs to access the current process. To spawn child processes, see the [`shell`](https://github.com/tauri-apps/tauri-plugin-shell) plugin. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [shell](plugins/shell) | Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ? | ✅ | ? | ? |
|
||||
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ✅ |
|
||||
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
|
||||
_This repo and all plugins require a Rust version of at least **1.75**_
|
||||
- ✅: (Partially) Supported
|
||||
- ❌: Not supported
|
||||
- `?` : Unknown/Untested or Planned
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/dist/*
|
||||
!/dist/.gitkeep
|
||||
@@ -1,5 +1,102 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.6]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.1.0`
|
||||
- Upgraded to `biometric-js@2.1.0`
|
||||
- Upgraded to `cli-js@2.1.0`
|
||||
- Upgraded to `clipboard-manager-js@2.1.0`
|
||||
- Upgraded to `dialog-js@2.1.0`
|
||||
- Upgraded to `fs-js@2.1.0`
|
||||
- Upgraded to `global-shortcut-js@2.1.0`
|
||||
- Upgraded to `http-js@2.1.0`
|
||||
- Upgraded to `log-js@2.1.0`
|
||||
- Upgraded to `nfc-js@2.1.0`
|
||||
- Upgraded to `notification-js@2.1.0`
|
||||
- Upgraded to `opener-js@2.1.0`
|
||||
- Upgraded to `os-js@2.1.0`
|
||||
- Upgraded to `process-js@2.1.0`
|
||||
- Upgraded to `shell-js@2.1.0`
|
||||
- Upgraded to `store-js@2.2.0`
|
||||
- Upgraded to `updater-js@2.1.0`
|
||||
|
||||
## \[2.0.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs-js@2.0.4`
|
||||
- Upgraded to `dialog-js@2.0.2`
|
||||
- Upgraded to `http-js@2.0.2`
|
||||
|
||||
## \[2.0.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `log-js@2.0.2`
|
||||
|
||||
## \[2.0.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `clipboard-manager-js@2.0.1`
|
||||
- Upgraded to `log-js@2.0.1`
|
||||
- Upgraded to `fs-js@2.0.3`
|
||||
- Upgraded to `opener-js@2.0.0`
|
||||
|
||||
## \[2.0.2]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs-js@2.0.2`
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog-js@2.0.1`
|
||||
- Upgraded to `fs-js@2.0.1`
|
||||
- Upgraded to `http-js@2.0.1`
|
||||
- Upgraded to `shell-js@2.0.1`
|
||||
- Upgraded to `store-js@2.1.0`
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.0.0`
|
||||
- Upgraded to `biometric-js@2.0.0`
|
||||
- Upgraded to `cli-js@2.0.0`
|
||||
- Upgraded to `clipboard-manager-js@2.0.0`
|
||||
- Upgraded to `fs-js@2.0.0`
|
||||
- Upgraded to `dialog-js@2.0.0`
|
||||
- Upgraded to `global-shortcut-js@2.0.0`
|
||||
- Upgraded to `http-js@2.0.0`
|
||||
- Upgraded to `log-js@2.0.0`
|
||||
- Upgraded to `nfc-js@2.0.0`
|
||||
- Upgraded to `notification-js@2.0.0`
|
||||
- Upgraded to `os-js@2.0.0`
|
||||
- Upgraded to `process-js@2.0.0`
|
||||
- Upgraded to `shell-js@2.0.0`
|
||||
- Upgraded to `store-js@2.0.0`
|
||||
- Upgraded to `updater-js@2.0.0`
|
||||
|
||||
## \[2.0.0-rc.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `store-js@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner-js@2.0.0-rc.2`
|
||||
- Upgraded to `clipboard-manager-js@2.0.0-rc.2`
|
||||
|
||||
## \[2.0.0-rc.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
Vendored
+30
-26
@@ -1,40 +1,44 @@
|
||||
{
|
||||
"name": "svelte-app",
|
||||
"name": "api",
|
||||
"private": true,
|
||||
"version": "2.0.0-rc.3",
|
||||
"version": "2.0.6",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --clearScreen false",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview"
|
||||
"serve": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-rc.4",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-biometric": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-cli": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-http": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-nfc": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-notification": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-os": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-process": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-shell": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-store": "2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-updater": "2.0.0-rc.2",
|
||||
"@zerodevx/svelte-json-view": "1.0.10"
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.1.0",
|
||||
"@tauri-apps/plugin-biometric": "2.1.0",
|
||||
"@tauri-apps/plugin-cli": "2.1.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.1.0",
|
||||
"@tauri-apps/plugin-dialog": "2.1.0",
|
||||
"@tauri-apps/plugin-fs": "2.1.0",
|
||||
"@tauri-apps/plugin-geolocation": "2.0.0",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.1.0",
|
||||
"@tauri-apps/plugin-opener": "2.1.0",
|
||||
"@tauri-apps/plugin-haptics": "2.0.0",
|
||||
"@tauri-apps/plugin-http": "2.1.0",
|
||||
"@tauri-apps/plugin-nfc": "2.1.0",
|
||||
"@tauri-apps/plugin-notification": "2.1.0",
|
||||
"@tauri-apps/plugin-os": "2.1.0",
|
||||
"@tauri-apps/plugin-process": "2.1.0",
|
||||
"@tauri-apps/plugin-shell": "2.1.0",
|
||||
"@tauri-apps/plugin-store": "2.2.0",
|
||||
"@tauri-apps/plugin-updater": "2.1.0",
|
||||
"@zerodevx/svelte-json-view": "1.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/codicon": "^1.1.37",
|
||||
"@iconify-json/ph": "^1.1.8",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||
"@tauri-apps/cli": "2.0.0-rc.12",
|
||||
"@unocss/extractor-svelte": "^0.62.0",
|
||||
"svelte": "^4.2.19",
|
||||
"unocss": "^0.62.0",
|
||||
"vite": "^5.0.13"
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@unocss/extractor-svelte": "^0.65.0",
|
||||
"svelte": "^5.0.0",
|
||||
"unocss": "^0.65.0",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,163 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.9]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.1.0`
|
||||
- Upgraded to `biometric@2.1.0`
|
||||
- Upgraded to `cli@2.1.0`
|
||||
- Upgraded to `clipboard-manager@2.1.0`
|
||||
- Upgraded to `dialog@2.1.0`
|
||||
- Upgraded to `fs@2.2.0`
|
||||
- Upgraded to `geolocation@2.1.0`
|
||||
- Upgraded to `global-shortcut@2.1.0`
|
||||
- Upgraded to `haptics@2.1.0`
|
||||
- Upgraded to `http@2.1.0`
|
||||
- Upgraded to `log@2.1.0`
|
||||
- Upgraded to `nfc@2.1.0`
|
||||
- Upgraded to `notification@2.1.0`
|
||||
- Upgraded to `opener@2.1.0`
|
||||
- Upgraded to `os@2.1.0`
|
||||
- Upgraded to `process@2.1.0`
|
||||
- Upgraded to `shell@2.1.0`
|
||||
- Upgraded to `store@2.2.0`
|
||||
- Upgraded to `updater@2.2.0`
|
||||
|
||||
## \[2.0.8]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.1.1`
|
||||
- Upgraded to `dialog@2.0.5`
|
||||
- Upgraded to `http@2.0.5`
|
||||
|
||||
## \[2.0.7]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `log@2.0.4`
|
||||
|
||||
## \[2.0.6]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.1.0`
|
||||
- Upgraded to `updater@2.1.0`
|
||||
- Upgraded to `dialog@2.0.4`
|
||||
- Upgraded to `log-plugin@2.0.3`
|
||||
- Upgraded to `http@2.0.4`
|
||||
- Upgraded to `opener@2.0.0`
|
||||
|
||||
## \[2.0.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `clipboard-manager@2.0.2`
|
||||
- Upgraded to `log-plugin@2.0.2`
|
||||
|
||||
## \[2.0.4]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `fs@2.0.3`
|
||||
- Upgraded to `dialog@2.0.3`
|
||||
- Upgraded to `http@2.0.3`
|
||||
|
||||
## \[2.0.3]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog@2.0.2`
|
||||
- Upgraded to `fs@2.0.2`
|
||||
- Upgraded to `http@2.0.2`
|
||||
- Upgraded to `shell@2.0.2`
|
||||
- Upgraded to `store@2.1.0`
|
||||
|
||||
## \[2.0.2]
|
||||
|
||||
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.1`
|
||||
- Upgraded to `biometric@2.0.1`
|
||||
- Upgraded to `cli@2.0.1`
|
||||
- Upgraded to `clipboard-manager@2.0.1`
|
||||
- Upgraded to `fs@2.0.1`
|
||||
- Upgraded to `dialog@2.0.1`
|
||||
- Upgraded to `geolocation@2.0.1`
|
||||
- Upgraded to `global-shortcut@2.0.1`
|
||||
- Upgraded to `haptics@2.0.1`
|
||||
- Upgraded to `http@2.0.1`
|
||||
- Upgraded to `log-plugin@2.0.1`
|
||||
- Upgraded to `nfc@2.0.1`
|
||||
- Upgraded to `notification@2.0.1`
|
||||
- Upgraded to `os@2.0.1`
|
||||
- Upgraded to `process@2.0.1`
|
||||
- Upgraded to `shell@2.0.1`
|
||||
- Upgraded to `store@2.0.1`
|
||||
- Upgraded to `updater@2.0.2`
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `updater@2.0.1`
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `barcode-scanner@2.0.0`
|
||||
- Upgraded to `biometric@2.0.0`
|
||||
- Upgraded to `cli@2.0.0`
|
||||
- Upgraded to `clipboard-manager@2.0.0`
|
||||
- Upgraded to `fs@2.0.0`
|
||||
- Upgraded to `dialog@2.0.0`
|
||||
- Upgraded to `global-shortcut@2.0.0`
|
||||
- Upgraded to `http@2.0.0`
|
||||
- Upgraded to `log-plugin@2.0.0`
|
||||
- Upgraded to `nfc@2.0.0`
|
||||
- Upgraded to `notification@2.0.0`
|
||||
- Upgraded to `os@2.0.0`
|
||||
- Upgraded to `process@2.0.0`
|
||||
- Upgraded to `shell@2.0.0`
|
||||
- Upgraded to `store@2.0.0`
|
||||
- Upgraded to `updater@2.0.0`
|
||||
|
||||
## \[2.0.0-rc.8]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `cli@2.0.0-rc.2`
|
||||
- Upgraded to `dialog@2.0.0-rc.8`
|
||||
- Upgraded to `fs@2.0.0-rc.6`
|
||||
- Upgraded to `shell@2.0.0-rc.4`
|
||||
- Upgraded to `store@2.0.0-rc.4`
|
||||
- Upgraded to `updater@2.0.0-rc.4`
|
||||
- Upgraded to `http@2.0.0-rc.6`
|
||||
|
||||
## \[2.0.0-rc.7]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `clipboard-manager@2.0.0-rc.4`
|
||||
- Upgraded to `fs@2.0.0-rc.5`
|
||||
- Upgraded to `notification@2.0.0-rc.5`
|
||||
- Upgraded to `dialog@2.0.0-rc.7`
|
||||
- Upgraded to `http@2.0.0-rc.5`
|
||||
|
||||
## \[2.0.0-rc.6]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `dialog@2.0.0-rc.6`
|
||||
- Upgraded to `fs@2.0.0-rc.4`
|
||||
- Upgraded to `http@2.0.0-rc.4`
|
||||
|
||||
## \[2.0.0-rc.5]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "api"
|
||||
publish = false
|
||||
version = "2.0.0-rc.5"
|
||||
version = "2.0.9"
|
||||
description = "An example Tauri Application showcasing the api"
|
||||
edition = "2021"
|
||||
rust-version = { workspace = true }
|
||||
@@ -19,22 +19,23 @@ serde_json = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
tiny_http = "0.12"
|
||||
log = { workspace = true }
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.3", features = [
|
||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.1.0" }
|
||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.2.0", features = [
|
||||
"watch",
|
||||
] }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.5" }
|
||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.1.0" }
|
||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.1.0" }
|
||||
tauri-plugin-http = { path = "../../../plugins/http", features = [
|
||||
"multipart",
|
||||
], version = "2.0.0-rc.3" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.4", features = [
|
||||
], version = "2.1.0" }
|
||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.1.0", features = [
|
||||
"windows7-compat",
|
||||
] }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.1.0" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.1.0" }
|
||||
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.1.0" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.1.0" }
|
||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.2.0" }
|
||||
|
||||
[dependencies.tauri]
|
||||
workspace = true
|
||||
@@ -50,17 +51,17 @@ features = [
|
||||
]
|
||||
|
||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-rc.1" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-rc.2" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.1.0" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.1.0" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.2.0" }
|
||||
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.0.0" }
|
||||
|
||||
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.4" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.3" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.3" }
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies]
|
||||
window-shadows = "0.2"
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.1.0" }
|
||||
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.1.0" }
|
||||
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.1.0" }
|
||||
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.1.0" }
|
||||
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.1.0" }
|
||||
|
||||
[features]
|
||||
prod = ["tauri/custom-protocol"]
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"shell:allow-open",
|
||||
"shell:allow-kill",
|
||||
"shell:allow-stdin-write",
|
||||
"process:allow-exit",
|
||||
@@ -79,10 +80,11 @@
|
||||
],
|
||||
"deny": ["$APPDATA/db/*.stronghold"]
|
||||
},
|
||||
"store:allow-entries",
|
||||
"store:allow-get",
|
||||
"store:allow-set",
|
||||
"store:allow-save",
|
||||
"store:allow-load"
|
||||
"store:default",
|
||||
"opener:default",
|
||||
{
|
||||
"identifier": "opener:allow-open-path",
|
||||
"allow": [{ "path": "$APPDATA" }, { "path": "$APPDATA/**" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
"updater:default",
|
||||
"global-shortcut:allow-unregister",
|
||||
"global-shortcut:allow-register",
|
||||
"global-shortcut:allow-unregister-all"
|
||||
"global-shortcut:allow-unregister-all",
|
||||
{ "identifier": "fs:allow-watch", "allow": ["*", "**/*"] },
|
||||
"fs:allow-unwatch"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
"barcode-scanner:allow-scan",
|
||||
"barcode-scanner:allow-cancel",
|
||||
"barcode-scanner:allow-request-permissions",
|
||||
"barcode-scanner:allow-check-permissions"
|
||||
"barcode-scanner:allow-check-permissions",
|
||||
"geolocation:allow-check-permissions",
|
||||
"geolocation:allow-request-permissions",
|
||||
"geolocation:allow-watch-position",
|
||||
"geolocation:allow-get-current-position",
|
||||
"haptics:allow-impact-feedback",
|
||||
"haptics:allow-notification-feedback",
|
||||
"haptics:allow-selection-feedback",
|
||||
"haptics:allow-vibrate"
|
||||
]
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
@@ -18,7 +19,7 @@
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.7/mobile/android" />
|
||||
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.2/mobile/android" />
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/buildSrc" />
|
||||
@@ -27,6 +28,8 @@
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/clipboard-manager/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/dialog/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/fs/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/geolocation/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/haptics/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/nfc/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/notification/android" />
|
||||
<option value="$PROJECT_DIR$/../../../../../plugins/shell/android" />
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_notification::init())
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_store::Builder::default().build())
|
||||
.setup(move |app| {
|
||||
@@ -45,6 +46,8 @@ pub fn run() {
|
||||
app.handle().plugin(tauri_plugin_cli::init())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_window_state::Builder::new().build())?;
|
||||
app.handle()
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())?;
|
||||
}
|
||||
@@ -53,6 +56,8 @@ pub fn run() {
|
||||
app.handle().plugin(tauri_plugin_barcode_scanner::init())?;
|
||||
app.handle().plugin(tauri_plugin_nfc::init())?;
|
||||
app.handle().plugin(tauri_plugin_biometric::init())?;
|
||||
app.handle().plugin(tauri_plugin_geolocation::init())?;
|
||||
app.handle().plugin(tauri_plugin_haptics::init())?;
|
||||
}
|
||||
|
||||
let mut webview_window_builder =
|
||||
@@ -64,7 +69,7 @@ pub fn run() {
|
||||
.title("Tauri API Validation")
|
||||
.inner_size(1000., 800.)
|
||||
.min_inner_size(600., 400.)
|
||||
.content_protected(true);
|
||||
.visible(false);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "Tauri API",
|
||||
"version": "2.0.0",
|
||||
"identifier": "com.tauri.api",
|
||||
|
||||
+222
-205
@@ -1,206 +1,222 @@
|
||||
<script>
|
||||
import { writable } from "svelte/store";
|
||||
import { open } from "@tauri-apps/plugin-shell";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { getCurrentWebview } from "@tauri-apps/api/webview";
|
||||
import * as os from "@tauri-apps/plugin-os";
|
||||
import { writable } from 'svelte/store'
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window'
|
||||
import { getCurrentWebview } from '@tauri-apps/api/webview'
|
||||
import * as os from '@tauri-apps/plugin-os'
|
||||
|
||||
import Welcome from "./views/Welcome.svelte";
|
||||
import Cli from "./views/Cli.svelte";
|
||||
import Communication from "./views/Communication.svelte";
|
||||
import Dialog from "./views/Dialog.svelte";
|
||||
import FileSystem from "./views/FileSystem.svelte";
|
||||
import Http from "./views/Http.svelte";
|
||||
import Notifications from "./views/Notifications.svelte";
|
||||
import Shortcuts from "./views/Shortcuts.svelte";
|
||||
import Shell from "./views/Shell.svelte";
|
||||
import Store from "./views/Store.svelte";
|
||||
import Updater from "./views/Updater.svelte";
|
||||
import Clipboard from "./views/Clipboard.svelte";
|
||||
import WebRTC from "./views/WebRTC.svelte";
|
||||
import Scanner from "./views/Scanner.svelte";
|
||||
import Biometric from "./views/Biometric.svelte";
|
||||
import Welcome from './views/Welcome.svelte'
|
||||
import Cli from './views/Cli.svelte'
|
||||
import Communication from './views/Communication.svelte'
|
||||
import Dialog from './views/Dialog.svelte'
|
||||
import FileSystem from './views/FileSystem.svelte'
|
||||
import Http from './views/Http.svelte'
|
||||
import Notifications from './views/Notifications.svelte'
|
||||
import Shortcuts from './views/Shortcuts.svelte'
|
||||
import Shell from './views/Shell.svelte'
|
||||
import Opener from './views/Opener.svelte'
|
||||
import Store from './views/Store.svelte'
|
||||
import Updater from './views/Updater.svelte'
|
||||
import Clipboard from './views/Clipboard.svelte'
|
||||
import WebRTC from './views/WebRTC.svelte'
|
||||
import Scanner from './views/Scanner.svelte'
|
||||
import Biometric from './views/Biometric.svelte'
|
||||
import Geolocation from './views/Geolocation.svelte'
|
||||
import Haptics from './views/Haptics.svelte'
|
||||
|
||||
import { onMount, tick } from "svelte";
|
||||
import { ask } from "@tauri-apps/plugin-dialog";
|
||||
import Nfc from "./views/Nfc.svelte";
|
||||
import { onMount, tick } from 'svelte'
|
||||
import { ask } from '@tauri-apps/plugin-dialog'
|
||||
import Nfc from './views/Nfc.svelte'
|
||||
|
||||
const appWindow = getCurrentWindow();
|
||||
const appWindow = getCurrentWindow()
|
||||
|
||||
if (appWindow.label !== "main") {
|
||||
if (appWindow.label !== 'main') {
|
||||
appWindow.onCloseRequested(async (event) => {
|
||||
const confirmed = await confirm("Are you sure?");
|
||||
const confirmed = await confirm('Are you sure?')
|
||||
if (!confirmed) {
|
||||
// user did not confirm closing the window; let's prevent it
|
||||
event.preventDefault();
|
||||
event.preventDefault()
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
getCurrentWebview().onDragDropEvent((event) => {
|
||||
onMessage(`File drop: ${JSON.stringify(event.payload)}`);
|
||||
});
|
||||
onMessage(`File drop: ${JSON.stringify(event.payload)}`)
|
||||
})
|
||||
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
const isMobile =
|
||||
userAgent.includes("android") || userAgent.includes("iphone");
|
||||
const userAgent = navigator.userAgent.toLowerCase()
|
||||
const isMobile = userAgent.includes('android') || userAgent.includes('iphone')
|
||||
|
||||
const views = [
|
||||
{
|
||||
label: "Welcome",
|
||||
label: 'Welcome',
|
||||
component: Welcome,
|
||||
icon: "i-ph-hand-waving",
|
||||
icon: 'i-ph-hand-waving'
|
||||
},
|
||||
{
|
||||
label: "Communication",
|
||||
label: 'Communication',
|
||||
component: Communication,
|
||||
icon: "i-codicon-radio-tower",
|
||||
icon: 'i-codicon-radio-tower'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "CLI",
|
||||
label: 'CLI',
|
||||
component: Cli,
|
||||
icon: "i-codicon-terminal",
|
||||
icon: 'i-codicon-terminal'
|
||||
},
|
||||
{
|
||||
label: "Dialog",
|
||||
label: 'Dialog',
|
||||
component: Dialog,
|
||||
icon: "i-codicon-multiple-windows",
|
||||
icon: 'i-codicon-multiple-windows'
|
||||
},
|
||||
{
|
||||
label: "File system",
|
||||
label: 'File system',
|
||||
component: FileSystem,
|
||||
icon: "i-codicon-files",
|
||||
icon: 'i-codicon-files'
|
||||
},
|
||||
{
|
||||
label: "HTTP",
|
||||
label: 'HTTP',
|
||||
component: Http,
|
||||
icon: "i-ph-globe-hemisphere-west",
|
||||
icon: 'i-ph-globe-hemisphere-west'
|
||||
},
|
||||
{
|
||||
label: "Notifications",
|
||||
label: 'Notifications',
|
||||
component: Notifications,
|
||||
icon: "i-codicon-bell-dot",
|
||||
icon: 'i-codicon-bell-dot'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Shortcuts",
|
||||
label: 'Shortcuts',
|
||||
component: Shortcuts,
|
||||
icon: "i-codicon-record-keys",
|
||||
icon: 'i-codicon-record-keys'
|
||||
},
|
||||
{
|
||||
label: "Shell",
|
||||
label: 'Shell',
|
||||
component: Shell,
|
||||
icon: "i-codicon-terminal-bash",
|
||||
icon: 'i-codicon-terminal-bash'
|
||||
},
|
||||
{
|
||||
label: "Store",
|
||||
label: 'Opener',
|
||||
component: Opener,
|
||||
icon: 'i-codicon-link-external'
|
||||
},
|
||||
{
|
||||
label: 'Store',
|
||||
component: Store,
|
||||
icon: "i-codicon-file-code",
|
||||
icon: 'i-codicon-file-code'
|
||||
},
|
||||
!isMobile && {
|
||||
label: "Updater",
|
||||
label: 'Updater',
|
||||
component: Updater,
|
||||
icon: "i-codicon-cloud-download",
|
||||
icon: 'i-codicon-cloud-download'
|
||||
},
|
||||
{
|
||||
label: "Clipboard",
|
||||
label: 'Clipboard',
|
||||
component: Clipboard,
|
||||
icon: "i-codicon-clippy",
|
||||
icon: 'i-codicon-clippy'
|
||||
},
|
||||
{
|
||||
label: "WebRTC",
|
||||
label: 'WebRTC',
|
||||
component: WebRTC,
|
||||
icon: "i-ph-broadcast",
|
||||
icon: 'i-ph-broadcast'
|
||||
},
|
||||
isMobile && {
|
||||
label: "Scanner",
|
||||
label: 'Scanner',
|
||||
component: Scanner,
|
||||
icon: "i-ph-scan",
|
||||
icon: 'i-ph-scan'
|
||||
},
|
||||
isMobile && {
|
||||
label: "NFC",
|
||||
label: 'NFC',
|
||||
component: Nfc,
|
||||
icon: "i-ph-nfc",
|
||||
icon: 'i-ph-nfc'
|
||||
},
|
||||
isMobile && {
|
||||
label: "Biometric",
|
||||
label: 'Biometric',
|
||||
component: Biometric,
|
||||
icon: "i-ph-scan",
|
||||
icon: 'i-ph-scan'
|
||||
},
|
||||
];
|
||||
isMobile && {
|
||||
label: 'Geolocation',
|
||||
component: Geolocation,
|
||||
icon: 'i-ph-map-pin'
|
||||
},
|
||||
isMobile && {
|
||||
label: 'Haptics',
|
||||
component: Haptics,
|
||||
icon: 'i-ph-vibrate'
|
||||
}
|
||||
]
|
||||
|
||||
let selected = views[0];
|
||||
let selected = views[0]
|
||||
function select(view) {
|
||||
selected = view;
|
||||
selected = view
|
||||
}
|
||||
|
||||
// Window controls
|
||||
let isWindowMaximized;
|
||||
let isWindowMaximized
|
||||
onMount(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
isWindowMaximized = await appWindow.isMaximized()
|
||||
appWindow.onResized(async () => {
|
||||
isWindowMaximized = await appWindow.isMaximized();
|
||||
});
|
||||
});
|
||||
isWindowMaximized = await appWindow.isMaximized()
|
||||
})
|
||||
})
|
||||
|
||||
function minimize() {
|
||||
appWindow.minimize();
|
||||
appWindow.minimize()
|
||||
}
|
||||
|
||||
async function toggleMaximize() {
|
||||
(await appWindow.isMaximized())
|
||||
;(await appWindow.isMaximized())
|
||||
? appWindow.unmaximize()
|
||||
: appWindow.maximize();
|
||||
: appWindow.maximize()
|
||||
}
|
||||
|
||||
let confirmed_close = false;
|
||||
let confirmed_close = false
|
||||
async function close() {
|
||||
if (!confirmed_close) {
|
||||
confirmed_close = await ask(
|
||||
"Are you sure that you want to close this window?",
|
||||
'Are you sure that you want to close this window?',
|
||||
{
|
||||
title: "Tauri API",
|
||||
title: 'Tauri API'
|
||||
}
|
||||
);
|
||||
)
|
||||
if (confirmed_close) {
|
||||
appWindow.close();
|
||||
appWindow.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dark/light
|
||||
let isDark;
|
||||
let isDark
|
||||
onMount(() => {
|
||||
isDark = localStorage && localStorage.getItem("theme") == "dark";
|
||||
applyTheme(isDark);
|
||||
});
|
||||
isDark = localStorage && localStorage.getItem('theme') == 'dark'
|
||||
applyTheme(isDark)
|
||||
})
|
||||
function applyTheme(isDark) {
|
||||
const html = document.querySelector("html");
|
||||
isDark ? html.classList.add("dark") : html.classList.remove("dark");
|
||||
localStorage && localStorage.setItem("theme", isDark ? "dark" : "");
|
||||
const html = document.querySelector('html')
|
||||
isDark ? html.classList.add('dark') : html.classList.remove('dark')
|
||||
localStorage && localStorage.setItem('theme', isDark ? 'dark' : '')
|
||||
}
|
||||
function toggleDark() {
|
||||
isDark = !isDark;
|
||||
applyTheme(isDark);
|
||||
isDark = !isDark
|
||||
applyTheme(isDark)
|
||||
}
|
||||
|
||||
// Console
|
||||
let messages = writable([]);
|
||||
let consoleTextEl;
|
||||
let messages = writable([])
|
||||
let consoleTextEl
|
||||
async function onMessage(value) {
|
||||
messages.update((r) => [
|
||||
...r,
|
||||
{
|
||||
html:
|
||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
||||
(typeof value === "string" ? value : JSON.stringify(value, null, 1)) +
|
||||
"</pre>",
|
||||
},
|
||||
]);
|
||||
await tick();
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
|
||||
(typeof value === 'string' ? value : JSON.stringify(value, null, 1)) +
|
||||
'</pre>'
|
||||
}
|
||||
])
|
||||
await tick()
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||
}
|
||||
|
||||
// this function is renders HTML without sanitizing it so it's insecure
|
||||
// this function renders HTML without sanitizing it so it's insecure
|
||||
// we only use it with our own input data
|
||||
async function insecureRenderHtml(html) {
|
||||
messages.update((r) => [
|
||||
@@ -209,111 +225,109 @@
|
||||
html:
|
||||
`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> ` +
|
||||
html +
|
||||
"</pre>",
|
||||
},
|
||||
]);
|
||||
await tick();
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight;
|
||||
'</pre>'
|
||||
}
|
||||
])
|
||||
await tick()
|
||||
if (consoleTextEl) consoleTextEl.scrollTop = consoleTextEl.scrollHeight
|
||||
}
|
||||
|
||||
function clear() {
|
||||
messages.update(() => []);
|
||||
messages.update(() => [])
|
||||
}
|
||||
|
||||
let consoleEl, consoleH, cStartY;
|
||||
let minConsoleHeight = 50;
|
||||
let consoleEl, consoleH, cStartY
|
||||
let minConsoleHeight = 50
|
||||
function startResizingConsole(e) {
|
||||
cStartY = e.clientY;
|
||||
cStartY = e.clientY
|
||||
|
||||
const styles = window.getComputedStyle(consoleEl);
|
||||
consoleH = parseInt(styles.height, 10);
|
||||
const styles = window.getComputedStyle(consoleEl)
|
||||
consoleH = parseInt(styles.height, 10)
|
||||
|
||||
const moveHandler = (e) => {
|
||||
const dy = e.clientY - cStartY;
|
||||
const newH = consoleH - dy;
|
||||
const dy = e.clientY - cStartY
|
||||
const newH = consoleH - dy
|
||||
consoleEl.style.height = `${
|
||||
newH < minConsoleHeight ? minConsoleHeight : newH
|
||||
}px`;
|
||||
};
|
||||
}px`
|
||||
}
|
||||
const upHandler = () => {
|
||||
document.removeEventListener("mouseup", upHandler);
|
||||
document.removeEventListener("mousemove", moveHandler);
|
||||
};
|
||||
document.addEventListener("mouseup", upHandler);
|
||||
document.addEventListener("mousemove", moveHandler);
|
||||
document.removeEventListener('mouseup', upHandler)
|
||||
document.removeEventListener('mousemove', moveHandler)
|
||||
}
|
||||
document.addEventListener('mouseup', upHandler)
|
||||
document.addEventListener('mousemove', moveHandler)
|
||||
}
|
||||
|
||||
let isWindows;
|
||||
let isWindows
|
||||
onMount(async () => {
|
||||
isWindows = (await os.platform()) === "windows";
|
||||
});
|
||||
isWindows = (await os.platform()) === 'windows'
|
||||
})
|
||||
|
||||
// mobile
|
||||
let isSideBarOpen = false;
|
||||
let sidebar;
|
||||
let sidebarToggle;
|
||||
let isDraggingSideBar = false;
|
||||
let draggingStartPosX = 0;
|
||||
let draggingEndPosX = 0;
|
||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max);
|
||||
let isSideBarOpen = false
|
||||
let sidebar
|
||||
let sidebarToggle
|
||||
let isDraggingSideBar = false
|
||||
let draggingStartPosX = 0
|
||||
let draggingEndPosX = 0
|
||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max)
|
||||
|
||||
function toggleSidebar(sidebar, isSideBarOpen) {
|
||||
sidebar.style.setProperty(
|
||||
"--translate-x",
|
||||
`${isSideBarOpen ? "0" : "-18.75"}rem`
|
||||
);
|
||||
'--translate-x',
|
||||
`${isSideBarOpen ? '0' : '-18.75'}rem`
|
||||
)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
sidebar = document.querySelector("#sidebar");
|
||||
sidebarToggle = document.querySelector("#sidebarToggle");
|
||||
sidebar = document.querySelector('#sidebar')
|
||||
sidebarToggle = document.querySelector('#sidebarToggle')
|
||||
|
||||
document.addEventListener("click", (e) => {
|
||||
document.addEventListener('click', (e) => {
|
||||
if (sidebarToggle.contains(e.target)) {
|
||||
isSideBarOpen = !isSideBarOpen;
|
||||
isSideBarOpen = !isSideBarOpen
|
||||
} else if (isSideBarOpen && !sidebar.contains(e.target)) {
|
||||
isSideBarOpen = false;
|
||||
isSideBarOpen = false
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchstart", (e) => {
|
||||
if (sidebarToggle.contains(e.target)) return;
|
||||
document.addEventListener('touchstart', (e) => {
|
||||
if (sidebarToggle.contains(e.target)) return
|
||||
|
||||
const x = e.touches[0].clientX;
|
||||
const x = e.touches[0].clientX
|
||||
if ((0 < x && x < 20 && !isSideBarOpen) || isSideBarOpen) {
|
||||
isDraggingSideBar = true;
|
||||
draggingStartPosX = x;
|
||||
isDraggingSideBar = true
|
||||
draggingStartPosX = x
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchmove", (e) => {
|
||||
document.addEventListener('touchmove', (e) => {
|
||||
if (isDraggingSideBar) {
|
||||
const x = e.touches[0].clientX;
|
||||
draggingEndPosX = x;
|
||||
const delta = (x - draggingStartPosX) / 10;
|
||||
const x = e.touches[0].clientX
|
||||
draggingEndPosX = x
|
||||
const delta = (x - draggingStartPosX) / 10
|
||||
sidebar.style.setProperty(
|
||||
"--translate-x",
|
||||
'--translate-x',
|
||||
`-${clamp(0, isSideBarOpen ? 0 - delta : 18.75 - delta, 18.75)}rem`
|
||||
);
|
||||
)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
document.addEventListener("touchend", () => {
|
||||
document.addEventListener('touchend', () => {
|
||||
if (isDraggingSideBar) {
|
||||
const delta = (draggingEndPosX - draggingStartPosX) / 10;
|
||||
isSideBarOpen = isSideBarOpen
|
||||
? delta > -(18.75 / 2)
|
||||
: delta > 18.75 / 2;
|
||||
const delta = (draggingEndPosX - draggingStartPosX) / 10
|
||||
isSideBarOpen = isSideBarOpen ? delta > -(18.75 / 2) : delta > 18.75 / 2
|
||||
}
|
||||
|
||||
isDraggingSideBar = false;
|
||||
});
|
||||
});
|
||||
isDraggingSideBar = false
|
||||
})
|
||||
})
|
||||
|
||||
$: {
|
||||
const sidebar = document.querySelector("#sidebar");
|
||||
const sidebar = document.querySelector('#sidebar')
|
||||
if (sidebar) {
|
||||
toggleSidebar(sidebar, isSideBarOpen);
|
||||
toggleSidebar(sidebar, isSideBarOpen)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -331,42 +345,46 @@
|
||||
children:h-100% children:w-12 children:inline-flex
|
||||
children:items-center children:justify-center"
|
||||
>
|
||||
<span
|
||||
title={isDark ? "Switch to Light mode" : "Switch to Dark mode"}
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
<button
|
||||
aria-label="Toggle dark mode"
|
||||
title={isDark ? 'Switch to Light mode' : 'Switch to Dark mode'}
|
||||
class="bg-inherit border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={toggleDark}
|
||||
>
|
||||
{#if isDark}
|
||||
<div class="i-ph-sun" />
|
||||
<div class="i-ph-sun"></div>
|
||||
{:else}
|
||||
<div class="i-ph-moon" />
|
||||
<div class="i-ph-moon"></div>
|
||||
{/if}
|
||||
</span>
|
||||
<span
|
||||
</button>
|
||||
<button
|
||||
aria-label="Minimize window"
|
||||
title="Minimize"
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
class="bg-inherit border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={minimize}
|
||||
>
|
||||
<div class="i-codicon-chrome-minimize" />
|
||||
</span>
|
||||
<span
|
||||
title={isWindowMaximized ? "Restore" : "Maximize"}
|
||||
class="hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
<div class="i-codicon-chrome-minimize"></div>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Maximize window"
|
||||
title={isWindowMaximized ? 'Restore' : 'Maximize'}
|
||||
class="bg-inherit border-none hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"
|
||||
on:click={toggleMaximize}
|
||||
>
|
||||
{#if isWindowMaximized}
|
||||
<div class="i-codicon-chrome-restore" />
|
||||
<div class="i-codicon-chrome-restore"></div>
|
||||
{:else}
|
||||
<div class="i-codicon-chrome-maximize" />
|
||||
<div class="i-codicon-chrome-maximize"></div>
|
||||
{/if}
|
||||
</span>
|
||||
<span
|
||||
</button>
|
||||
<button
|
||||
aria-label="Close window"
|
||||
title="Close"
|
||||
class="hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText"
|
||||
class="bg-inherit border-none hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText"
|
||||
on:click={close}
|
||||
>
|
||||
<div class="i-codicon-chrome-close" />
|
||||
</span>
|
||||
<div class="i-codicon-chrome-close"></div>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -374,13 +392,13 @@
|
||||
<!-- Sidebar toggle, only visible on small screens -->
|
||||
<div
|
||||
id="sidebarToggle"
|
||||
class="z-2000 sidebar-toggle display-none lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
|
||||
class="z-2000 sidebar-toggle hidden lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8
|
||||
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
|
||||
>
|
||||
{#if isSideBarOpen}
|
||||
<span class="i-codicon-close animate-duration-300ms animate-fade-in" />
|
||||
<span class="i-codicon-close animate-duration-300ms animate-fade-in"></span>
|
||||
{:else}
|
||||
<span class="i-codicon-menu animate-duration-300ms animate-fade-in" />
|
||||
<span class="i-codicon-menu animate-duration-300ms animate-fade-in"></span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -392,24 +410,21 @@
|
||||
class="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999
|
||||
bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"
|
||||
>
|
||||
<img
|
||||
on:click={() => open("https://tauri.app/")}
|
||||
class="self-center p-7 cursor-pointer"
|
||||
src="tauri_logo.png"
|
||||
alt="Tauri logo"
|
||||
/>
|
||||
<a href="https://tauri.app" target="_blank">
|
||||
<img class="p-7" src="tauri_logo.png" alt="Tauri logo" />
|
||||
</a>
|
||||
{#if !isWindows}
|
||||
<a href="##" class="nv justify-between h-8" on:click={toggleDark}>
|
||||
{#if isDark}
|
||||
Switch to Light mode
|
||||
<div class="i-ph-sun" />
|
||||
<div class="i-ph-sun"></div>
|
||||
{:else}
|
||||
Switch to Dark mode
|
||||
<div class="i-ph-moon" />
|
||||
<div class="i-ph-moon"></div>
|
||||
{/if}
|
||||
</a>
|
||||
<br />
|
||||
<div class="bg-white/5 h-2px" />
|
||||
<div class="bg-white/5 h-2px"></div>
|
||||
<br />
|
||||
{/if}
|
||||
|
||||
@@ -419,7 +434,7 @@
|
||||
href="https://tauri.app/v1/guides/"
|
||||
>
|
||||
Documentation
|
||||
<span class="i-codicon-link-external" />
|
||||
<span class="i-codicon-link-external"></span>
|
||||
</a>
|
||||
<a
|
||||
class="nv justify-between h-8"
|
||||
@@ -427,7 +442,7 @@
|
||||
href="https://github.com/tauri-apps/tauri"
|
||||
>
|
||||
GitHub
|
||||
<span class="i-codicon-link-external" />
|
||||
<span class="i-codicon-link-external"></span>
|
||||
</a>
|
||||
<a
|
||||
class="nv justify-between h-8"
|
||||
@@ -435,10 +450,10 @@
|
||||
href="https://github.com/tauri-apps/tauri/tree/dev/examples/api"
|
||||
>
|
||||
Source
|
||||
<span class="i-codicon-link-external" />
|
||||
<span class="i-codicon-link-external"></span>
|
||||
</a>
|
||||
<br />
|
||||
<div class="bg-white/5 h-2px" />
|
||||
<div class="bg-white/5 h-2px"></div>
|
||||
<br />
|
||||
<div
|
||||
class="flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"
|
||||
@@ -449,11 +464,11 @@
|
||||
href="##"
|
||||
class="nv {selected === view ? 'nv_selected' : ''}"
|
||||
on:click={() => {
|
||||
select(view);
|
||||
isSideBarOpen = false;
|
||||
select(view)
|
||||
isSideBarOpen = false
|
||||
}}
|
||||
>
|
||||
<div class="{view.icon} mr-2" />
|
||||
<div class="{view.icon} mr-2"></div>
|
||||
<p>{view.label}</p></a
|
||||
>
|
||||
{/if}
|
||||
@@ -482,21 +497,23 @@
|
||||
id="console"
|
||||
class="select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"
|
||||
>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
on:mousedown={startResizingConsole}
|
||||
class="bg-black/20 h-2px cursor-ns-resize"
|
||||
/>
|
||||
></div>
|
||||
<div class="flex justify-between items-center px-2">
|
||||
<p class="font-semibold">Console</p>
|
||||
<div
|
||||
class="cursor-pointer h-85% rd-1 p-1 flex justify-center items-center
|
||||
<button
|
||||
aria-label="Clear Console"
|
||||
class="cursor-pointer h-85% rd-1 p-1 flex justify-center items-center border-none bg-inherit
|
||||
hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay
|
||||
active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25
|
||||
"
|
||||
on:click={clear}
|
||||
>
|
||||
<div class="i-codicon-clear-all" />
|
||||
</div>
|
||||
<div class="i-codicon-clear-all"></div>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
bind:this={consoleTextEl}
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
import 'uno.css'
|
||||
import './app.css'
|
||||
import App from './App.svelte'
|
||||
import { mount } from 'svelte'
|
||||
|
||||
const app = new App({
|
||||
const app = mount(App, {
|
||||
target: document.querySelector('#app')
|
||||
})
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script>
|
||||
import { getMatches } from "@tauri-apps/plugin-cli";
|
||||
import { getMatches } from '@tauri-apps/plugin-cli'
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
function cliMatches() {
|
||||
getMatches().then(onMessage).catch(onMessage);
|
||||
getMatches().then(onMessage).catch(onMessage)
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>
|
||||
<div>
|
||||
This binary can be run from the terminal and takes the following arguments:
|
||||
<code class="code-block flex flex-wrap my-2">
|
||||
<pre>
|
||||
@@ -17,7 +17,7 @@
|
||||
--verbose</pre>
|
||||
</code>
|
||||
Additionally, it has a <code>update --background</code> subcommand.
|
||||
</p>
|
||||
</div>
|
||||
<br />
|
||||
<div class="note">
|
||||
Note that the arguments are only parsed, not implemented.
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
<script>
|
||||
import * as clipboard from "@tauri-apps/plugin-clipboard-manager";
|
||||
import { open } from "@tauri-apps/plugin-dialog";
|
||||
import { arrayBufferToBase64 } from "../lib/utils";
|
||||
import { readFile } from "@tauri-apps/plugin-fs";
|
||||
import * as clipboard from '@tauri-apps/plugin-clipboard-manager'
|
||||
import { open } from '@tauri-apps/plugin-dialog'
|
||||
import { arrayBufferToBase64 } from '../lib/utils'
|
||||
import { readFile } from '@tauri-apps/plugin-fs'
|
||||
|
||||
export let onMessage;
|
||||
export let insecureRenderHtml;
|
||||
let text = "clipboard message";
|
||||
export let onMessage
|
||||
export let insecureRenderHtml
|
||||
let text = 'clipboard message'
|
||||
|
||||
function writeText() {
|
||||
clipboard
|
||||
.writeText(text)
|
||||
.then(() => {
|
||||
onMessage("Wrote to the clipboard");
|
||||
onMessage('Wrote to the clipboard')
|
||||
})
|
||||
.catch(onMessage);
|
||||
.catch(onMessage)
|
||||
}
|
||||
|
||||
async function writeImage() {
|
||||
try {
|
||||
const res = await open({
|
||||
title: "Image to write to clipboard",
|
||||
const path = await open({
|
||||
title: 'Image to write to clipboard',
|
||||
filters: [
|
||||
{
|
||||
name: "Clipboard IMG",
|
||||
extensions: ["png", "jpg", "jpeg"],
|
||||
},
|
||||
],
|
||||
});
|
||||
const bytes = await readFile(res.path);
|
||||
await clipboard.writeImage(bytes);
|
||||
onMessage("wrote image");
|
||||
name: 'Clipboard IMG',
|
||||
extensions: ['png', 'jpg', 'jpeg']
|
||||
}
|
||||
]
|
||||
})
|
||||
const bytes = await readFile(path)
|
||||
await clipboard.writeImage(bytes)
|
||||
onMessage('wrote image')
|
||||
} catch (e) {
|
||||
onMessage(e);
|
||||
onMessage(e)
|
||||
}
|
||||
}
|
||||
|
||||
async function read() {
|
||||
try {
|
||||
const image = await clipboard.readImage();
|
||||
const image = await clipboard.readImage()
|
||||
arrayBufferToBase64(await image.rgba(), function (base64) {
|
||||
const src = "data:image/png;base64," + base64;
|
||||
insecureRenderHtml('<img src="' + src + '"></img>');
|
||||
});
|
||||
return;
|
||||
const src = 'data:image/png;base64,' + base64
|
||||
insecureRenderHtml('<img src="' + src + '"></img>')
|
||||
})
|
||||
return
|
||||
} catch (_) {}
|
||||
|
||||
clipboard
|
||||
.readText()
|
||||
.then((contents) => {
|
||||
onMessage(`Clipboard contents: ${contents}`);
|
||||
onMessage(`Clipboard contents: ${contents}`)
|
||||
})
|
||||
.catch((e) => {
|
||||
onMessage(e);
|
||||
});
|
||||
onMessage(e)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -65,6 +65,5 @@
|
||||
/>
|
||||
<button class="btn" type="button" on:click={writeText}>Write</button>
|
||||
<button class="btn" type="button" on:click={writeImage}>Pick Image</button>
|
||||
|
||||
<button class="btn" type="button" on:click={read}>Read</button>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<script>
|
||||
import {
|
||||
checkPermissions,
|
||||
requestPermissions,
|
||||
getCurrentPosition
|
||||
} from '@tauri-apps/plugin-geolocation'
|
||||
|
||||
export let onMessage
|
||||
|
||||
async function getPosition() {
|
||||
let permissions = await checkPermissions()
|
||||
if (
|
||||
permissions.location === 'prompt' ||
|
||||
permissions.location === 'prompt-with-rationale'
|
||||
) {
|
||||
permissions = await requestPermissions(['location'])
|
||||
}
|
||||
|
||||
if (permissions.location === 'granted') {
|
||||
getCurrentPosition().then(onMessage).catch(onMessage)
|
||||
} else {
|
||||
onMessage('permission denied')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<button class="btn" id="cli-matches" on:click={getPosition}>
|
||||
Get Position
|
||||
</button>
|
||||
@@ -0,0 +1,46 @@
|
||||
<script>
|
||||
import {
|
||||
vibrate,
|
||||
impactFeedback,
|
||||
notificationFeedback,
|
||||
selectionFeedback
|
||||
} from '@tauri-apps/plugin-haptics'
|
||||
|
||||
export let onMessage
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => vibrate(300).then(onMessage).catch(onMessage)}
|
||||
>vibrate short</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => vibrate(1500).then(onMessage).catch(onMessage)}
|
||||
>vibrate long</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => impactFeedback('medium').then(onMessage).catch(onMessage)}
|
||||
>impact medium</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() =>
|
||||
notificationFeedback('warning').then(onMessage).catch(onMessage)}
|
||||
>notification warning</button
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
on:click={() => selectionFeedback().then(onMessage).catch(onMessage)}
|
||||
>selection</button
|
||||
>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<p>
|
||||
Depending on your device settings for haptic feedback some of the buttons may
|
||||
not work.
|
||||
</p>
|
||||
@@ -1,69 +1,69 @@
|
||||
<script>
|
||||
import { fetch as tauriFetch } from "@tauri-apps/plugin-http";
|
||||
import { JsonView } from "@zerodevx/svelte-json-view";
|
||||
import { fetch as tauriFetch } from '@tauri-apps/plugin-http'
|
||||
import { JsonView } from '@zerodevx/svelte-json-view'
|
||||
|
||||
let httpMethod = "GET";
|
||||
let httpBody = "";
|
||||
let httpMethod = 'GET'
|
||||
let httpBody = ''
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
async function makeHttpRequest() {
|
||||
let method = httpMethod || "GET";
|
||||
let method = httpMethod || 'GET'
|
||||
|
||||
const options = {
|
||||
method: method || "GET",
|
||||
headers: {},
|
||||
};
|
||||
method: method || 'GET',
|
||||
headers: {}
|
||||
}
|
||||
|
||||
let bodyType;
|
||||
let bodyType
|
||||
|
||||
if (method !== "GET") {
|
||||
options.body = httpBody;
|
||||
if (method !== 'GET') {
|
||||
options.body = httpBody
|
||||
|
||||
if (
|
||||
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
||||
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
||||
(httpBody.startsWith('{') && httpBody.endsWith('}')) ||
|
||||
(httpBody.startsWith('[') && httpBody.endsWith(']'))
|
||||
) {
|
||||
options.headers["Content-Type"] = "application/json";
|
||||
bodyType = "json";
|
||||
} else if (httpBody !== "") {
|
||||
bodyType = "text";
|
||||
options.headers['Content-Type'] = 'application/json'
|
||||
bodyType = 'json'
|
||||
} else if (httpBody !== '') {
|
||||
bodyType = 'text'
|
||||
}
|
||||
}
|
||||
|
||||
const response = await tauriFetch("http://localhost:3003", options);
|
||||
const response = await tauriFetch('http://localhost:3003', options)
|
||||
const body =
|
||||
bodyType === "json" ? await response.json() : await response.text();
|
||||
bodyType === 'json' ? await response.json() : await response.text()
|
||||
|
||||
onMessage({
|
||||
url: response.url,
|
||||
status: response.status,
|
||||
ok: response.ok,
|
||||
headers: Object.fromEntries(response.headers.entries()),
|
||||
body,
|
||||
});
|
||||
body
|
||||
})
|
||||
}
|
||||
|
||||
/// http form
|
||||
let foo = "baz";
|
||||
let bar = "qux";
|
||||
let result = null;
|
||||
let foo = 'baz'
|
||||
let bar = 'qux'
|
||||
let result = null
|
||||
|
||||
async function doPost() {
|
||||
const form = new FormData();
|
||||
form.append("foo", foo);
|
||||
form.append("bar", bar);
|
||||
const response = await tauriFetch("http://localhost:3003/tauri", {
|
||||
method: "POST",
|
||||
body: form,
|
||||
});
|
||||
const form = new FormData()
|
||||
form.append('foo', foo)
|
||||
form.append('bar', bar)
|
||||
const response = await tauriFetch('http://localhost:3003/tauri', {
|
||||
method: 'POST',
|
||||
body: form
|
||||
})
|
||||
result = {
|
||||
url: response.url,
|
||||
status: response.status,
|
||||
ok: response.ok,
|
||||
headers: Object.fromEntries(response.headers.entries()),
|
||||
body: await response.text(),
|
||||
};
|
||||
body: await response.text()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
placeholder="Request body"
|
||||
rows="5"
|
||||
bind:value={httpBody}
|
||||
/>
|
||||
></textarea>
|
||||
<br />
|
||||
<button class="btn" id="make-request"> Make request </button>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<script>
|
||||
import * as opener from '@tauri-apps/plugin-opener'
|
||||
|
||||
export let onMessage
|
||||
|
||||
let url = ''
|
||||
let urlProgram = ''
|
||||
function openUrl() {
|
||||
opener.openUrl(url, urlProgram ? urlProgram : undefined).catch(onMessage)
|
||||
}
|
||||
|
||||
let path = ''
|
||||
let pathProgram = ''
|
||||
function openPath() {
|
||||
opener
|
||||
.openPath(path, pathProgram ? pathProgram : undefined)
|
||||
.catch(onMessage)
|
||||
}
|
||||
|
||||
let revealPath = ''
|
||||
function revealItemInDir() {
|
||||
opener.revealItemInDir(revealPath).catch(onMessage)
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<form
|
||||
class="flex flex-row gap-2 items-center"
|
||||
on:submit|preventDefault={openUrl}
|
||||
>
|
||||
<button class="btn" type="submit">Open URL</button>
|
||||
<input
|
||||
class="input grow"
|
||||
placeholder="Type the URL to open..."
|
||||
bind:value={url}
|
||||
/>
|
||||
<span> with </span>
|
||||
<input class="input" bind:value={urlProgram} />
|
||||
</form>
|
||||
|
||||
<form
|
||||
class="flex flex-row gap-2 items-center"
|
||||
on:submit|preventDefault={openPath}
|
||||
>
|
||||
<button class="btn" type="submit">Open Path</button>
|
||||
<input
|
||||
class="input grow"
|
||||
placeholder="Type the path to open..."
|
||||
bind:value={path}
|
||||
/>
|
||||
<span> with </span>
|
||||
<input class="input" bind:value={pathProgram} />
|
||||
</form>
|
||||
|
||||
<form
|
||||
class="flex flex-row gap-2 items-center"
|
||||
on:submit|preventDefault={revealItemInDir}
|
||||
>
|
||||
<button class="btn" type="submit">Reveal</button>
|
||||
<input
|
||||
class="input grow"
|
||||
placeholder="Type the path to reveal..."
|
||||
bind:value={revealPath}
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,38 +1,44 @@
|
||||
<script>
|
||||
import { scan, checkPermissions, requestPermissions, Format, cancel } from "@tauri-apps/plugin-barcode-scanner";
|
||||
import {
|
||||
scan,
|
||||
checkPermissions,
|
||||
requestPermissions,
|
||||
Format,
|
||||
cancel
|
||||
} from '@tauri-apps/plugin-barcode-scanner'
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
let scanning = false;
|
||||
let windowed = true;
|
||||
let formats = [Format.QRCode];
|
||||
const supportedFormats = [Format.QRCode, Format.EAN13];
|
||||
let scanning = false
|
||||
let windowed = true
|
||||
let formats = [Format.QRCode]
|
||||
const supportedFormats = [Format.QRCode, Format.EAN13]
|
||||
|
||||
async function startScan() {
|
||||
let permission = await checkPermissions();
|
||||
let permission = await checkPermissions()
|
||||
if (permission === 'prompt') {
|
||||
permission = await requestPermissions();
|
||||
permission = await requestPermissions()
|
||||
}
|
||||
if (permission === 'granted') {
|
||||
scanning = true;
|
||||
scanning = true
|
||||
scan({ windowed, formats })
|
||||
.then((res) => {
|
||||
scanning = false;
|
||||
onMessage(res);
|
||||
scanning = false
|
||||
onMessage(res)
|
||||
})
|
||||
.catch((error) => {
|
||||
scanning = false;
|
||||
onMessage(error);
|
||||
});
|
||||
scanning = false
|
||||
onMessage(error)
|
||||
})
|
||||
} else {
|
||||
onMessage('Permission denied')
|
||||
}
|
||||
}
|
||||
|
||||
async function cancelScan() {
|
||||
await cancel();
|
||||
scanning = false;
|
||||
onMessage("cancelled");
|
||||
await cancel()
|
||||
scanning = false
|
||||
onMessage('cancelled')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -59,11 +65,12 @@
|
||||
<div class="barcode-scanner--area--container">
|
||||
<div class="relative">
|
||||
<p>Aim your camera at a QR code</p>
|
||||
<button class="btn" type="button" on:click={cancelScan}>Cancel</button>
|
||||
<button class="btn" type="button" on:click={cancelScan}>Cancel</button
|
||||
>
|
||||
</div>
|
||||
<div class="square surround-cover">
|
||||
<div class="barcode-scanner--area--outer surround-cover">
|
||||
<div class="barcode-scanner--area--inner" />
|
||||
<div class="barcode-scanner--area--inner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -111,7 +118,7 @@
|
||||
transition: 0.3s;
|
||||
}
|
||||
.square:after {
|
||||
content: "";
|
||||
content: '';
|
||||
top: 0;
|
||||
display: block;
|
||||
padding-bottom: 100%;
|
||||
@@ -141,7 +148,8 @@
|
||||
width: 100%;
|
||||
margin: 1rem;
|
||||
border: 2px solid #fff;
|
||||
box-shadow: 0px 0px 2px 1px rgb(0 0 0 / 0.5),
|
||||
box-shadow:
|
||||
0px 0px 2px 1px rgb(0 0 0 / 0.5),
|
||||
inset 0px 0px 2px 1px rgb(0 0 0 / 0.5);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { Store } from "@tauri-apps/plugin-store";
|
||||
import { LazyStore } from "@tauri-apps/plugin-store";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
export let onMessage;
|
||||
@@ -7,28 +7,65 @@
|
||||
let key;
|
||||
let value;
|
||||
|
||||
const store = new Store("cache.json");
|
||||
let store = new LazyStore("cache.json");
|
||||
let cache = {};
|
||||
|
||||
onMount(async () => {
|
||||
await store.load();
|
||||
const values = await store.entries();
|
||||
for (const [key, value] of values) {
|
||||
cache[key] = value;
|
||||
async function refreshEntries() {
|
||||
try {
|
||||
const values = await store.entries();
|
||||
cache = {};
|
||||
for (const [key, value] of values) {
|
||||
cache[key] = value;
|
||||
}
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
cache = cache;
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
await refreshEntries();
|
||||
});
|
||||
|
||||
function write(key, value) {
|
||||
store
|
||||
.set(key, value)
|
||||
.then(() => store.get(key))
|
||||
.then((v) => {
|
||||
cache[key] = v;
|
||||
async function write(key, value) {
|
||||
try {
|
||||
if (value) {
|
||||
await store.set(key, value);
|
||||
} else {
|
||||
await store.delete(key);
|
||||
}
|
||||
const v = await store.get(key);
|
||||
if (v === undefined) {
|
||||
delete cache[key];
|
||||
cache = cache;
|
||||
})
|
||||
.then(() => store.save())
|
||||
.catch(onMessage);
|
||||
} else {
|
||||
cache[key] = v;
|
||||
}
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
}
|
||||
|
||||
async function reset() {
|
||||
try {
|
||||
await store.reset();
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
await refreshEntries();
|
||||
}
|
||||
|
||||
async function close() {
|
||||
try {
|
||||
await store.close();
|
||||
onMessage("Store is now closed, any new operations will error out");
|
||||
} catch (error) {
|
||||
onMessage(error);
|
||||
}
|
||||
}
|
||||
|
||||
function reopen() {
|
||||
store = new LazyStore("cache.json");
|
||||
onMessage("We made a new `LazyStore` instance, operations will now work");
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -44,7 +81,12 @@
|
||||
<input class="grow input" bind:value />
|
||||
</div>
|
||||
|
||||
<button class="btn" on:click={() => write(key, value)}> Write </button>
|
||||
<div>
|
||||
<button class="btn" on:click={() => write(key, value)}>Write</button>
|
||||
<button class="btn" on:click={() => reset()}>Reset</button>
|
||||
<button class="btn" on:click={() => close()}>Close</button>
|
||||
<button class="btn" on:click={() => reopen()}>Re-open</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
<script>
|
||||
import { check } from "@tauri-apps/plugin-updater";
|
||||
import { relaunch } from "@tauri-apps/plugin-process";
|
||||
import { check } from '@tauri-apps/plugin-updater'
|
||||
import { relaunch } from '@tauri-apps/plugin-process'
|
||||
|
||||
export let onMessage;
|
||||
export let onMessage
|
||||
|
||||
let isChecking, isInstalling, newUpdate;
|
||||
let isChecking, isInstalling, newUpdate
|
||||
let totalSize = 0,
|
||||
downloadedSize = 0;
|
||||
downloadedSize = 0
|
||||
|
||||
async function checkUpdate() {
|
||||
isChecking = true;
|
||||
isChecking = true
|
||||
try {
|
||||
const update = await check();
|
||||
onMessage(`Should update: ${update.available}`);
|
||||
onMessage(update);
|
||||
const update = await check()
|
||||
onMessage(`Should update: ${update.available}`)
|
||||
onMessage(update)
|
||||
|
||||
newUpdate = update;
|
||||
newUpdate = update
|
||||
} catch (e) {
|
||||
onMessage(e);
|
||||
onMessage(e)
|
||||
} finally {
|
||||
isChecking = false;
|
||||
isChecking = false
|
||||
}
|
||||
}
|
||||
|
||||
async function install() {
|
||||
isInstalling = true;
|
||||
downloadedSize = 0;
|
||||
isInstalling = true
|
||||
downloadedSize = 0
|
||||
try {
|
||||
await newUpdate.downloadAndInstall((downloadProgress) => {
|
||||
switch (downloadProgress.event) {
|
||||
case "Started":
|
||||
totalSize = downloadProgress.data.contentLength;
|
||||
break;
|
||||
case "Progress":
|
||||
downloadedSize += downloadProgress.data.chunkLength;
|
||||
break;
|
||||
case "Finished":
|
||||
break;
|
||||
case 'Started':
|
||||
totalSize = downloadProgress.data.contentLength
|
||||
break
|
||||
case 'Progress':
|
||||
downloadedSize += downloadProgress.data.chunkLength
|
||||
break
|
||||
case 'Finished':
|
||||
break
|
||||
}
|
||||
});
|
||||
onMessage("Installation complete, restarting...");
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
await relaunch();
|
||||
})
|
||||
onMessage('Installation complete, restarting...')
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000))
|
||||
await relaunch()
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
onMessage(e);
|
||||
console.error(e)
|
||||
onMessage(e)
|
||||
} finally {
|
||||
isInstalling = false;
|
||||
isInstalling = false
|
||||
}
|
||||
}
|
||||
|
||||
$: progress = totalSize ? Math.round((downloadedSize / totalSize) * 100) : 0;
|
||||
$: progress = totalSize ? Math.round((downloadedSize / totalSize) * 100) : 0
|
||||
</script>
|
||||
|
||||
<div class="flex children:grow children:h10">
|
||||
@@ -61,7 +61,7 @@
|
||||
{:else}
|
||||
<div class="progress">
|
||||
<span>{progress}%</span>
|
||||
<div class="progress-bar" style="width: {progress}%" />
|
||||
<div class="progress-bar" style="width: {progress}%"></div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -26,13 +26,6 @@ export default defineConfig(async () => {
|
||||
host: host || false,
|
||||
port: 5173,
|
||||
strictPort: true,
|
||||
hmr: host
|
||||
? {
|
||||
protocol: 'ws',
|
||||
host,
|
||||
port: 5183
|
||||
}
|
||||
: undefined,
|
||||
fs: {
|
||||
allow: ['.', '../../tooling/api/dist']
|
||||
}
|
||||
|
||||
+12
-11
@@ -1,29 +1,30 @@
|
||||
{
|
||||
"name": "plugins-workspace",
|
||||
"private": true,
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "pnpm run -r --parallel --filter !plugins-workspace --filter !\"./plugins/*/examples/**\" --filter !\"./examples/*\" build",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check ."
|
||||
"format:check": "prettier --check .",
|
||||
"example:api:dev": "pnpm run --filter \"api\" tauri dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.10.0",
|
||||
"@rollup/plugin-node-resolve": "15.2.3",
|
||||
"@eslint/js": "9.16.0",
|
||||
"@rollup/plugin-node-resolve": "15.3.0",
|
||||
"@rollup/plugin-terser": "0.4.4",
|
||||
"@rollup/plugin-typescript": "11.1.6",
|
||||
"@types/eslint__js": "8.42.3",
|
||||
"covector": "^0.12.0",
|
||||
"eslint": "9.10.0",
|
||||
"covector": "^0.12.3",
|
||||
"eslint": "9.16.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-security": "3.0.1",
|
||||
"prettier": "3.3.3",
|
||||
"rollup": "4.21.2",
|
||||
"tslib": "2.7.0",
|
||||
"typescript": "5.6.2",
|
||||
"typescript-eslint": "8.5.0"
|
||||
"prettier": "3.4.2",
|
||||
"rollup": "4.28.1",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "5.7.2",
|
||||
"typescript-eslint": "8.17.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"semver": ">=7.5.2",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.2.0]
|
||||
|
||||
- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
|
||||
@@ -80,11 +92,3 @@
|
||||
## \[2.0.0-alpha.0]
|
||||
|
||||
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
te to alpha.11.
|
||||
|
||||
## \[2.0.0-alpha.0]
|
||||
|
||||
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-autostart"
|
||||
version = "2.0.0-rc.1"
|
||||
version = "2.2.0"
|
||||
description = "Automatically launch your application at startup."
|
||||
authors = { workspace = true }
|
||||
license = { workspace = true }
|
||||
@@ -13,6 +13,13 @@ links = "tauri-plugin-autostart"
|
||||
rustc-args = ["--cfg", "docsrs"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[package.metadata.platforms.support]
|
||||
windows = { level = "full", notes = "" }
|
||||
linux = { level = "full", notes = "" }
|
||||
macos = { level = "full", notes = "" }
|
||||
android = { level = "none", notes = "" }
|
||||
ios = { level = "none", notes = "" }
|
||||
|
||||
[build-dependencies]
|
||||
tauri-plugin = { workspace = true, features = ["build"] }
|
||||
|
||||
@@ -20,6 +27,5 @@ tauri-plugin = { workspace = true, features = ["build"] }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
tauri = { workspace = true }
|
||||
log = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
auto-launch = "0.5"
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||

|
||||
|
||||
Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
|
||||
Automatically launch your application at startup.
|
||||
|
||||
| Platform | Supported |
|
||||
| -------- | --------- |
|
||||
| Linux | ✓ |
|
||||
| Windows | ✓ |
|
||||
| macOS | ✓ |
|
||||
| Android | x |
|
||||
| iOS | x |
|
||||
|
||||
## Install
|
||||
|
||||
_This plugin requires a Rust version of at least **1.75**_
|
||||
_This plugin requires a Rust version of at least **1.77.2**_
|
||||
|
||||
There are three general methods of installation that we can recommend.
|
||||
|
||||
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
tauri-plugin-autostart = "2.0.0-rc"
|
||||
tauri-plugin-autostart = "2.0.0"
|
||||
# alternatively with Git:
|
||||
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
```
|
||||
@@ -46,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-autostart#v2
|
||||
|
||||
First you need to register the core plugin with Tauri:
|
||||
|
||||
`src-tauri/src/main.rs`
|
||||
`src-tauri/src/lib.rs`
|
||||
|
||||
```rust
|
||||
use tauri_plugin_autostart::MacosLauncher;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-autostart",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"version": "2.2.0",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
],
|
||||
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
"@tauri-apps/api": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ disable the automatic start on boot.
|
||||
- `allow-disable`
|
||||
- `allow-is-enabled`
|
||||
|
||||
## Permission Table
|
||||
## Permission Table
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -295,53 +295,39 @@
|
||||
"type": "string",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "allow-disable -> Enables the disable command without any pre-configured scope.",
|
||||
"description": "Enables the disable command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-disable"
|
||||
]
|
||||
"const": "allow-disable"
|
||||
},
|
||||
{
|
||||
"description": "deny-disable -> Denies the disable command without any pre-configured scope.",
|
||||
"description": "Denies the disable command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-disable"
|
||||
]
|
||||
"const": "deny-disable"
|
||||
},
|
||||
{
|
||||
"description": "allow-enable -> Enables the enable command without any pre-configured scope.",
|
||||
"description": "Enables the enable command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-enable"
|
||||
]
|
||||
"const": "allow-enable"
|
||||
},
|
||||
{
|
||||
"description": "deny-enable -> Denies the enable command without any pre-configured scope.",
|
||||
"description": "Denies the enable command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-enable"
|
||||
]
|
||||
"const": "deny-enable"
|
||||
},
|
||||
{
|
||||
"description": "allow-is-enabled -> Enables the is_enabled command without any pre-configured scope.",
|
||||
"description": "Enables the is_enabled command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-is-enabled"
|
||||
]
|
||||
"const": "allow-is-enabled"
|
||||
},
|
||||
{
|
||||
"description": "deny-is-enabled -> Denies the is_enabled command without any pre-configured scope.",
|
||||
"description": "Denies the is_enabled command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-is-enabled"
|
||||
]
|
||||
"const": "deny-is-enabled"
|
||||
},
|
||||
{
|
||||
"description": "default -> This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n",
|
||||
"description": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default"
|
||||
]
|
||||
"const": "default"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/autostart)
|
||||
//!
|
||||
//! Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
|
||||
|
||||
#![doc(
|
||||
@@ -13,8 +11,6 @@
|
||||
#![cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
|
||||
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
|
||||
#[cfg(target_os = "macos")]
|
||||
use log::info;
|
||||
use serde::{ser::Serializer, Serialize};
|
||||
use tauri::{
|
||||
command,
|
||||
@@ -135,7 +131,6 @@ pub fn init<R: Runtime>(
|
||||
} else {
|
||||
exe_path
|
||||
};
|
||||
info!("auto_start path {}", &app_path);
|
||||
builder.set_app_path(&app_path);
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.2.0]
|
||||
|
||||
- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
## \[2.0.0-rc.2]
|
||||
|
||||
- [`79d6e19c`](https://github.com/tauri-apps/plugins-workspace/commit/79d6e19c4b38bae0cab29eb88df379e2237d9aac) ([#1777](https://github.com/tauri-apps/plugins-workspace/pull/1777)) Fixed an issue which caused checkPermission and requestPermission to be mixed up.
|
||||
|
||||
## \[2.0.0-rc.4]
|
||||
|
||||
- [`713c54ef`](https://github.com/tauri-apps/plugins-workspace/commit/713c54ef8365d36afd84585dcabed2fbb751223d) ([#1749](https://github.com/tauri-apps/plugins-workspace/pull/1749) by [@olivierlemasle](https://github.com/tauri-apps/plugins-workspace/../../olivierlemasle)) Remove unused Android dependencies.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-barcode-scanner"
|
||||
version = "2.0.0-rc.4"
|
||||
version = "2.2.0"
|
||||
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
@@ -14,6 +14,14 @@ rustc-args = ["--cfg", "docsrs"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
targets = ["x86_64-linux-android"]
|
||||
|
||||
[package.metadata.platforms.support]
|
||||
windows = { level = "none", notes = "" }
|
||||
linux = { level = "none", notes = "" }
|
||||
macos = { level = "none", notes = "" }
|
||||
android = { level = "full", notes = "" }
|
||||
ios = { level = "full", notes = "" }
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
tauri-plugin = { workspace = true, features = ["build"] }
|
||||
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||

|
||||

|
||||
|
||||
Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes.
|
||||
|
||||
| Platform | Supported |
|
||||
| -------- | --------- |
|
||||
| Linux | x |
|
||||
| Windows | x |
|
||||
| macOS | x |
|
||||
| Android | ✓ |
|
||||
| iOS | ✓ |
|
||||
|
||||
## Install
|
||||
|
||||
_This plugin requires a Rust version of at least **1.64**_
|
||||
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
tauri-plugin-barcode-scanner = "2.0.0-rc"
|
||||
tauri-plugin-barcode-scanner = "2.0.0"
|
||||
# alternatively with Git:
|
||||
tauri-plugin-barcode-scanner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
```
|
||||
@@ -46,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-barcode-scanner#v2
|
||||
|
||||
First you need to register the core plugin with Tauri:
|
||||
|
||||
`src-tauri/src/main.rs`
|
||||
`src-tauri/src/lib.rs`
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
|
||||
@@ -1 +1 @@
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return e(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return e(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return e(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return e(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
import {
|
||||
invoke,
|
||||
requestPermissions as checkPermissions_,
|
||||
checkPermissions as requestPermissions_
|
||||
requestPermissions as requestPermissions_,
|
||||
checkPermissions as checkPermissions_
|
||||
} from '@tauri-apps/api/core'
|
||||
|
||||
export type { PermissionState } from '@tauri-apps/api/core'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-barcode-scanner",
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.2.0",
|
||||
"description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
],
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
"@tauri-apps/api": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ It allows all barcode related features.
|
||||
- `allow-scan`
|
||||
- `allow-vibrate`
|
||||
|
||||
## Permission Table
|
||||
## Permission Table
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -295,95 +295,69 @@
|
||||
"type": "string",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "allow-cancel -> Enables the cancel command without any pre-configured scope.",
|
||||
"description": "Enables the cancel command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-cancel"
|
||||
]
|
||||
"const": "allow-cancel"
|
||||
},
|
||||
{
|
||||
"description": "deny-cancel -> Denies the cancel command without any pre-configured scope.",
|
||||
"description": "Denies the cancel command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-cancel"
|
||||
]
|
||||
"const": "deny-cancel"
|
||||
},
|
||||
{
|
||||
"description": "allow-check-permissions -> Enables the check_permissions command without any pre-configured scope.",
|
||||
"description": "Enables the check_permissions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-check-permissions"
|
||||
]
|
||||
"const": "allow-check-permissions"
|
||||
},
|
||||
{
|
||||
"description": "deny-check-permissions -> Denies the check_permissions command without any pre-configured scope.",
|
||||
"description": "Denies the check_permissions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-check-permissions"
|
||||
]
|
||||
"const": "deny-check-permissions"
|
||||
},
|
||||
{
|
||||
"description": "allow-open-app-settings -> Enables the open_app_settings command without any pre-configured scope.",
|
||||
"description": "Enables the open_app_settings command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-open-app-settings"
|
||||
]
|
||||
"const": "allow-open-app-settings"
|
||||
},
|
||||
{
|
||||
"description": "deny-open-app-settings -> Denies the open_app_settings command without any pre-configured scope.",
|
||||
"description": "Denies the open_app_settings command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-open-app-settings"
|
||||
]
|
||||
"const": "deny-open-app-settings"
|
||||
},
|
||||
{
|
||||
"description": "allow-request-permissions -> Enables the request_permissions command without any pre-configured scope.",
|
||||
"description": "Enables the request_permissions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-request-permissions"
|
||||
]
|
||||
"const": "allow-request-permissions"
|
||||
},
|
||||
{
|
||||
"description": "deny-request-permissions -> Denies the request_permissions command without any pre-configured scope.",
|
||||
"description": "Denies the request_permissions command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-request-permissions"
|
||||
]
|
||||
"const": "deny-request-permissions"
|
||||
},
|
||||
{
|
||||
"description": "allow-scan -> Enables the scan command without any pre-configured scope.",
|
||||
"description": "Enables the scan command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-scan"
|
||||
]
|
||||
"const": "allow-scan"
|
||||
},
|
||||
{
|
||||
"description": "deny-scan -> Denies the scan command without any pre-configured scope.",
|
||||
"description": "Denies the scan command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-scan"
|
||||
]
|
||||
"const": "deny-scan"
|
||||
},
|
||||
{
|
||||
"description": "allow-vibrate -> Enables the vibrate command without any pre-configured scope.",
|
||||
"description": "Enables the vibrate command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"allow-vibrate"
|
||||
]
|
||||
"const": "allow-vibrate"
|
||||
},
|
||||
{
|
||||
"description": "deny-vibrate -> Denies the vibrate command without any pre-configured scope.",
|
||||
"description": "Denies the vibrate command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"deny-vibrate"
|
||||
]
|
||||
"const": "deny-vibrate"
|
||||
},
|
||||
{
|
||||
"description": "default -> This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n",
|
||||
"description": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default"
|
||||
]
|
||||
"const": "default"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.2.0]
|
||||
|
||||
- [`3a79266b`](https://github.com/tauri-apps/plugins-workspace/commit/3a79266b8cf96a55b1ae6339d725567d45a44b1d) ([#2173](https://github.com/tauri-apps/plugins-workspace/pull/2173) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Bumped all plugins to `v2.2.0`. From now, the versions for the Rust and JavaScript packages of each plugin will be in sync with each other.
|
||||
|
||||
## \[2.0.1]
|
||||
|
||||
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
|
||||
|
||||
## \[2.0.0]
|
||||
|
||||
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
|
||||
|
||||
## \[2.0.0-rc.1]
|
||||
|
||||
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-biometric"
|
||||
version = "2.0.0-rc.3"
|
||||
version = "2.2.0"
|
||||
description = "Prompt the user for biometric authentication on Android and iOS."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
@@ -13,6 +13,14 @@ rustc-args = ["--cfg", "docsrs"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
targets = ["x86_64-linux-android"]
|
||||
|
||||
[package.metadata.platforms.support]
|
||||
windows = { level = "none", notes = "" }
|
||||
linux = { level = "none", notes = "" }
|
||||
macos = { level = "none", notes = "" }
|
||||
android = { level = "full", notes = "" }
|
||||
ios = { level = "full", notes = "" }
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
tauri-plugin = { workspace = true, features = ["build"] }
|
||||
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
Prompt the user for biometric authentication on Android and iOS.
|
||||
|
||||
| Platform | Supported |
|
||||
| -------- | --------- |
|
||||
| Linux | x |
|
||||
| Windows | x |
|
||||
| macOS | x |
|
||||
| Android | ✓ |
|
||||
| iOS | ✓ |
|
||||
|
||||
## Install
|
||||
|
||||
_This plugin requires a Rust version of at least **1.65**_
|
||||
@@ -18,7 +26,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
tauri-plugin-biometric = "2.0.0-rc"
|
||||
tauri-plugin-biometric = "2.0.0"
|
||||
# alternatively with Git:
|
||||
tauri-plugin-biometric = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
```
|
||||
@@ -48,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-biometric#v2
|
||||
|
||||
First you need to register the core plugin with Tauri:
|
||||
|
||||
`src-tauri/src/main.rs`
|
||||
`src-tauri/src/lib.rs`
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-biometric",
|
||||
"version": "2.0.0-rc.1",
|
||||
"license": "MIT or APACHE-2.0",
|
||||
"version": "2.2.0",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
],
|
||||
@@ -25,6 +25,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-rc.4"
|
||||
"@tauri-apps/api": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user