mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-22 14:59:56 +02:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 13e6268448 | |||
| 7a605d402b | |||
| 18635c2200 | |||
| d0c0084859 | |||
| 265dbc02e3 | |||
| aec17a90fc | |||
| 12adc1dbec | |||
| 553c87bde0 | |||
| d74fc0a097 | |||
| cdae07afe6 | |||
| d5a7c77a8d | |||
| 4ab90f048e | |||
| 84133b57b8 | |||
| 5b3210c224 | |||
| be591d2feb | |||
| 7d9df7297a | |||
| 7f2e2dd5b8 | |||
| 6f01bc11ab | |||
| aba07c27b8 | |||
| 0bba6932c0 | |||
| 52ef0addd8 | |||
| 5fd597ddaf | |||
| 56d455d343 | |||
| a79d6d94bd | |||
| 83abea3cae | |||
| 0417b7ad60 | |||
| 1cb831183c | |||
| db7f4f9a41 | |||
| c8c3191565 | |||
| 2fc420ba37 | |||
| c81dff292a | |||
| 32c2a441c3 | |||
| 9359b5b138 | |||
| 84b3612393 | |||
| c73049d3ed | |||
| 1091d6d6ac | |||
| 91ffc01a91 | |||
| 0413ed3ce6 | |||
| b3d7d11ae3 | |||
| d8b4aca69f | |||
| 29bf8a2ab4 | |||
| 393667b547 | |||
| cf5864266e | |||
| 0f480d0985 | |||
| a7cba0dac7 | |||
| 7d71ad4e58 |
@@ -41,7 +41,7 @@
|
|||||||
"app",
|
"app",
|
||||||
"log-plugin",
|
"log-plugin",
|
||||||
"cli",
|
"cli",
|
||||||
"clipboard",
|
"clipboard-manager",
|
||||||
"dialog",
|
"dialog",
|
||||||
"fs",
|
"fs",
|
||||||
"global-shortcut",
|
"global-shortcut",
|
||||||
@@ -52,7 +52,8 @@
|
|||||||
"shell",
|
"shell",
|
||||||
"updater",
|
"updater",
|
||||||
"window"
|
"window"
|
||||||
]
|
],
|
||||||
|
"postversion": "pnpm install"
|
||||||
},
|
},
|
||||||
"api-example-js": {
|
"api-example-js": {
|
||||||
"path": "./examples/api",
|
"path": "./examples/api",
|
||||||
@@ -62,7 +63,7 @@
|
|||||||
"app-js",
|
"app-js",
|
||||||
"log-js",
|
"log-js",
|
||||||
"cli-js",
|
"cli-js",
|
||||||
"clipboard-js",
|
"clipboard-manager-js",
|
||||||
"dialog-js",
|
"dialog-js",
|
||||||
"fs-js",
|
"fs-js",
|
||||||
"global-shortcut-js",
|
"global-shortcut-js",
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"dialog": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
On non-Linux system, use `AsyncMessageDialog` instead of `MessageDialog`. [(tauri#7182)](https://github.com/tauri-apps/tauri/issues/7182)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-js": "minor:feat"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the `maximizable`, `minimizable` and `closable` fields on `WindowOptions`.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"window": "minor:feat"
|
||||||
|
"window-js": "minor:feat"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the `setMaximizable`, `setMinimizable`, `setClosable`, `isMaximizable`, `isMinimizable` and `isClosable` methods.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
"app": patch
|
||||||
|
"authenticator": patch
|
||||||
|
"autostart": patch
|
||||||
|
"cli": patch
|
||||||
|
"clipboard-manager": patch
|
||||||
|
"dialog": patch
|
||||||
|
"fs": patch
|
||||||
|
"global-shortcut": patch
|
||||||
|
"http": patch
|
||||||
|
"localhost": patch
|
||||||
|
"log-plugin": 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": patch
|
||||||
|
"window-state": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes docs.rs build by enabling the `tauri/dox` feature flag.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"fs-js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix `writeBinaryFile` crashing with `command 'write_binary_file' not found`
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"http-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Multipart requests are now handled in JavaScript by the `Request` JavaScript class so you just need to use a `FormData` body and not set the content-type header to `multipart/form-data`. `application/x-www-form-urlencoded` requests must be done manually.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"http": minor
|
||||||
|
"http-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
The http plugin has been rewritten from scratch and now only exposes a `fetch` function in Javascript and Re-exports `reqwest` crate in Rust. The new `fetch` method tries to be as close and compliant to the `fetch` Web API as possible.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"http": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Improve response performance by using the new IPC streaming data.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"notification": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use `window.__TAURI_INVOKE__` instead of `window.__TAURI__` in init.js, fixes usage in apps without `withGlobalTauri` enabled.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"notification": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Revert [7d71ad4e5](https://github.com/tauri-apps/plugins-workspace/commit/7d71ad4e587bcf47ea34645f5b226945e487b765) which added a default sound for notifications on Windows. This introduced inconsistency with other platforms that has silent notifications by default. In the upcoming releases, we will add support for modifying the notification sound across all platforms.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"notification": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Play a default sound when showing a notification on Windows.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
"os": minor
|
||||||
|
"os-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
The os plugin is recieving a few changes to improve consistency and add new features:
|
||||||
|
|
||||||
|
- Renamed `Kind` enum to `OsType` and `kind()` function to `os_type()`.
|
||||||
|
- Added `family()`,`exe_extension()`, and `hostname()` functions and their equivalents for JS.
|
||||||
|
- Removed `tempdir()` function and its equivalent on JS, use `std::env::temp_dir` instead of `temp_dir` from `tauri::path::PathResolver::temp_dir` and `path.tempDir` on JS.
|
||||||
|
- Modified `platform()` implementation to return `windows` instead of `win32` and `macos` instead of `darwin` to align with Rust's `std::env::consts::OS`
|
||||||
|
- `EOL` const in JS has been modified into a function `eol()` fix import issues in frameworks like `next.js`
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"persisted-scope": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Split up fs and asset scopes. **This will reset the asset protocol scope once!**
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"persisted-scope": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix usage of directory patterns by removing glob asterisks at the end before allowing/forbidding them. This was causing them to be escaped, and so undesirable paths were allowed/forbidden while polluting the `.persisted-scope` file.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"positioner": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Change `system-tray` feature flag to `tray-icon`.
|
||||||
+31
-1
@@ -1,4 +1,34 @@
|
|||||||
{
|
{
|
||||||
"tag": "alpha",
|
"tag": "alpha",
|
||||||
"changes": [".changes/persisted-scope-fix-oom.md", ".changes/v2-alpha.md"]
|
"changes": [
|
||||||
|
".changes/dialog-async-message-dialog.md",
|
||||||
|
".changes/disable-window-controls-api-options.md",
|
||||||
|
".changes/disable-window-controls-api.md",
|
||||||
|
".changes/fix-docs-build.md",
|
||||||
|
".changes/fs-wiret-binary-file.md",
|
||||||
|
".changes/http-multipart-refactor.md",
|
||||||
|
".changes/http-plugin-refactor.md",
|
||||||
|
".changes/notification-init-script.md",
|
||||||
|
".changes/notification-revert-sound.md",
|
||||||
|
".changes/notification-sound.md",
|
||||||
|
".changes/os-plugin-refactor.md",
|
||||||
|
".changes/persisted-scope-asset.md",
|
||||||
|
".changes/persisted-scope-glob.md",
|
||||||
|
".changes/positioner-tray-flag.md",
|
||||||
|
".changes/shell-command-apis.md",
|
||||||
|
".changes/shell-detached.md",
|
||||||
|
".changes/stronghold-arg-name.md",
|
||||||
|
".changes/stronghold-constructor.md",
|
||||||
|
".changes/tauri-alpha.11.md",
|
||||||
|
".changes/updater-nsis-admin.md",
|
||||||
|
".changes/updater-nsis.md",
|
||||||
|
".changes/updater-plugin-refactor.md",
|
||||||
|
".changes/v2-alpha.md",
|
||||||
|
".changes/window-incognito.md",
|
||||||
|
".changes/window-is-focused.md",
|
||||||
|
".changes/window-plugin-refactor.md",
|
||||||
|
".changes/window-set-effects.md",
|
||||||
|
".changes/window-state-decorated.md",
|
||||||
|
".changes/window-state-promise.md"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"shell": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added `Command::arg`, `Command::env` and changed `Command::new` input type.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"shell": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Ensure the launched process is detached so it can out-live your tauri app and does not shutdown with it.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"stronghold-js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Change the argument name of the `Stronghold.remove` from `location` to `recordPath` to match the Stronghold command argument
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"stronghold-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Added `Stronghold.load` and removed its constructor.
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
"app": patch
|
||||||
|
"app-js": patch
|
||||||
|
"authenticator": patch
|
||||||
|
"authenticator-js": patch
|
||||||
|
"autostart": patch
|
||||||
|
"autostart-js": patch
|
||||||
|
"cli": patch
|
||||||
|
"cli-js": patch
|
||||||
|
"clipboard-manager": patch
|
||||||
|
"clipboard-manager-js": patch
|
||||||
|
"dialog": patch
|
||||||
|
"dialog-js": patch
|
||||||
|
"fs": patch
|
||||||
|
"fs-js": patch
|
||||||
|
"global-shortcut": patch
|
||||||
|
"global-shortcut-js": patch
|
||||||
|
"http": patch
|
||||||
|
"http-js": patch
|
||||||
|
"localhost": patch
|
||||||
|
"log-plugin": patch
|
||||||
|
"log-js": patch
|
||||||
|
"notification": patch
|
||||||
|
"notification-js": patch
|
||||||
|
"os": patch
|
||||||
|
"os-js": patch
|
||||||
|
"persisted-scope": patch
|
||||||
|
"positioner": patch
|
||||||
|
"positioner-js": patch
|
||||||
|
"process": patch
|
||||||
|
"process-js": patch
|
||||||
|
"shell": patch
|
||||||
|
"shell-js": patch
|
||||||
|
"single-instance": patch
|
||||||
|
"sql": patch
|
||||||
|
"sql-js": patch
|
||||||
|
"store": patch
|
||||||
|
"store-js": patch
|
||||||
|
"stronghold": patch
|
||||||
|
"stronghold-js": patch
|
||||||
|
"updater": patch
|
||||||
|
"updater-js": patch
|
||||||
|
"upload": patch
|
||||||
|
"upload-js": patch
|
||||||
|
"websocket": patch
|
||||||
|
"websocket-js": patch
|
||||||
|
"window": patch
|
||||||
|
"window-js": patch
|
||||||
|
"window-state": patch
|
||||||
|
"window-state-js": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update to alpha.11.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"updater": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"updater": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Implement passive mode on NSIS and automatically restart after NSIS update.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"updater": minor
|
||||||
|
"updater-js": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
The updater plugin is recieving a few changes to improve consistency and ergonomics of the Rust and JS APIs
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-js": "minor"
|
||||||
|
---
|
||||||
|
|
||||||
|
Add position information to file drop events.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-js": "minor"
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `incognito` window configuration option
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"window": "minor:feat"
|
||||||
|
"window-js": "minor:feat"
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `WebviewWindow.is_focused` and `WebviewWindow.getFocusedWindow` getters.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
"window": "patch"
|
||||||
|
"window-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
The window plugin is recieving a few changes to improve consistency and add new features:
|
||||||
|
|
||||||
|
- Removed `appWindow` variable from JS module, use `getCurrent` or `Window.getCurrent`.
|
||||||
|
- Removed `WindowManager`, `WebviewWindow` and `WebviewHandle` types and merged them into one `Window` type that matches the name of the rust window type.
|
||||||
|
- Added `Window.getCurrent` and `Window.getAll` which is a convenient method for `getCurrent` and `getAll` functions.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"window": "patch"
|
||||||
|
"window-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the `setEffects` and `clearEffects` API.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-state": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Correctly set decoration state if no saved state xists
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"window-state-js": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
Correctly propagate the promise inside `saveWindowState`, `restoreState` and `restoreStateCurrent` so callers can choose to `await` them.
|
||||||
@@ -3,3 +3,4 @@ node_modules
|
|||||||
dist
|
dist
|
||||||
dist-js
|
dist-js
|
||||||
api-iife.js
|
api-iife.js
|
||||||
|
init.js
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
name: integration tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v1
|
||||||
|
- v2
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/integration-tests.yml"
|
||||||
|
- "plugins/updater/src/**"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- v1
|
||||||
|
- v2
|
||||||
|
paths:
|
||||||
|
- ".github/workflows/integration-tests.yml"
|
||||||
|
- "plugins/updater/src/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-integration-tests:
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: install stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: install Linux dependencies
|
||||||
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev libfuse2
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: install Tauri CLI
|
||||||
|
run: cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch dev
|
||||||
|
|
||||||
|
- name: run integration tests
|
||||||
|
run: cargo test --test '*' -- --ignored
|
||||||
@@ -193,6 +193,11 @@ jobs:
|
|||||||
working-directory: examples/api
|
working-directory: examples/api
|
||||||
run: mkdir dist
|
run: mkdir dist
|
||||||
|
|
||||||
|
- name: Downgrade crates with MSRV conflict
|
||||||
|
# The --precise flag can only be used once per invocation.
|
||||||
|
run: |
|
||||||
|
cargo update -p time@0.3.24 --precise 0.3.23
|
||||||
|
|
||||||
- name: test ${{ matrix.package }}
|
- name: test ${{ matrix.package }}
|
||||||
if: matrix.package != 'tauri-plugin-sql'
|
if: matrix.package != 'tauri-plugin-sql'
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|||||||
@@ -116,6 +116,6 @@ if (files.length > 0) {
|
|||||||
console.log(missing.join("\n"));
|
console.log(missing.join("\n"));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ https.get(url, options, (response) => {
|
|||||||
}
|
}
|
||||||
} else if (kind === "npm") {
|
} else if (kind === "npm") {
|
||||||
const versions = Object.keys(data.versions || {}).filter((v) =>
|
const versions = Object.keys(data.versions || {}).filter((v) =>
|
||||||
v.startsWith(target)
|
v.startsWith(target),
|
||||||
);
|
);
|
||||||
console.log(versions[versions.length - 1] || "0.0.0");
|
console.log(versions[versions.length - 1] || "0.0.0");
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1650
-1013
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -5,8 +5,8 @@ resolver = "2"
|
|||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
tauri = "2.0.0-alpha.9"
|
tauri = "2.0.0-alpha.12"
|
||||||
tauri-build = "2.0.0-alpha.5"
|
tauri-build = "2.0.0-alpha.8"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `window-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `fs-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `http-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `os-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `app-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `cli-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `dialog-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `global-shortcut-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `log-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `notification-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `process-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `shell-js@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `updater-js@2.0.0-alpha.1`
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[2.0.0-alpha.0]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en" theme="dark">
|
<html lang="en" theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
||||||
|
/>
|
||||||
<title>Svelte + Vite App</title>
|
<title>Svelte + Vite App</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|||||||
+25
-24
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "svelte-app",
|
"name": "svelte-app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --clearScreen false",
|
"dev": "vite --clearScreen false",
|
||||||
@@ -9,30 +9,31 @@
|
|||||||
"serve": "vite preview"
|
"serve": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4",
|
"@tauri-apps/api": "2.0.0-alpha.6",
|
||||||
"@zerodevx/svelte-json-view": "0.2.1",
|
"@tauri-apps/plugin-app": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-app": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-cli": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-cli": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-dialog": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-dialog": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-fs": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-fs": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-http": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-http": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-notification": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-notification": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-os": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-os": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-process": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-process": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-shell": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-shell": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-updater": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-updater": "2.0.0-alpha.0",
|
"@tauri-apps/plugin-window": "2.0.0-alpha.1",
|
||||||
"@tauri-apps/plugin-window": "2.0.0-alpha.0"
|
"@zerodevx/svelte-json-view": "1.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify-json/codicon": "^1.1.10",
|
"@iconify-json/codicon": "^1.1.26",
|
||||||
"@iconify-json/ph": "^1.1.1",
|
"@iconify-json/ph": "^1.1.5",
|
||||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
"@sveltejs/vite-plugin-svelte": "^2.4.1",
|
||||||
"@tauri-apps/cli": "2.0.0-alpha.9",
|
"@tauri-apps/cli": "2.0.0-alpha.11",
|
||||||
"internal-ip": "^7.0.0",
|
"@unocss/extractor-svelte": "^0.53.1",
|
||||||
"svelte": "^3.49.0",
|
"internal-ip": "^8.0.0",
|
||||||
"unocss": "^0.39.3",
|
"svelte": "^3.59.1",
|
||||||
"vite": "^3.0.9"
|
"unocss": "^0.53.1",
|
||||||
|
"vite": "^4.3.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,29 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.2]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `dialog@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `window@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `app@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `cli@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `fs@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `global-shortcut@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `http@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `log-plugin@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `notification@2.0.0-alpha.2`
|
||||||
|
- Upgraded to `os@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `process@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `shell@2.0.0-alpha.1`
|
||||||
|
- Upgraded to `updater@2.0.0-alpha.1`
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Updated to latest `notification`
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[2.0.0-alpha.0]
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "api"
|
name = "api"
|
||||||
publish = false
|
publish = false
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.2"
|
||||||
description = "An example Tauri Application showcasing the api"
|
description = "An example Tauri Application showcasing the api"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.65"
|
rust-version = { workspace = true }
|
||||||
license = "Apache-2.0 OR MIT"
|
license = "Apache-2.0 OR MIT"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@@ -18,17 +18,17 @@ serde_json = { workspace = true }
|
|||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
tiny_http = "0.11"
|
tiny_http = "0.11"
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.0" }
|
tauri-plugin-app = { path = "../../../plugins/app", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.0" }
|
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.0" }
|
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-alpha.0" }
|
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-alpha.0" }
|
||||||
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-alpha.0" }
|
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-alpha.0" }
|
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-alpha.0", features = [ "windows7-compat" ] }
|
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-alpha.2", features = [ "windows7-compat" ] }
|
||||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.0" }
|
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.0" }
|
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.0" }
|
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.0", features = [ "devtools", "icon-ico", "icon-png" ] }
|
tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha.1", features = [ "devtools", "icon-ico", "icon-png" ] }
|
||||||
|
|
||||||
[dependencies.tauri]
|
[dependencies.tauri]
|
||||||
workspace = true
|
workspace = true
|
||||||
@@ -37,14 +37,14 @@ tauri-plugin-window = { path = "../../../plugins/window", version = "2.0.0-alpha
|
|||||||
"icon-png",
|
"icon-png",
|
||||||
"isolation",
|
"isolation",
|
||||||
"macos-private-api",
|
"macos-private-api",
|
||||||
"system-tray",
|
"tray-icon",
|
||||||
"protocol-asset"
|
"protocol-asset"
|
||||||
]
|
]
|
||||||
|
|
||||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
[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-alpha.0" }
|
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-alpha.0" }
|
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-alpha.1" }
|
||||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-alpha.0" }
|
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-alpha.1" }
|
||||||
|
|
||||||
[target."cfg(target_os = \"windows\")".dependencies]
|
[target."cfg(target_os = \"windows\")".dependencies]
|
||||||
window-shadows = "0.2"
|
window-shadows = "0.2"
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ pub fn run() {
|
|||||||
.setup(move |app| {
|
.setup(move |app| {
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
{
|
{
|
||||||
tray::create_tray(app)?;
|
tray::create_tray(app.handle())?;
|
||||||
app.handle().plugin(tauri_plugin_cli::init())?;
|
app.handle().plugin(tauri_plugin_cli::init())?;
|
||||||
app.handle()
|
app.handle()
|
||||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
.plugin(tauri_plugin_global_shortcut::Builder::new().build())?;
|
||||||
@@ -56,7 +56,7 @@ pub fn run() {
|
|||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
{
|
{
|
||||||
window_builder = window_builder
|
window_builder = window_builder
|
||||||
.user_agent("Tauri API")
|
.user_agent(&format!("Tauri API - {}", std::env::consts::OS))
|
||||||
.title("Tauri API Validation")
|
.title("Tauri API Validation")
|
||||||
.inner_size(1000., 800.)
|
.inner_size(1000., 800.)
|
||||||
.min_inner_size(600., 400.)
|
.min_inner_size(600., 400.)
|
||||||
@@ -71,6 +71,11 @@ pub fn run() {
|
|||||||
.decorations(false);
|
.decorations(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
window_builder = window_builder.transparent(true);
|
||||||
|
}
|
||||||
|
|
||||||
let window = window_builder.build().unwrap();
|
let window = window_builder.build().unwrap();
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
@@ -119,7 +124,7 @@ pub fn run() {
|
|||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
builder = builder.menu(tauri::Menu::os_default("Tauri API Validation"));
|
builder = builder.menu(tauri::menu::Menu::default);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
|
|||||||
@@ -4,140 +4,113 @@
|
|||||||
|
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
use tauri::{
|
use tauri::{
|
||||||
CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu, WindowBuilder, WindowUrl,
|
menu::{Menu, MenuItem},
|
||||||
|
tray::{ClickType, TrayIconBuilder},
|
||||||
|
Manager, Runtime, WindowBuilder, WindowUrl,
|
||||||
};
|
};
|
||||||
use tauri_plugin_dialog::DialogExt;
|
|
||||||
use tauri_plugin_shell::ShellExt;
|
|
||||||
|
|
||||||
pub fn create_tray(app: &tauri::App) -> tauri::Result<()> {
|
|
||||||
let mut tray_menu1 = SystemTrayMenu::new()
|
|
||||||
.add_item(CustomMenuItem::new("toggle", "Toggle"))
|
|
||||||
.add_item(CustomMenuItem::new("new", "New window"))
|
|
||||||
.add_item(CustomMenuItem::new("icon_1", "Tray Icon 1"))
|
|
||||||
.add_item(CustomMenuItem::new("icon_2", "Tray Icon 2"));
|
|
||||||
|
|
||||||
|
pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
|
||||||
|
let toggle_i = MenuItem::with_id(app, "toggle", "Toggle", true, None);
|
||||||
|
let new_window_i = MenuItem::with_id(app, "new-window", "New window", true, None);
|
||||||
|
let icon_i_1 = MenuItem::with_id(app, "icon-1", "Icon 1", true, None);
|
||||||
|
let icon_i_2 = MenuItem::with_id(app, "icon-2", "Icon 2", true, None);
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
let set_title_i = MenuItem::with_id(app, "set-title", "Set Title", true, None);
|
||||||
tray_menu1 = tray_menu1.add_item(CustomMenuItem::new("set_title", "Set Title"));
|
let switch_i = MenuItem::with_id(app, "switch-menu", "Switch Menu", true, None);
|
||||||
}
|
let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None);
|
||||||
|
let remove_tray_i = MenuItem::with_id(app, "remove-tray", "Remove Tray icon", true, None);
|
||||||
|
let menu1 = Menu::with_items(
|
||||||
|
app,
|
||||||
|
&[
|
||||||
|
&toggle_i,
|
||||||
|
&new_window_i,
|
||||||
|
&icon_i_1,
|
||||||
|
&icon_i_2,
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
&set_title_i,
|
||||||
|
&switch_i,
|
||||||
|
&quit_i,
|
||||||
|
&remove_tray_i,
|
||||||
|
],
|
||||||
|
)?;
|
||||||
|
let menu2 = Menu::with_items(
|
||||||
|
app,
|
||||||
|
&[&toggle_i, &new_window_i, &switch_i, &quit_i, &remove_tray_i],
|
||||||
|
)?;
|
||||||
|
|
||||||
tray_menu1 = tray_menu1
|
|
||||||
.add_item(CustomMenuItem::new("switch_menu", "Switch Menu"))
|
|
||||||
.add_item(CustomMenuItem::new("about", "About"))
|
|
||||||
.add_item(CustomMenuItem::new("exit_app", "Quit"))
|
|
||||||
.add_item(CustomMenuItem::new("destroy", "Destroy"));
|
|
||||||
|
|
||||||
let tray_menu2 = SystemTrayMenu::new()
|
|
||||||
.add_item(CustomMenuItem::new("toggle", "Toggle"))
|
|
||||||
.add_item(CustomMenuItem::new("new", "New window"))
|
|
||||||
.add_item(CustomMenuItem::new("switch_menu", "Switch Menu"))
|
|
||||||
.add_item(CustomMenuItem::new("about", "About"))
|
|
||||||
.add_item(CustomMenuItem::new("exit_app", "Quit"))
|
|
||||||
.add_item(CustomMenuItem::new("destroy", "Destroy"));
|
|
||||||
let is_menu1 = AtomicBool::new(true);
|
let is_menu1 = AtomicBool::new(true);
|
||||||
|
|
||||||
let handle = app.handle();
|
let _ = TrayIconBuilder::with_id("tray-1")
|
||||||
let tray_id = "my-tray".to_string();
|
.tooltip("Tauri")
|
||||||
SystemTray::new()
|
.icon(app.default_window_icon().unwrap().clone())
|
||||||
.with_id(&tray_id)
|
.menu(&menu1)
|
||||||
.with_menu(tray_menu1.clone())
|
.menu_on_left_click(false)
|
||||||
.with_tooltip("Tauri")
|
.on_menu_event(move |app, event| match event.id.as_ref() {
|
||||||
.on_event(move |event| {
|
"quit" => {
|
||||||
let tray_handle = handle.tray_handle_by_id(&tray_id).unwrap();
|
app.exit(0);
|
||||||
match event {
|
}
|
||||||
SystemTrayEvent::LeftClick {
|
"remove-tray" => {
|
||||||
position: _,
|
app.remove_tray_by_id("tray-1");
|
||||||
size: _,
|
}
|
||||||
..
|
"toggle" => {
|
||||||
} => {
|
if let Some(window) = app.get_window("main") {
|
||||||
let window = handle.get_window("main").unwrap();
|
let new_title = if window.is_visible().unwrap_or_default() {
|
||||||
window.show().unwrap();
|
let _ = window.hide();
|
||||||
window.set_focus().unwrap();
|
"Show"
|
||||||
|
} else {
|
||||||
|
let _ = window.show();
|
||||||
|
let _ = window.set_focus();
|
||||||
|
"Hide"
|
||||||
|
};
|
||||||
|
toggle_i.set_text(new_title).unwrap();
|
||||||
}
|
}
|
||||||
SystemTrayEvent::MenuItemClick { id, .. } => {
|
}
|
||||||
let item_handle = tray_handle.get_item(&id);
|
"new-window" => {
|
||||||
match id.as_str() {
|
let _ = WindowBuilder::new(app, "new", WindowUrl::App("index.html".into()))
|
||||||
"exit_app" => {
|
.title("Tauri")
|
||||||
// exit the app
|
.build();
|
||||||
handle.exit(0);
|
}
|
||||||
}
|
#[cfg(target_os = "macos")]
|
||||||
"destroy" => {
|
"set-title" => {
|
||||||
tray_handle.destroy().unwrap();
|
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||||
}
|
let _ = tray.set_title(Some("Tauri"));
|
||||||
"toggle" => {
|
}
|
||||||
let window = handle.get_window("main").unwrap();
|
}
|
||||||
let new_title = if window.is_visible().unwrap() {
|
i @ "icon-1" | i @ "icon-2" => {
|
||||||
window.hide().unwrap();
|
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||||
"Show"
|
let _ = tray.set_icon(Some(tauri::Icon::Raw(if i == "icon-1" {
|
||||||
} else {
|
include_bytes!("../icons/icon.ico").to_vec()
|
||||||
window.show().unwrap();
|
} else {
|
||||||
"Hide"
|
include_bytes!("../icons/tray_icon_with_transparency.png").to_vec()
|
||||||
};
|
})));
|
||||||
item_handle.set_title(new_title).unwrap();
|
}
|
||||||
}
|
}
|
||||||
"new" => {
|
"switch-menu" => {
|
||||||
WindowBuilder::new(&handle, "new", WindowUrl::App("index.html".into()))
|
let flag = is_menu1.load(Ordering::Relaxed);
|
||||||
.title("Tauri")
|
let (menu, tooltip) = if flag {
|
||||||
.build()
|
(menu2.clone(), "Menu 2")
|
||||||
.unwrap();
|
} else {
|
||||||
}
|
(menu1.clone(), "Tauri")
|
||||||
"set_title" => {
|
};
|
||||||
#[cfg(target_os = "macos")]
|
if let Some(tray) = app.tray_by_id("tray-1") {
|
||||||
tray_handle.set_title("Tauri").unwrap();
|
let _ = tray.set_menu(Some(menu));
|
||||||
}
|
let _ = tray.set_tooltip(Some(tooltip));
|
||||||
"icon_1" => {
|
}
|
||||||
#[cfg(target_os = "macos")]
|
is_menu1.store(!flag, Ordering::Relaxed);
|
||||||
tray_handle.set_icon_as_template(true).unwrap();
|
}
|
||||||
|
|
||||||
tray_handle
|
_ => {}
|
||||||
.set_icon(tauri::Icon::Raw(
|
})
|
||||||
include_bytes!("../icons/tray_icon_with_transparency.png")
|
.on_tray_event(|tray, event| {
|
||||||
.to_vec(),
|
if event.click_type == ClickType::Left {
|
||||||
))
|
let app = tray.app_handle();
|
||||||
.unwrap();
|
if let Some(window) = app.get_window("main") {
|
||||||
}
|
let _ = window.show();
|
||||||
"icon_2" => {
|
let _ = window.set_focus();
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
tray_handle.set_icon_as_template(true).unwrap();
|
|
||||||
|
|
||||||
tray_handle
|
|
||||||
.set_icon(tauri::Icon::Raw(
|
|
||||||
include_bytes!("../icons/icon.ico").to_vec(),
|
|
||||||
))
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
"switch_menu" => {
|
|
||||||
let flag = is_menu1.load(Ordering::Relaxed);
|
|
||||||
let (menu, tooltip) = if flag {
|
|
||||||
(tray_menu2.clone(), "Menu 2")
|
|
||||||
} else {
|
|
||||||
(tray_menu1.clone(), "Tauri")
|
|
||||||
};
|
|
||||||
tray_handle.set_menu(menu).unwrap();
|
|
||||||
tray_handle.set_tooltip(tooltip).unwrap();
|
|
||||||
is_menu1.store(!flag, Ordering::Relaxed);
|
|
||||||
}
|
|
||||||
"about" => {
|
|
||||||
let window = handle.get_window("main").unwrap();
|
|
||||||
window
|
|
||||||
.dialog()
|
|
||||||
.message("Tauri demo app")
|
|
||||||
.title("About app")
|
|
||||||
.parent(&window)
|
|
||||||
.ok_button_label("Homepage")
|
|
||||||
.cancel_button_label("Cancel")
|
|
||||||
.show(move |ok| {
|
|
||||||
if ok {
|
|
||||||
window.shell().open("https://tauri.app/", None).unwrap();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.build(app)
|
.build(app);
|
||||||
.map(|_| ())
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,7 @@
|
|||||||
"security": {
|
"security": {
|
||||||
"csp": {
|
"csp": {
|
||||||
"default-src": "'self' customprotocol: asset:",
|
"default-src": "'self' customprotocol: asset:",
|
||||||
|
"connect-src": "ipc: https://ipc.localhost",
|
||||||
"font-src": ["https://fonts.gstatic.com"],
|
"font-src": ["https://fonts.gstatic.com"],
|
||||||
"img-src": "'self' asset: https://asset.localhost blob: data:",
|
"img-src": "'self' asset: https://asset.localhost blob: data:",
|
||||||
"style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com"
|
"style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com"
|
||||||
@@ -136,11 +137,6 @@
|
|||||||
"deny": ["$APPDATA/db/*.stronghold"]
|
"deny": ["$APPDATA/db/*.stronghold"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systemTray": {
|
|
||||||
"iconPath": "icons/tray_icon_with_transparency.png",
|
|
||||||
"iconAsTemplate": true,
|
|
||||||
"menuOnLeftClick": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-10
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
import { open } from "@tauri-apps/plugin-shell";
|
import { open } from "@tauri-apps/plugin-shell";
|
||||||
import { appWindow, getCurrent } from "@tauri-apps/plugin-window";
|
import { getCurrent } from "@tauri-apps/plugin-window";
|
||||||
import * as os from "@tauri-apps/plugin-os";
|
import * as os from "@tauri-apps/plugin-os";
|
||||||
|
|
||||||
import Welcome from "./views/Welcome.svelte";
|
import Welcome from "./views/Welcome.svelte";
|
||||||
@@ -22,6 +22,8 @@
|
|||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { ask } from "@tauri-apps/plugin-dialog";
|
import { ask } from "@tauri-apps/plugin-dialog";
|
||||||
|
|
||||||
|
const appWindow = getCurrent();
|
||||||
|
|
||||||
if (appWindow.label !== "main") {
|
if (appWindow.label !== "main") {
|
||||||
appWindow.onCloseRequested(async (event) => {
|
appWindow.onCloseRequested(async (event) => {
|
||||||
const confirmed = await confirm("Are you sure?");
|
const confirmed = await confirm("Are you sure?");
|
||||||
@@ -121,20 +123,20 @@
|
|||||||
// Window controls
|
// Window controls
|
||||||
let isWindowMaximized;
|
let isWindowMaximized;
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
const window = getCurrent();
|
isWindowMaximized = await appWindow.isMaximized();
|
||||||
isWindowMaximized = await window.isMaximized();
|
appWindow.onResized(async () => {
|
||||||
window.onResized(async () => {
|
isWindowMaximized = await appWindow.isMaximized();
|
||||||
isWindowMaximized = await window.isMaximized();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function minimize() {
|
function minimize() {
|
||||||
getCurrent().minimize();
|
appWindow.minimize();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toggleMaximize() {
|
async function toggleMaximize() {
|
||||||
const window = getCurrent();
|
(await appWindow.isMaximized())
|
||||||
(await window.isMaximized()) ? window.unmaximize() : window.maximize();
|
? appWindow.unmaximize()
|
||||||
|
: appWindow.maximize();
|
||||||
}
|
}
|
||||||
|
|
||||||
let confirmed_close = false;
|
let confirmed_close = false;
|
||||||
@@ -147,7 +149,7 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (confirmed_close) {
|
if (confirmed_close) {
|
||||||
getCurrent().close();
|
appWindow.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,7 +356,7 @@
|
|||||||
<!-- Sidebar toggle, only visible on small screens -->
|
<!-- Sidebar toggle, only visible on small screens -->
|
||||||
<div
|
<div
|
||||||
id="sidebarToggle"
|
id="sidebarToggle"
|
||||||
class="z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8
|
class="z-2000 sidebar-toggle display-none 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"
|
bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"
|
||||||
>
|
>
|
||||||
{#if isSideBarOpen}
|
{#if isSideBarOpen}
|
||||||
|
|||||||
@@ -39,3 +39,19 @@ code.code-block {
|
|||||||
transform: translateX(var(--translate-x));
|
transform: translateX(var(--translate-x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-toggle {
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: env(safe-area-inset-top) env(safe-area-inset-right)
|
||||||
|
env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar,
|
||||||
|
#console {
|
||||||
|
padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import { appWindow } from "@tauri-apps/plugin-window";
|
import { getCurrent } from "@tauri-apps/plugin-window";
|
||||||
import { invoke } from "@tauri-apps/api/tauri";
|
import { invoke } from "@tauri-apps/api/tauri";
|
||||||
import { onMount, onDestroy } from "svelte";
|
import { onMount, onDestroy } from "svelte";
|
||||||
|
|
||||||
|
const appWindow = getCurrent();
|
||||||
|
|
||||||
export let onMessage;
|
export let onMessage;
|
||||||
let unlisten;
|
let unlisten;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getClient, Body, ResponseType } from "@tauri-apps/plugin-http";
|
import { fetch as tauriFetch } from "@tauri-apps/plugin-http";
|
||||||
import { JsonView } from "@zerodevx/svelte-json-view";
|
import { JsonView } from "@zerodevx/svelte-json-view";
|
||||||
|
|
||||||
let httpMethod = "GET";
|
let httpMethod = "GET";
|
||||||
@@ -8,53 +8,62 @@
|
|||||||
export let onMessage;
|
export let onMessage;
|
||||||
|
|
||||||
async function makeHttpRequest() {
|
async function makeHttpRequest() {
|
||||||
const client = await getClient().catch((e) => {
|
|
||||||
onMessage(e);
|
|
||||||
throw e;
|
|
||||||
});
|
|
||||||
let method = httpMethod || "GET";
|
let method = httpMethod || "GET";
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
url: "http://localhost:3003",
|
|
||||||
method: method || "GET",
|
method: method || "GET",
|
||||||
|
headers: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
let bodyType;
|
||||||
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
|
||||||
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
if (method !== "GET") {
|
||||||
) {
|
options.body = httpBody;
|
||||||
options.body = Body.json(JSON.parse(httpBody));
|
|
||||||
} else if (httpBody !== "") {
|
if (
|
||||||
options.body = Body.text(httpBody);
|
(httpBody.startsWith("{") && httpBody.endsWith("}")) ||
|
||||||
|
(httpBody.startsWith("[") && httpBody.endsWith("]"))
|
||||||
|
) {
|
||||||
|
options.headers["Content-Type"] = "application/json";
|
||||||
|
bodyType = "json";
|
||||||
|
} else if (httpBody !== "") {
|
||||||
|
bodyType = "text";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client.request(options).then(onMessage).catch(onMessage);
|
const response = await tauriFetch("http://localhost:3003", options);
|
||||||
|
const body =
|
||||||
|
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,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// http form
|
/// http form
|
||||||
let foo = "baz";
|
let foo = "baz";
|
||||||
let bar = "qux";
|
let bar = "qux";
|
||||||
let result = null;
|
let result = null;
|
||||||
let multipart = true;
|
|
||||||
|
|
||||||
async function doPost() {
|
async function doPost() {
|
||||||
const client = await getClient().catch((e) => {
|
const form = new FormData();
|
||||||
onMessage(e);
|
form.append("foo", foo);
|
||||||
throw e;
|
form.append("bar", bar);
|
||||||
});
|
const response = await tauriFetch("http://localhost:3003", {
|
||||||
|
|
||||||
result = await client.request({
|
|
||||||
url: "http://localhost:3003",
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: Body.form({
|
body: form,
|
||||||
foo,
|
|
||||||
bar,
|
|
||||||
}),
|
|
||||||
headers: multipart
|
|
||||||
? { "Content-Type": "multipart/form-data" }
|
|
||||||
: undefined,
|
|
||||||
responseType: ResponseType.Text,
|
|
||||||
});
|
});
|
||||||
|
result = {
|
||||||
|
url: response.url,
|
||||||
|
status: response.status,
|
||||||
|
ok: response.ok,
|
||||||
|
headers: Object.fromEntries(response.headers.entries()),
|
||||||
|
body: await response.text(),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -87,11 +96,6 @@
|
|||||||
<input class="input" bind:value={bar} />
|
<input class="input" bind:value={bar} />
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<label>
|
|
||||||
<input type="checkbox" bind:checked={multipart} />
|
|
||||||
Multipart
|
|
||||||
</label>
|
|
||||||
<br />
|
|
||||||
<br />
|
<br />
|
||||||
<button class="btn" type="button" on:click={doPost}> Post it</button>
|
<button class="btn" type="button" on:click={doPost}> Post it</button>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
appWindow,
|
getCurrent,
|
||||||
WebviewWindow,
|
|
||||||
LogicalSize,
|
LogicalSize,
|
||||||
UserAttentionType,
|
UserAttentionType,
|
||||||
PhysicalSize,
|
PhysicalSize,
|
||||||
PhysicalPosition,
|
PhysicalPosition,
|
||||||
|
Effect,
|
||||||
|
EffectState,
|
||||||
|
Window
|
||||||
} from "@tauri-apps/plugin-window";
|
} from "@tauri-apps/plugin-window";
|
||||||
import { open as openDialog } from "@tauri-apps/plugin-dialog";
|
import { open as openDialog } from "@tauri-apps/plugin-dialog";
|
||||||
import { open } from "@tauri-apps/plugin-shell";
|
import { open } from "@tauri-apps/plugin-shell";
|
||||||
|
|
||||||
|
const appWindow = getCurrent();
|
||||||
|
|
||||||
let selectedWindow = appWindow.label;
|
let selectedWindow = appWindow.label;
|
||||||
const windowMap = {
|
const windowMap = {
|
||||||
[appWindow.label]: appWindow,
|
[appWindow.label]: appWindow,
|
||||||
@@ -57,12 +61,28 @@
|
|||||||
"rowResize",
|
"rowResize",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const windowsEffects = ["mica", "blur", "acrylic"];
|
||||||
|
const isWindows = navigator.appVersion.includes("windows");
|
||||||
|
const isMacOS = navigator.appVersion.includes("macos");
|
||||||
|
let effectOptions = isWindows
|
||||||
|
? windowsEffects
|
||||||
|
: Object.keys(Effect)
|
||||||
|
.map((effect) => Effect[effect])
|
||||||
|
.filter((e) => !windowsEffects.includes(e));
|
||||||
|
const effectStateOptions = Object.keys(EffectState).map(
|
||||||
|
(state) => EffectState[state]
|
||||||
|
);
|
||||||
|
|
||||||
export let onMessage;
|
export let onMessage;
|
||||||
|
const mainEl = document.querySelector("main");
|
||||||
|
|
||||||
let newWindowLabel;
|
let newWindowLabel;
|
||||||
|
|
||||||
let urlValue = "https://tauri.app";
|
let urlValue = "https://tauri.app";
|
||||||
let resizable = true;
|
let resizable = true;
|
||||||
|
let maximizable = true;
|
||||||
|
let minimizable = true;
|
||||||
|
let closable = true;
|
||||||
let maximized = false;
|
let maximized = false;
|
||||||
let decorations = true;
|
let decorations = true;
|
||||||
let alwaysOnTop = false;
|
let alwaysOnTop = false;
|
||||||
@@ -91,6 +111,12 @@
|
|||||||
let cursorIgnoreEvents = false;
|
let cursorIgnoreEvents = false;
|
||||||
let windowTitle = "Awesome Tauri Example!";
|
let windowTitle = "Awesome Tauri Example!";
|
||||||
|
|
||||||
|
let effects = [];
|
||||||
|
let selectedEffect;
|
||||||
|
let effectState;
|
||||||
|
let effectRadius;
|
||||||
|
let effectR, effectG, effectB, effectA;
|
||||||
|
|
||||||
function openUrl() {
|
function openUrl() {
|
||||||
open(urlValue);
|
open(urlValue);
|
||||||
}
|
}
|
||||||
@@ -122,7 +148,7 @@
|
|||||||
function createWindow() {
|
function createWindow() {
|
||||||
if (!newWindowLabel) return;
|
if (!newWindowLabel) return;
|
||||||
|
|
||||||
const webview = new WebviewWindow(newWindowLabel);
|
const webview = new Window(newWindowLabel);
|
||||||
windowMap[newWindowLabel] = webview;
|
windowMap[newWindowLabel] = webview;
|
||||||
webview.once("tauri://error", function () {
|
webview.once("tauri://error", function () {
|
||||||
onMessage("Error creating new webview");
|
onMessage("Error creating new webview");
|
||||||
@@ -172,12 +198,47 @@
|
|||||||
await windowMap[selectedWindow].requestUserAttention(null);
|
await windowMap[selectedWindow].requestUserAttention(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function addEffect() {
|
||||||
|
if (!effects.includes(selectedEffect)) {
|
||||||
|
effects = [...effects, selectedEffect];
|
||||||
|
}
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
effects,
|
||||||
|
state: effectState,
|
||||||
|
radius: effectRadius,
|
||||||
|
};
|
||||||
|
if (
|
||||||
|
Number.isInteger(effectR) &&
|
||||||
|
Number.isInteger(effectG) &&
|
||||||
|
Number.isInteger(effectB) &&
|
||||||
|
Number.isInteger(effectA)
|
||||||
|
) {
|
||||||
|
payload.color = [effectR, effectG, effectB, effectA];
|
||||||
|
}
|
||||||
|
|
||||||
|
mainEl.classList.remove("bg-primary");
|
||||||
|
mainEl.classList.remove("dark:bg-darkPrimary");
|
||||||
|
await windowMap[selectedWindow].clearEffects();
|
||||||
|
await windowMap[selectedWindow].setEffects(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function clearEffects() {
|
||||||
|
effects = [];
|
||||||
|
await windowMap[selectedWindow].clearEffects();
|
||||||
|
mainEl.classList.add("bg-primary");
|
||||||
|
mainEl.classList.add("dark:bg-darkPrimary");
|
||||||
|
}
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
windowMap[selectedWindow];
|
windowMap[selectedWindow];
|
||||||
loadWindowPosition();
|
loadWindowPosition();
|
||||||
loadWindowSize();
|
loadWindowSize();
|
||||||
}
|
}
|
||||||
$: windowMap[selectedWindow]?.setResizable(resizable);
|
$: windowMap[selectedWindow]?.setResizable(resizable);
|
||||||
|
$: windowMap[selectedWindow]?.setMaximizable(maximizable);
|
||||||
|
$: windowMap[selectedWindow]?.setMinimizable(minimizable);
|
||||||
|
$: windowMap[selectedWindow]?.setClosable(closable);
|
||||||
$: maximized
|
$: maximized
|
||||||
? windowMap[selectedWindow]?.maximize()
|
? windowMap[selectedWindow]?.maximize()
|
||||||
: windowMap[selectedWindow]?.unmaximize();
|
: windowMap[selectedWindow]?.unmaximize();
|
||||||
@@ -280,6 +341,18 @@
|
|||||||
Resizable
|
Resizable
|
||||||
<input type="checkbox" bind:checked={resizable} />
|
<input type="checkbox" bind:checked={resizable} />
|
||||||
</label>
|
</label>
|
||||||
|
<label>
|
||||||
|
Maximizable
|
||||||
|
<input type="checkbox" bind:checked={maximizable} />
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Minimizable
|
||||||
|
<input type="checkbox" bind:checked={minimizable} />
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Closable
|
||||||
|
<input type="checkbox" bind:checked={closable} />
|
||||||
|
</label>
|
||||||
<label>
|
<label>
|
||||||
Has decorations
|
Has decorations
|
||||||
<input type="checkbox" bind:checked={decorations} />
|
<input type="checkbox" bind:checked={decorations} />
|
||||||
@@ -455,5 +528,88 @@
|
|||||||
<button class="btn" id="open-url"> Open URL </button>
|
<button class="btn" id="open-url"> Open URL </button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
{#if isWindows || isMacOS}
|
||||||
|
<div class="flex flex-col gap-1">
|
||||||
|
<div class="flex">
|
||||||
|
<label>
|
||||||
|
Effect
|
||||||
|
<select class="input" bind:value={selectedEffect}>
|
||||||
|
{#each effectOptions as effect}
|
||||||
|
<option value={effect}>{effect}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
State
|
||||||
|
<select class="input" bind:value={effectState}>
|
||||||
|
{#each effectStateOptions as state}
|
||||||
|
<option value={state}>{state}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>
|
||||||
|
Radius
|
||||||
|
<input class="input" type="number" bind:value={effectRadius} />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex">
|
||||||
|
<label>
|
||||||
|
Color
|
||||||
|
<div class="flex">
|
||||||
|
<input
|
||||||
|
style="max-width: 120px;"
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
placeholder="R"
|
||||||
|
bind:value={effectR}
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
style="max-width: 120px;"
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
placeholder="G"
|
||||||
|
bind:value={effectG}
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
style="max-width: 120px;"
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
placeholder="B"
|
||||||
|
bind:value={effectB}
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
style="max-width: 120px;"
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
placeholder="A"
|
||||||
|
bind:value={effectA}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex">
|
||||||
|
<button class="btn" style="width: 80px;" on:click={addEffect}
|
||||||
|
>Add</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex">
|
||||||
|
<div>
|
||||||
|
Applied effects: {effects.length ? effects.join(",") : "None"}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="btn" style="width: 80px;" on:click={clearEffects}
|
||||||
|
>Clear</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,13 +2,8 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
import {
|
import { defineConfig, presetIcons, presetUno, presetWebFonts } from "unocss";
|
||||||
defineConfig,
|
import extractorSvelte from "@unocss/extractor-svelte";
|
||||||
presetIcons,
|
|
||||||
presetUno,
|
|
||||||
extractorSvelte,
|
|
||||||
presetWebFonts,
|
|
||||||
} from "unocss";
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
theme: {
|
theme: {
|
||||||
|
|||||||
+20
-16
@@ -10,24 +10,28 @@
|
|||||||
"format-check": "prettier --check ."
|
"format-check": "prettier --check ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^15.0.2",
|
"@rollup/plugin-node-resolve": "15.1.0",
|
||||||
"@rollup/plugin-terser": "^0.4.1",
|
"@rollup/plugin-terser": "0.4.3",
|
||||||
"@rollup/plugin-typescript": "^11.1.0",
|
"@rollup/plugin-typescript": "11.1.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
"@typescript-eslint/eslint-plugin": "6.1.0",
|
||||||
"@typescript-eslint/parser": "^5.58.0",
|
"@typescript-eslint/parser": "6.1.0",
|
||||||
"covector": "^0.9.0",
|
"covector": "^0.9.0",
|
||||||
"eslint": "^8.38.0",
|
"eslint": "8.45.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "8.8.0",
|
||||||
"eslint-config-standard-with-typescript": "^34.0.1",
|
"eslint-config-standard-with-typescript": "36.1.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "2.27.5",
|
||||||
"eslint-plugin-n": "^16.0.0",
|
"eslint-plugin-n": "16.0.1",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "6.1.1",
|
||||||
"eslint-plugin-security": "^1.7.1",
|
"eslint-plugin-security": "1.7.1",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "3.0.0",
|
||||||
"rollup": "^3.20.4",
|
"rollup": "3.26.3",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "5.1.6"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"semver": ">=7.5.2",
|
||||||
|
"optionator": ">=0.9.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"pnpm": ">=7.24.2"
|
"pnpm": ">=7.33.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update 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!
|
||||||
|
te to alpha.11.
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[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!
|
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-app"
|
name = "tauri-plugin-app"
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.1"
|
||||||
description = "APIs to read application metadata and change app visibility on macOS."
|
description = "APIs to read application metadata and change app visibility on macOS."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = [ "tauri/dox" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# App
|

|
||||||
|
|
||||||
This plugin provides APIs to read application metadata and macOS app visibility functions.
|
This plugin provides APIs to read application metadata and macOS app visibility functions.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-app",
|
"name": "@tauri-apps/plugin-app",
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.1",
|
||||||
"license": "MIT or APACHE-2.0",
|
"license": "MIT or APACHE-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -27,6 +27,6 @@
|
|||||||
"tslib": "^2.5.0"
|
"tslib": "^2.5.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4"
|
"@tauri-apps/api": "2.0.0-alpha.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createConfig } from "../../shared/rollup.config.mjs";
|
|||||||
export default createConfig({
|
export default createConfig({
|
||||||
input: "guest-js/index.ts",
|
input: "guest-js/index.ts",
|
||||||
pkg: JSON.parse(
|
pkg: JSON.parse(
|
||||||
readFileSync(new URL("./package.json", import.meta.url), "utf8")
|
readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
||||||
),
|
),
|
||||||
external: [/^@tauri-apps\/api/],
|
external: [/^@tauri-apps\/api/],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,15 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/app)
|
||||||
|
//!
|
||||||
|
//! This plugin provides APIs to read application metadata and macOS app visibility functions.
|
||||||
|
|
||||||
|
#![doc(
|
||||||
|
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
|
||||||
|
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
|
||||||
|
)]
|
||||||
|
|
||||||
use tauri::{
|
use tauri::{
|
||||||
plugin::{Builder, TauriPlugin},
|
plugin::{Builder, TauriPlugin},
|
||||||
Runtime,
|
Runtime,
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update 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!
|
||||||
|
te to alpha.11.
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[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!
|
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-authenticator"
|
name = "tauri-plugin-authenticator"
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.1"
|
||||||
description = "Use hardware security-keys in your Tauri App."
|
description = "Use hardware security-keys in your Tauri App."
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = [ "tauri/dox" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||

|

|
||||||
|
|
||||||
Use hardware security-keys in your Tauri App.
|
Use hardware security-keys in your Tauri App.
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ const r2 = await auth.verifyRegistration(
|
|||||||
challenge,
|
challenge,
|
||||||
app,
|
app,
|
||||||
registerResult.registerData,
|
registerResult.registerData,
|
||||||
registerResult.clientData
|
registerResult.clientData,
|
||||||
);
|
);
|
||||||
const j2 = JSON.parse(r2);
|
const j2 = JSON.parse(r2);
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ const counter = await auth.verifySignature(
|
|||||||
signData.signData,
|
signData.signData,
|
||||||
clientData,
|
clientData,
|
||||||
keyHandle,
|
keyHandle,
|
||||||
pubkey
|
pubkey,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (counter && counter > 0) {
|
if (counter && counter > 0) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class Authenticator {
|
|||||||
challenge: string,
|
challenge: string,
|
||||||
application: string,
|
application: string,
|
||||||
registerData: string,
|
registerData: string,
|
||||||
clientData: string
|
clientData: string,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return await window.__TAURI_INVOKE__(
|
return await window.__TAURI_INVOKE__(
|
||||||
"plugin:authenticator|verify_registration",
|
"plugin:authenticator|verify_registration",
|
||||||
@@ -34,14 +34,14 @@ export class Authenticator {
|
|||||||
application,
|
application,
|
||||||
registerData,
|
registerData,
|
||||||
clientData,
|
clientData,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async sign(
|
async sign(
|
||||||
challenge: string,
|
challenge: string,
|
||||||
application: string,
|
application: string,
|
||||||
keyHandle: string
|
keyHandle: string,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
return await window.__TAURI_INVOKE__("plugin:authenticator|sign", {
|
return await window.__TAURI_INVOKE__("plugin:authenticator|sign", {
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
@@ -57,7 +57,7 @@ export class Authenticator {
|
|||||||
signData: string,
|
signData: string,
|
||||||
clientData: string,
|
clientData: string,
|
||||||
keyHandle: string,
|
keyHandle: string,
|
||||||
pubkey: string
|
pubkey: string,
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
return await window.__TAURI_INVOKE__(
|
return await window.__TAURI_INVOKE__(
|
||||||
"plugin:authenticator|verify_signature",
|
"plugin:authenticator|verify_signature",
|
||||||
@@ -68,7 +68,7 @@ export class Authenticator {
|
|||||||
clientData,
|
clientData,
|
||||||
keyHandle,
|
keyHandle,
|
||||||
pubkey,
|
pubkey,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-authenticator",
|
"name": "@tauri-apps/plugin-authenticator",
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.1",
|
||||||
"description": "Use hardware security-keys in your Tauri App.",
|
"description": "Use hardware security-keys in your Tauri App.",
|
||||||
"license": "MIT or APACHE-2.0",
|
"license": "MIT or APACHE-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
@@ -25,9 +25,9 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tslib": "^2.5.0"
|
"tslib": "2.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4"
|
"@tauri-apps/api": "2.0.0-alpha.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createConfig } from "../../shared/rollup.config.mjs";
|
|||||||
export default createConfig({
|
export default createConfig({
|
||||||
input: "guest-js/index.ts",
|
input: "guest-js/index.ts",
|
||||||
pkg: JSON.parse(
|
pkg: JSON.parse(
|
||||||
readFileSync(new URL("./package.json", import.meta.url), "utf8")
|
readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
||||||
),
|
),
|
||||||
external: [/^@tauri-apps\/api/],
|
external: [/^@tauri-apps\/api/],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/authenticator)
|
||||||
|
//!
|
||||||
|
//! Use hardware security-keys in your Tauri App.
|
||||||
|
//!
|
||||||
|
//! - Supported platforms: Windows, Linux, FreeBSD, NetBSD, OpenBSD, and macOS.
|
||||||
|
|
||||||
|
#![doc(
|
||||||
|
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
|
||||||
|
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
|
||||||
|
)]
|
||||||
#![cfg(not(any(target_os = "android", target_os = "ios")))]
|
#![cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
|
|
||||||
mod auth;
|
mod auth;
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../shared/tsconfig.json
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"include": ["guest-js/*.ts"]
|
||||||
|
}
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update 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!
|
||||||
|
te to alpha.11.
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[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!
|
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-autostart"
|
name = "tauri-plugin-autostart"
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.1"
|
||||||
description = "Automatically launch your application at startup."
|
description = "Automatically launch your application at startup."
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = [ "tauri/dox" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||

|

|
||||||
|
|
||||||
Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
|
Automatically launch your application at startup. Supports Windows, Mac (via AppleScript or Launch Agent), and Linux.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-autostart",
|
"name": "@tauri-apps/plugin-autostart",
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.1",
|
||||||
"license": "MIT or APACHE-2.0",
|
"license": "MIT or APACHE-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -24,9 +24,9 @@
|
|||||||
"LICENSE"
|
"LICENSE"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tslib": "^2.5.0"
|
"tslib": "2.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4"
|
"@tauri-apps/api": "2.0.0-alpha.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createConfig } from "../../shared/rollup.config.mjs";
|
|||||||
export default createConfig({
|
export default createConfig({
|
||||||
input: "guest-js/index.ts",
|
input: "guest-js/index.ts",
|
||||||
pkg: JSON.parse(
|
pkg: JSON.parse(
|
||||||
readFileSync(new URL("./package.json", import.meta.url), "utf8")
|
readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
||||||
),
|
),
|
||||||
external: [/^@tauri-apps\/api/],
|
external: [/^@tauri-apps\/api/],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// 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(
|
||||||
|
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
|
||||||
|
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
|
||||||
|
)]
|
||||||
#![cfg(not(any(target_os = "android", target_os = "ios")))]
|
#![cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
|
|
||||||
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
|
use auto_launch::{AutoLaunch, AutoLaunchBuilder};
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../shared/tsconfig.json
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"include": ["guest-js/*.ts"]
|
||||||
|
}
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update 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!
|
||||||
|
te to alpha.11.
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[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!
|
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-cli"
|
name = "tauri-plugin-cli"
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.1"
|
||||||
description = "Parse arguments from your Tauri application's command line interface."
|
description = "Parse arguments from your Tauri application's command line interface."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = [ "tauri/dox" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# CLI
|

|
||||||
|
|
||||||
Parse arguments from your Command Line Interface.
|
Parse arguments from your Command Line Interface.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-cli",
|
"name": "@tauri-apps/plugin-cli",
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.1",
|
||||||
"license": "MIT or APACHE-2.0",
|
"license": "MIT or APACHE-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -27,6 +27,6 @@
|
|||||||
"tslib": "^2.4.1"
|
"tslib": "^2.4.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4"
|
"@tauri-apps/api": "2.0.0-alpha.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createConfig } from "../../shared/rollup.config.mjs";
|
|||||||
export default createConfig({
|
export default createConfig({
|
||||||
input: "guest-js/index.ts",
|
input: "guest-js/index.ts",
|
||||||
pkg: JSON.parse(
|
pkg: JSON.parse(
|
||||||
readFileSync(new URL("./package.json", import.meta.url), "utf8")
|
readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
||||||
),
|
),
|
||||||
external: [/^@tauri-apps\/api/],
|
external: [/^@tauri-apps\/api/],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,17 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/cli)
|
||||||
|
//!
|
||||||
|
//! Parse arguments from your Command Line Interface.
|
||||||
|
//!
|
||||||
|
//! - Supported platforms: Windows, Linux and macOS.
|
||||||
|
|
||||||
|
#![doc(
|
||||||
|
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
|
||||||
|
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
|
||||||
|
)]
|
||||||
|
|
||||||
use tauri::{
|
use tauri::{
|
||||||
plugin::{Builder, PluginApi, TauriPlugin},
|
plugin::{Builder, PluginApi, TauriPlugin},
|
||||||
AppHandle, Manager, Runtime, State,
|
AppHandle, Manager, Runtime, State,
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update 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!
|
||||||
|
te to alpha.11.
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[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!
|
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-clipboard-manager"
|
name = "tauri-plugin-clipboard-manager"
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.1"
|
||||||
description = "Read and write to the system clipboard."
|
description = "Read and write to the system clipboard."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
links = "tauri-plugin-clipboard-manager"
|
links = "tauri-plugin-clipboard-manager"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = [ "tauri/dox" ]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { workspace = true }
|
tauri-build = { workspace = true }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Clipboard Manager
|

|
||||||
|
|
||||||
Read and write to the system clipboard.
|
Read and write to the system clipboard.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
@@ -36,7 +36,7 @@ type ClipResponse = Clip<"PlainText", string>;
|
|||||||
*/
|
*/
|
||||||
async function writeText(
|
async function writeText(
|
||||||
text: string,
|
text: string,
|
||||||
opts?: { label?: string }
|
opts?: { label?: string },
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
return window.__TAURI_INVOKE__("plugin:clipboard|write", {
|
return window.__TAURI_INVOKE__("plugin:clipboard|write", {
|
||||||
data: {
|
data: {
|
||||||
@@ -60,7 +60,7 @@ async function writeText(
|
|||||||
*/
|
*/
|
||||||
async function readText(): Promise<string> {
|
async function readText(): Promise<string> {
|
||||||
const kind: ClipResponse = await window.__TAURI_INVOKE__(
|
const kind: ClipResponse = await window.__TAURI_INVOKE__(
|
||||||
"plugin:clipboard|read"
|
"plugin:clipboard|read",
|
||||||
);
|
);
|
||||||
return kind.options;
|
return kind.options;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tauri-apps/plugin-clipboard-manager",
|
"name": "@tauri-apps/plugin-clipboard-manager",
|
||||||
"version": "2.0.0-alpha.0",
|
"version": "2.0.0-alpha.1",
|
||||||
"license": "MIT or APACHE-2.0",
|
"license": "MIT or APACHE-2.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tauri Programme within The Commons Conservancy"
|
"Tauri Programme within The Commons Conservancy"
|
||||||
@@ -27,6 +27,6 @@
|
|||||||
"tslib": "^2.4.1"
|
"tslib": "^2.4.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-alpha.4"
|
"@tauri-apps/api": "2.0.0-alpha.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { createConfig } from "../../shared/rollup.config.mjs";
|
|||||||
export default createConfig({
|
export default createConfig({
|
||||||
input: "guest-js/index.ts",
|
input: "guest-js/index.ts",
|
||||||
pkg: JSON.parse(
|
pkg: JSON.parse(
|
||||||
readFileSync(new URL("./package.json", import.meta.url), "utf8")
|
readFileSync(new URL("./package.json", import.meta.url), "utf8"),
|
||||||
),
|
),
|
||||||
external: [/^@tauri-apps\/api/],
|
external: [/^@tauri-apps\/api/],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,15 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
//! [](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/clipboard-manager)
|
||||||
|
//!
|
||||||
|
//! Read and write to the system clipboard.
|
||||||
|
|
||||||
|
#![doc(
|
||||||
|
html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png",
|
||||||
|
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
|
||||||
|
)]
|
||||||
|
|
||||||
use tauri::{
|
use tauri::{
|
||||||
plugin::{Builder, TauriPlugin},
|
plugin::{Builder, TauriPlugin},
|
||||||
Manager, Runtime,
|
Manager, Runtime,
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## \[2.0.0-alpha.1]
|
||||||
|
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update 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!
|
||||||
|
d6e80b)([#545](https://github.com/tauri-apps/plugins-workspace/pull/545)) Fixes docs.rs build by enabling the `tauri/dox` feature flag.
|
||||||
|
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update to alpha.11.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
- Upgraded to `fs@2.0.0-alpha.1`
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
## \[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!
|
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tauri-plugin-dialog"
|
name = "tauri-plugin-dialog"
|
||||||
version = "2.0.0-alpha.0"
|
version = "2.0.0-alpha.1"
|
||||||
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
|
||||||
edition = { workspace = true }
|
edition = { workspace = true }
|
||||||
authors = { workspace = true }
|
authors = { workspace = true }
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
links = "tauri-plugin-dialog"
|
links = "tauri-plugin-dialog"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
features = [ "tauri/dox" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
tauri-plugin-fs = { path = "../fs", version = "2.0.0-alpha.0" }
|
tauri-plugin-fs = { path = "../fs", version = "2.0.0-alpha.1" }
|
||||||
|
|
||||||
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||||
glib = "0.16"
|
glib = "0.16"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Dialog
|

|
||||||
|
|
||||||
Native system dialogs for opening and saving files along with message dialogs.
|
Native system dialogs for opening and saving files along with message dialogs.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@@ -103,16 +103,16 @@ interface ConfirmDialogOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function open(
|
async function open(
|
||||||
options?: OpenDialogOptions & { multiple?: false; directory?: false }
|
options?: OpenDialogOptions & { multiple?: false; directory?: false },
|
||||||
): Promise<null | FileResponse>;
|
): Promise<null | FileResponse>;
|
||||||
async function open(
|
async function open(
|
||||||
options?: OpenDialogOptions & { multiple?: true; directory?: false }
|
options?: OpenDialogOptions & { multiple?: true; directory?: false },
|
||||||
): Promise<null | FileResponse[]>;
|
): Promise<null | FileResponse[]>;
|
||||||
async function open(
|
async function open(
|
||||||
options?: OpenDialogOptions & { multiple?: false; directory?: true }
|
options?: OpenDialogOptions & { multiple?: false; directory?: true },
|
||||||
): Promise<null | string>;
|
): Promise<null | string>;
|
||||||
async function open(
|
async function open(
|
||||||
options?: OpenDialogOptions & { multiple?: true; directory?: true }
|
options?: OpenDialogOptions & { multiple?: true; directory?: true },
|
||||||
): Promise<null | string[]>;
|
): Promise<null | string[]>;
|
||||||
/**
|
/**
|
||||||
* Open a file/directory selection dialog.
|
* Open a file/directory selection dialog.
|
||||||
@@ -125,7 +125,7 @@ async function open(
|
|||||||
* You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope).
|
* You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope).
|
||||||
* @example
|
* @example
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { open } from '@tauri-apps/api/dialog';
|
* import { open } from '@tauri-apps/plugin-dialog';
|
||||||
* // Open a selection dialog for image files
|
* // Open a selection dialog for image files
|
||||||
* const selected = await open({
|
* const selected = await open({
|
||||||
* multiple: true,
|
* multiple: true,
|
||||||
@@ -145,7 +145,7 @@ async function open(
|
|||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { open } from '@tauri-apps/api/dialog';
|
* import { open } from '@tauri-apps/plugin-dialog';
|
||||||
* import { appDir } from '@tauri-apps/api/path';
|
* import { appDir } from '@tauri-apps/api/path';
|
||||||
* // Open a selection dialog for directories
|
* // Open a selection dialog for directories
|
||||||
* const selected = await open({
|
* const selected = await open({
|
||||||
@@ -167,7 +167,7 @@ async function open(
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function open(
|
async function open(
|
||||||
options: OpenDialogOptions = {}
|
options: OpenDialogOptions = {},
|
||||||
): Promise<null | string | string[] | FileResponse | FileResponse[]> {
|
): Promise<null | string | string[] | FileResponse | FileResponse[]> {
|
||||||
if (typeof options === "object") {
|
if (typeof options === "object") {
|
||||||
Object.freeze(options);
|
Object.freeze(options);
|
||||||
@@ -187,7 +187,7 @@ async function open(
|
|||||||
* You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope).
|
* You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope).
|
||||||
* @example
|
* @example
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { save } from '@tauri-apps/api/dialog';
|
* import { save } from '@tauri-apps/plugin-dialog';
|
||||||
* const filePath = await save({
|
* const filePath = await save({
|
||||||
* filters: [{
|
* filters: [{
|
||||||
* name: 'Image',
|
* name: 'Image',
|
||||||
@@ -212,7 +212,7 @@ async function save(options: SaveDialogOptions = {}): Promise<string | null> {
|
|||||||
* Shows a message dialog with an `Ok` button.
|
* Shows a message dialog with an `Ok` button.
|
||||||
* @example
|
* @example
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { message } from '@tauri-apps/api/dialog';
|
* import { message } from '@tauri-apps/plugin-dialog';
|
||||||
* await message('Tauri is awesome', 'Tauri');
|
* await message('Tauri is awesome', 'Tauri');
|
||||||
* await message('File not found', { title: 'Tauri', type: 'error' });
|
* await message('File not found', { title: 'Tauri', type: 'error' });
|
||||||
* ```
|
* ```
|
||||||
@@ -227,7 +227,7 @@ async function save(options: SaveDialogOptions = {}): Promise<string | null> {
|
|||||||
*/
|
*/
|
||||||
async function message(
|
async function message(
|
||||||
message: string,
|
message: string,
|
||||||
options?: string | MessageDialogOptions
|
options?: string | MessageDialogOptions,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const opts = typeof options === "string" ? { title: options } : options;
|
const opts = typeof options === "string" ? { title: options } : options;
|
||||||
return window.__TAURI_INVOKE__("plugin:dialog|message", {
|
return window.__TAURI_INVOKE__("plugin:dialog|message", {
|
||||||
@@ -242,7 +242,7 @@ async function message(
|
|||||||
* Shows a question dialog with `Yes` and `No` buttons.
|
* Shows a question dialog with `Yes` and `No` buttons.
|
||||||
* @example
|
* @example
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { ask } from '@tauri-apps/api/dialog';
|
* import { ask } from '@tauri-apps/plugin-dialog';
|
||||||
* const yes = await ask('Are you sure?', 'Tauri');
|
* const yes = await ask('Are you sure?', 'Tauri');
|
||||||
* const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });
|
* const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });
|
||||||
* ```
|
* ```
|
||||||
@@ -256,7 +256,7 @@ async function message(
|
|||||||
*/
|
*/
|
||||||
async function ask(
|
async function ask(
|
||||||
message: string,
|
message: string,
|
||||||
options?: string | ConfirmDialogOptions
|
options?: string | ConfirmDialogOptions,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const opts = typeof options === "string" ? { title: options } : options;
|
const opts = typeof options === "string" ? { title: options } : options;
|
||||||
return window.__TAURI_INVOKE__("plugin:dialog|ask", {
|
return window.__TAURI_INVOKE__("plugin:dialog|ask", {
|
||||||
@@ -272,7 +272,7 @@ async function ask(
|
|||||||
* Shows a question dialog with `Ok` and `Cancel` buttons.
|
* Shows a question dialog with `Ok` and `Cancel` buttons.
|
||||||
* @example
|
* @example
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { confirm } from '@tauri-apps/api/dialog';
|
* import { confirm } from '@tauri-apps/plugin-dialog';
|
||||||
* const confirmed = await confirm('Are you sure?', 'Tauri');
|
* const confirmed = await confirm('Are you sure?', 'Tauri');
|
||||||
* const confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });
|
* const confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });
|
||||||
* ```
|
* ```
|
||||||
@@ -286,7 +286,7 @@ async function ask(
|
|||||||
*/
|
*/
|
||||||
async function confirm(
|
async function confirm(
|
||||||
message: string,
|
message: string,
|
||||||
options?: string | ConfirmDialogOptions
|
options?: string | ConfirmDialogOptions,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const opts = typeof options === "string" ? { title: options } : options;
|
const opts = typeof options === "string" ? { title: options } : options;
|
||||||
return window.__TAURI_INVOKE__("plugin:dialog|confirm", {
|
return window.__TAURI_INVOKE__("plugin:dialog|confirm", {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user