Skip to content

Commit

Permalink
Some fixes to the plugin example
Browse files Browse the repository at this point in the history
Co-authored-by: Amr Bashir <[email protected]>
  • Loading branch information
oscartbeaumont and amrbashir committed Apr 30, 2024
1 parent cb33951 commit 57454ef
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 17 deletions.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/custom-plugin/app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tauri-build = { version = "2.0.0-beta.13", features = [] }
tauri = { version = "=2.0.0-beta.16", features = [] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tauri-specta-example-custom-plugin = { path = "../../plugin" }
tauri-plugin-specta-example = { path = "../../plugin" }

[features]
# this feature is used for production builds or when `devPath` points to the filesystem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"identifier": "main-capability",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": ["allow-add_numbers"]
"permissions": ["event:default", "specta-example:allow-add-numbers"]
}
2 changes: 1 addition & 1 deletion examples/custom-plugin/app/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

fn main() {
tauri::Builder::default()
.plugin(tauri_specta_example_custom_plugin::init())
.plugin(tauri_plugin_specta_example::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
3 changes: 2 additions & 1 deletion examples/custom-plugin/plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "tauri-specta-example-custom-plugin"
name = "tauri-plugin-specta-example"
version = "0.0.0"
edition = "2021"
links = "tauri-plugin-specta-example"

[build-dependencies]
tauri-plugin = { version = "=2.0.0-beta.13", features = ["build"] }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Automatically generated - DO NOT EDIT!

"$schema" = "../../schemas/schema.json"

[[permission]]
identifier = "allow-add-numbers"
description = "Enables the add_numbers command without any pre-configured scope."
commands.allow = ["add_numbers"]

[[permission]]
identifier = "deny-add-numbers"
description = "Denies the add_numbers command without any pre-configured scope."
commands.deny = ["add_numbers"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
| Permission | Description |
|------|-----|
|`allow-add-numbers`|Enables the add_numbers command without any pre-configured scope.|
|`deny-add-numbers`|Denies the add_numbers command without any pre-configured scope.|
Loading

0 comments on commit 57454ef

Please sign in to comment.