mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-24 21:40:48 +02:00
feat(store)!: fully rework and add auto save (#1550)
* Add auto save to store plugin * Put jsdoc at constructor instead of class level * Clippy * Use enum instead of bool * Some(AutoSaveMessage::Cancel) | None * from_millis * u64 * Add change file * Rename to emit_on_change * should use Duration in `with_store` * Add breaking change notice to change file * Emit change event for inserts by reset * Update readme example * Update example * Remove extra line * Make description clear it only works with managed * Fix links in docstring * Fix doc string closing * get_mut * Proof of concept * fmt * Load store on create * cargo fmt * Fix merge conflits * Format * small cleanup * update docs, use `impl Into<JsonValue>` * fix doctests, further simplification of api * add store options --------- Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com> Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
co-authored by
Tillmann
Lucas Nogueira
parent
44273b9889
commit
f12d35609a
@@ -0,0 +1,13 @@
|
||||
# Automatically generated - DO NOT EDIT!
|
||||
|
||||
"$schema" = "../../schemas/schema.json"
|
||||
|
||||
[[permission]]
|
||||
identifier = "allow-create-store"
|
||||
description = "Enables the create_store command without any pre-configured scope."
|
||||
commands.allow = ["create_store"]
|
||||
|
||||
[[permission]]
|
||||
identifier = "deny-create-store"
|
||||
description = "Denies the create_store command without any pre-configured scope."
|
||||
commands.deny = ["create_store"]
|
||||
@@ -9,6 +9,7 @@ All operations are enabled by default.
|
||||
|
||||
|
||||
|
||||
- `allow-create-store`
|
||||
- `allow-clear`
|
||||
- `allow-delete`
|
||||
- `allow-entries`
|
||||
@@ -60,6 +61,32 @@ Denies the clear command without any pre-configured scope.
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`store:allow-create-store`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Enables the create_store command without any pre-configured scope.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`store:deny-create-store`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Denies the create_store command without any pre-configured scope.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`store:allow-delete`
|
||||
|
||||
</td>
|
||||
|
||||
@@ -11,6 +11,7 @@ All operations are enabled by default.
|
||||
|
||||
"""
|
||||
permissions = [
|
||||
"allow-create-store",
|
||||
"allow-clear",
|
||||
"allow-delete",
|
||||
"allow-entries",
|
||||
|
||||
@@ -304,6 +304,16 @@
|
||||
"type": "string",
|
||||
"const": "deny-clear"
|
||||
},
|
||||
{
|
||||
"description": "Enables the create_store command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "allow-create-store"
|
||||
},
|
||||
{
|
||||
"description": "Denies the create_store command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "deny-create-store"
|
||||
},
|
||||
{
|
||||
"description": "Enables the delete command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
|
||||
Reference in New Issue
Block a user