docs: update README.md and remove allowlist information (#381)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-20 16:28:27 -07:00
committed by GitHub
parent d677f73495
commit f4069f5588
43 changed files with 386 additions and 282 deletions
+16 -7
View File
@@ -1,6 +1,6 @@
![{{plugin name}}](banner.jpg)
# Notification
<!-- description -->
Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API.
## Install
@@ -18,7 +18,9 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
<!-- plugin here --> = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
tauri-plugin-notification = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-notification = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
@@ -26,11 +28,18 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add <!-- plugin here -->
pnpm add @tauri-apps/plugin-notification
# or
npm add <!-- plugin here -->
npm add @tauri-apps/plugin-notification
# or
yarn add <!-- plugin here -->
yarn add @tauri-apps/plugin-notification
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-notification#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-notification#v2
# or
yarn add https://github.com/tauri-apps/tauri-plugin-notification#v2
```
## Usage
@@ -42,7 +51,7 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(<!-- plugin here -->)
.plugin(tauri_plugin_notification::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
-15
View File
@@ -6,21 +6,6 @@
* Send toast notifications (brief auto-expiring OS window element) to your user.
* Can also be used with the Notification Web API.
*
* This package is also accessible with `window.__TAURI__.notification` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
*
* The APIs must be added to [`tauri.allowlist.notification`](https://tauri.app/v1/api/config/#allowlistconfig.notification) in `tauri.conf.json`:
* ```json
* {
* "tauri": {
* "allowlist": {
* "notification": {
* "all": true // enable all notification APIs
* }
* }
* }
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @module
*/