Commit Graph
44 Commits
Author SHA1 Message Date
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
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 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 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 79bc8d08f4 Add lazy store 2024-10-03 10:52:12 +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 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
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
Ahmed Elkhoudiry 22f5acf240 feat(store): Add android & iOS support (#1011)
* update cli

* init android module

* upgdate gitignore

* add desktop and mobile

* android

* ios

* lib

* remove comment

* cargo fmt

* skip empty file creation

* android comments

* apple path

* Discard changes to plugins/store/ios/README.md

* stop auto directories creation

* Update README.md
2024-03-04 21:02:17 +02:00
Lucas Fernandes NogueiraandAmr Bashir e438e0a62d feat: update to alpha.17, typed mobile plugin IPC arguments (#676)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2023-10-29 16:06:44 -03:00
Lucas Fernandes Nogueira d74fc0a097 feat: update to alpha.11 (#555) 2023-08-14 14:51:20 -03:00
Lucas Fernandes Nogueira 5914fb9f36 chore: add license headers (#384)
* feat: check for license headers

* add headers

* format
2023-05-21 16:56:10 -03:00
Lucas Fernandes Nogueira 937e6a5be6 feat: use tauri next branch, fix tests, MSRV 1.65 (#354) 2023-05-12 17:16:50 -03:00
Lucas Nogueira 9244d4ee8f fix(store): adjust load and save implementation 2023-05-02 13:46:56 -03:00
FabianLars fad6edab71 Merge remote-tracking branch 'origin/dev' into next 2023-04-26 16:56:03 +02:00
Lucas Fernandes Nogueira bbdccefa2d chore(deps): update to tauri alpha.8 (#303) 2023-04-14 08:02:48 -03:00
afa 06f39586af fix(store): Load state from disk and extend defaults, fixes #296 (#295)
* fix(store): Load state from disk and extend defaults, fixes #296

* fmt
2023-04-02 11:37:29 +02:00
Jonas KruckenbergandFabianLars d4223f6fd2 feat(store): expose Store to Rust code (#108)
* feat(store): expose Store to Rust code in a meaningful way

* manually implement Default to improve generic inference

* update readme

* rename method

* make error Send and Sync

* make `use_store` more ergonomic

* export JsonValue

* fix readme example

* fmt

---------

Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2023-03-06 15:44:02 +01:00
FabianLars 5b9144594b fix: make clippy 1.66 happy 2023-01-03 10:24:04 +01:00
Jonas Kruckenberg 64aed34eff clippy 2022-12-14 20:46:23 +01:00
Jonas Kruckenberg eb3495fb72 copy plugin sources 2022-12-14 18:43:39 +01:00