Tony
bf5a19120f
Clippy
2024-10-17 11:34:08 +08:00
Tony
99cafa6d73
Fix description and create_new logic
2024-10-17 11:31:38 +08:00
Lucas Nogueira
150e030c12
rename builder fn to build()
2024-10-16 15:38:24 -03:00
Lucas Nogueira
983bd82212
rename newOrExisting to load, load to reload
2024-10-16 15:24:58 -03:00
Tony
44016a480f
Remove R: Runtime from Builder
2024-10-15 23:06:43 +08:00
Tony
985059a1f0
Don't make StoreState public
2024-10-15 22:52:11 +08:00
Tony
5f2de5e4ea
Missed if load
2024-10-15 22:48:35 +08:00
Tony
fbc7149d60
Remove load
2024-10-15 22:47:57 +08:00
Lucas Nogueira
a7af6612f2
keep store lock throughout whole new_or_existing_inner
2024-10-15 10:28:58 -03:00
Lucas Nogueira
8a8bdcac23
rename createOrLoad to newOrExisting
2024-10-15 10:28:22 -03:00
Lucas Nogueira
028d6661ca
reintroduce "get existing store" behavior for create_or_load
2024-10-15 09:52:56 -03:00
Lucas Nogueira
ff9bddd95c
make api consistent with the JS implementation, add examples
2024-10-15 08:06:27 -03:00
Lucas Nogueira
083c165543
rename createOrExistingStore to createOrLoad
2024-10-15 07:31:54 -03:00
Tony
99321ddbfa
Remove StoreInner from pub and expose is_empty
2024-10-14 20:34:43 +08:00
Tony
02d077ea3b
Remove with_store
2024-10-14 15:32:47 +08:00
Tony
1498eb5404
Expose resolve_store_path
2024-10-14 09:58:52 +08:00
Tony
a020ae38e2
Remove unused pub(crate)
2024-10-11 13:24:47 +08:00
Tony
3f470a7a67
Clean up
2024-10-10 17:15:13 +08:00
Tony
39dec5d5b4
Change to close_resource and take &self
2024-10-10 16:12:57 +08:00
Tony
d88fcb5c8a
Return result in resolve_store_path
2024-10-10 15:53:32 +08:00
Tony
3413d2a0f7
Use close instead
2024-10-10 14:05:54 +08:00
Tony
a00cb15224
Rename inner store's inset method to set
2024-10-08 10:22:58 +08:00
Tony
dc5be009b7
Add create or existing
2024-10-05 16:21:27 +08:00
Tony
7faf8c31e0
Differentiate json null from no value for events
2024-10-04 17:09:41 +08:00
Tony
831105d7a8
Use undefined for empty value in get
2024-10-04 10:11:13 +08:00
Tony
1ef9f6a487
Use pretty json by default
2024-10-04 09:40:33 +08:00
Tony
4037589000
Add default (de)serialize fn
2024-10-04 08:47:30 +08:00
Tony
fc51b3d132
More docs for StoreBuilder::build
2024-10-03 22:36:51 +08:00
Tony
73f365d3f0
Show case how to use pretty json
2024-10-03 20:35:19 +08:00
Tony
4f13a03401
Fix js get and close store
2024-10-03 20:10:15 +08:00
Tony
718f5dc90d
Allow js to use pre-stored (de)serialize functions
2024-10-03 16:46:06 +08:00
Tony
d22de0257d
Use absolute path for store
2024-10-03 16:11:53 +08:00
Tony
45b2af4cfe
Docs
2024-10-03 15:23:22 +08:00
Tony
42c5a1cb56
try get first
2024-10-03 13:56:43 +08:00
Tony
3acf66ee57
Revert "Add get-or-create-store"
...
This reverts commit 7ffd769240 .
2024-10-03 13:53:59 +08:00
Tony
7ffd769240
Add get-or-create-store
2024-10-03 13:34:38 +08:00
Tony
79bc8d08f4
Add lazy store
2024-10-03 10:52:12 +08:00
Tony
6cdaa31959
Add store function
2024-10-03 10:17:47 +08:00
Tony
4cb9d8de5e
Add close store
2024-10-03 10:09:43 +08:00
Tony
8975d10bb7
Clean up
2024-10-03 09:44:46 +08:00
Tony
98d4fc4e9b
Remove share store
2024-10-03 09:33:42 +08:00
Tony
ea9c101da8
Store to resource table by default
2024-10-03 09:33:21 +08:00
Tony
35b439f70f
Enable auto save by default
2024-10-02 18:19:31 +08:00
Tony
9811756e6c
refactor(store): more reworks
2024-10-02 18:02:44 +08:00
Tony
7e5e34420b
Cancel auto save on save ( #1859 )
2024-10-01 23:13:20 -03:00
Tony
f12d35609a
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 >
2024-10-01 15:10:40 -03:00
Lucas Fernandes Nogueira
0c040bcc9a
fix(store): remove Android and iOS plugins, closes #1256 ( #1695 )
...
The Android and iOS support introduced on #1011 is not really supported - the Tauri path API correctly resolves the cache directory on mobile, and we can access those directly using Rust code.
This is a breaking change because we no longer uses the same directory to store the files - app_cache_dir returns a different location
2024-08-27 14:18:02 -03:00
Lucas Fernandes Nogueira
22a17980ff
feat: update to tauri beta.24 ( #1537 )
...
* feat: update to tauri beta.24
* remove .tauri
* pnpm build
2024-07-12 17:59:17 -03:00
Fabian-Lars
0d4d029011
build: Update pnpm to v9 ( #1309 )
...
* build: Update pnpm to v9
* update actions
* remove last actions-rs usage
* clippy
* clippy again
* revert default feature
2024-05-13 17:03:04 +02:00
Fabian-Lars
bb51a41d67
feat: Remove UNC prefix in paths returned to the frontend ( #1168 )
...
* feat: Remove UNC prefix in paths returned to the frontend
* that one doesn't count
* map instead of mut
* revert accidental ipc::response change
* move dunce to workspace root
2024-04-17 15:49:32 +02:00