Commit Graph

29 Commits

Author SHA1 Message Date
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 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 6cdaa31959 Add store function 2024-10-03 10:17:47 +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 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 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 a04ea2f382 refactor: only inject API IIFE script when withGlobalTauri is true (#1071)
* refactor: only inject API IIFE script when withGlobalTauri is true

* fmt

* update tauri
2024-03-19 15:03:20 -03:00
Tony 79691e93e0 fix(store): with_store and StoreCollection become private in #1011 (#1040)
* Fix with_store become private in #1011

* Add change file
2024-03-07 11:52:33 +01: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
Amr Bashir 7cefa2b0bd pub 2024-02-19 16:03:32 +02:00
amrbashir 72db444401 feat(sql,store): add Builder::new
ref: https://github.com/tauri-apps/tauri/issues/8880
2024-02-19 15:54:56 +02:00
Lucas Fernandes Nogueira d74fc0a097 feat: update to alpha.11 (#555) 2023-08-14 14:51:20 -03:00
Simon Hyll 5fd597ddaf docs: added banners and icons (#443)
* added banners and icons

* fix: formatting
2023-06-20 14:55:14 +03:00
Lucas Fernandes Nogueira b131bc8f7c feat(plugins): inject API on window.__TAURI__ (#383) 2023-05-23 14:20:14 -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
FabianLars fad6edab71 Merge remote-tracking branch 'origin/dev' into next 2023-04-26 16:56:03 +02:00
Jonas Kruckenberg 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
Lucas Fernandes Nogueira 22f987bf24 feat: update setup hook to new syntax (#257) 2023-02-16 13:42:26 -03:00
Jonas Kruckenberg a2afb07029 refactor(store): rename plugin
align with plugin naming conventions
2023-01-06 14:24:11 +01:00
Jonas Kruckenberg eb3495fb72 copy plugin sources 2022-12-14 18:43:39 +01:00