mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-08-05 18:18:37 +02:00
chore: update docs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
"deep-link": patch
|
"deep-link": patch
|
||||||
|
"deep-link-js": patch
|
||||||
---
|
---
|
||||||
|
|
||||||
Implement `get_current` on Linux and Windows.
|
Implement `get_current` on Linux and Windows.
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import { type UnlistenFn, listen } from '@tauri-apps/api/event'
|
|||||||
* const urls = await getCurrent();
|
* const urls = await getCurrent();
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* #### - **Windows / Linux**: Unsupported.
|
* #### - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
|
||||||
|
* Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
|
||||||
|
* Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect..
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -108,6 +108,12 @@ mod imp {
|
|||||||
|
|
||||||
impl<R: Runtime> DeepLink<R> {
|
impl<R: Runtime> DeepLink<R> {
|
||||||
/// Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
|
/// Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
|
||||||
|
///
|
||||||
|
/// ## Platform-specific:
|
||||||
|
///
|
||||||
|
/// - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
|
||||||
|
/// Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
|
||||||
|
/// Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect.
|
||||||
pub fn get_current(&self) -> crate::Result<Option<Vec<url::Url>>> {
|
pub fn get_current(&self) -> crate::Result<Option<Vec<url::Url>>> {
|
||||||
self.0
|
self.0
|
||||||
.run_mobile_plugin::<GetCurrentResponse>("getCurrent", ())
|
.run_mobile_plugin::<GetCurrentResponse>("getCurrent", ())
|
||||||
|
|||||||
Reference in New Issue
Block a user