Contribute
This is a stub and is waiting for contributions. Get involved by visiting us on GitHub or joining us on Discord.
Send native notifications to your user using the notification plugin.
Install the notifications plugin to get started.
Use your project’s package manager to add the dependency:
Run the following command in the src-tauri
folder to add the plugin to the project’s dependencies in Cargo.toml
:
Modify lib.rs
to initialize the plugin:
If you’d like to use notifications in JavaScript then install the npm package as well:
Here are a few examples of how to use the notification plugin:
The notification plugin is available in both JavaScript and Rust.
Follow these steps to send a notification:
Check if permission is granted
Request permission if not granted
Send the notification
Contribute
This is a stub and is waiting for contributions. Get involved by visiting us on GitHub or joining us on Discord.
Contribute
This is a stub and is waiting for contributions. Get involved by visiting us on GitHub or joining us on Discord.
Contribute
This is a stub and is waiting for contributions. Get involved by visiting us on GitHub or joining us on Discord.
Aside from normal sanitization procedures of user input there are currently no known security considerations.
This permission set configures which notification features are by default exposed.
It allows all notification related features.
allow-is-permission-granted
allow-request-permission
allow-notify
allow-register-action-types
allow-register-listener
allow-cancel
allow-get-pending
allow-remove-active
allow-get-active
allow-check-permissions
allow-show
allow-batch
allow-list-channels
allow-delete-channel
allow-create-channel
allow-permission-state
Identifier | Description |
---|---|
|
Enables the batch command without any pre-configured scope. |
|
Denies the batch command without any pre-configured scope. |
|
Enables the cancel command without any pre-configured scope. |
|
Denies the cancel command without any pre-configured scope. |
|
Enables the check_permissions command without any pre-configured scope. |
|
Denies the check_permissions command without any pre-configured scope. |
|
Enables the create_channel command without any pre-configured scope. |
|
Denies the create_channel command without any pre-configured scope. |
|
Enables the delete_channel command without any pre-configured scope. |
|
Denies the delete_channel command without any pre-configured scope. |
|
Enables the get_active command without any pre-configured scope. |
|
Denies the get_active command without any pre-configured scope. |
|
Enables the get_pending command without any pre-configured scope. |
|
Denies the get_pending command without any pre-configured scope. |
|
Enables the is_permission_granted command without any pre-configured scope. |
|
Denies the is_permission_granted command without any pre-configured scope. |
|
Enables the list_channels command without any pre-configured scope. |
|
Denies the list_channels command without any pre-configured scope. |
|
Enables the notify command without any pre-configured scope. |
|
Denies the notify command without any pre-configured scope. |
|
Enables the permission_state command without any pre-configured scope. |
|
Denies the permission_state command without any pre-configured scope. |
|
Enables the register_action_types command without any pre-configured scope. |
|
Denies the register_action_types command without any pre-configured scope. |
|
Enables the register_listener command without any pre-configured scope. |
|
Denies the register_listener command without any pre-configured scope. |
|
Enables the remove_active command without any pre-configured scope. |
|
Denies the remove_active command without any pre-configured scope. |
|
Enables the request_permission command without any pre-configured scope. |
|
Denies the request_permission command without any pre-configured scope. |
|
Enables the show command without any pre-configured scope. |
|
Denies the show command without any pre-configured scope. |
© 2024 Tauri Contributors. CC-BY / MIT