mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-02 13:41:49 +02:00
docs: update README.md and remove allowlist information (#381)
This commit is contained in:
committed by
GitHub
parent
d677f73495
commit
f4069f5588
@@ -2,9 +2,7 @@ use std::path::PathBuf;
|
||||
|
||||
use serde::{de::Error as DeError, Deserialize, Deserializer};
|
||||
|
||||
/// Allowlist for the shell APIs.
|
||||
///
|
||||
/// See more: https://tauri.app/v1/api/config#shellallowlistconfig
|
||||
/// Configuration for the shell plugin.
|
||||
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
||||
pub struct Config {
|
||||
|
||||
@@ -104,7 +104,7 @@ impl Program {
|
||||
/// Opens path or URL with the program specified in `with`, or system default if `None`.
|
||||
///
|
||||
/// The path will be matched against the shell open validation regex, defaulting to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`.
|
||||
/// A custom validation regex may be supplied in the config in `tauri > allowlist > scope > open`.
|
||||
/// A custom validation regex may be supplied in the config in `plugins > shell > scope > open`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
@@ -248,7 +248,7 @@ impl Scope {
|
||||
|
||||
/// Open a path in the default (or specified) browser.
|
||||
///
|
||||
/// The path is validated against the `tauri > allowlist > shell > open` validation regex, which
|
||||
/// The path is validated against the `plugins > shell > open` validation regex, which
|
||||
/// defaults to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`.
|
||||
pub fn open(&self, path: &str, with: Option<Program>) -> Result<(), Error> {
|
||||
// ensure we pass validation if the configuration has one
|
||||
|
||||
Reference in New Issue
Block a user