Skip to content

Commit

Permalink
fixed a missing trait import
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreaming-Codes committed Jul 25, 2024
1 parent e2ca11b commit 75a5e1d
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 24 deletions.
103 changes: 94 additions & 9 deletions permissions/autogenerated/reference.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,94 @@
| Permission | Description |
|------|-----|
|`allow-get-product-price`|Enables the get_product_price command without any pre-configured scope.|
|`deny-get-product-price`|Denies the get_product_price command without any pre-configured scope.|
|`allow-purchase`|Enables the purchase command without any pre-configured scope.|
|`deny-purchase`|Denies the purchase command without any pre-configured scope.|
|`allow-start-connection`|Enables the start_connection command without any pre-configured scope.|
|`deny-start-connection`|Denies the start_connection command without any pre-configured scope.|
|`default`|Allows initiating payments and starting connections to google payments services|
## Default Permission

Allows initiating payments and starting connections to google payments services

- `allow-start-connection`
- `allow-purchase`

### Permission Table

<table>
<tr>
<th>Identifier</th>
<th>Description</th>
</tr>


<tr>
<td>

`mobile-payments:allow-get-product-price`

</td>
<td>

Enables the get_product_price command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`mobile-payments:deny-get-product-price`

</td>
<td>

Denies the get_product_price command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`mobile-payments:allow-purchase`

</td>
<td>

Enables the purchase command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`mobile-payments:deny-purchase`

</td>
<td>

Denies the purchase command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`mobile-payments:allow-start-connection`

</td>
<td>

Enables the start_connection command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`mobile-payments:deny-start-connection`

</td>
<td>

Denies the start_connection command without any pre-configured scope.

</td>
</tr>
</table>
18 changes: 7 additions & 11 deletions permissions/schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"minimum": 1.0
},
"description": {
"description": "Human-readable description of what the permission does.",
"description": "Human-readable description of what the permission does. Tauri convention is to use <h4> headings in markdown content for Tauri documentation generation purposes.",
"type": [
"string",
"null"
Expand Down Expand Up @@ -111,7 +111,7 @@
"type": "string"
},
"description": {
"description": "Human-readable description of what the permission does.",
"description": "Human-readable description of what the permission does. Tauri internal convention is to use <h4> headings in markdown content for Tauri documentation generation purposes.",
"type": [
"string",
"null"
Expand Down Expand Up @@ -139,14 +139,10 @@
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
"type": [
"array",
"null"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
Expand Down Expand Up @@ -176,7 +172,7 @@
}
},
"Scopes": {
"description": "A restriction of the command/endpoint functionality.\n\nIt can be of any serde serializable type and is used for allowing or preventing certain actions inside a Tauri command.\n\nThe scope is passed to the command and handled/enforced by the command itself.",
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
"type": "object",
"properties": {
"allow": {
Expand All @@ -190,7 +186,7 @@
}
},
"deny": {
"description": "Data that defines what is denied by the scope.",
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
"type": [
"array",
"null"
Expand Down
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#![cfg(mobile)]

use tauri::{
plugin::{Builder, TauriPlugin},
Manager, Runtime,
};
use tauri::{plugin::{Builder, TauriPlugin}, Manager, Runtime, Emitter};
use tauri::async_runtime::{spawn_blocking};
use tauri::ipc::{Channel, InvokeBody};
use tauri::plugin::PluginHandle;
Expand Down

0 comments on commit 75a5e1d

Please sign in to comment.