chore: added tauri plugin store api
enables persistant state in settings file
mellbacon committed
Jul 9, 2023 at 13:06 UTC
e7495bb2dfb084c06ae8ef07ac62b4fe0e9ee1ce
5 files changed
+24
-2
package.json
+2
-1
@@ -18,7 +18,8 @@
18
"sass": "^1.62.0",
19
"sortablejs": "^1.15.0",
20
"svelte-splitpanes": "^0.7.13",
21
- "tauri-plugin-fs-watch-api": "https://github.com/tauri-apps/tauri-plugin-fs-watch"
21
+ "tauri-plugin-fs-watch-api": "https://github.com/tauri-apps/tauri-plugin-fs-watch",
22
+ "tauri-plugin-store-api": "https://github.com/tauri-apps/tauri-plugin-store#v1"
23
},
24
"devDependencies": {
25
"@sveltejs/vite-plugin-svelte": "^2.0.4",
src-tauri/Cargo.lock
+14
-1
@@ -1587,6 +1587,7 @@ dependencies = [
1587
"tauri",
1588
"tauri-build",
1589
"tauri-plugin-fs-watch",
1590
+ "tauri-plugin-store",
1591
"trash",
1592
"windows 0.32.0",
1593
]
@@ -2697,7 +2698,7 @@ dependencies = [
2698
[[package]]
2699
name = "tauri-plugin-fs-watch"
2700
version = "0.0.0"
2700
-source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#07406f1c9d7817c95dc9ebf4bfe2cdb1ea352045"
2701
+source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#0d0ed7b9075ee21f37d787217fba3ef0784b2449"
2702
dependencies = [
2703
"log",
2704
"notify",
@@ -2708,6 +2709,18 @@ dependencies = [
2709
"thiserror",
2710
]
2711
2712
+[[package]]
2713
+name = "tauri-plugin-store"
2714
+version = "0.0.0"
2715
+source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#0d0ed7b9075ee21f37d787217fba3ef0784b2449"
2716
+dependencies = [
2717
+ "log",
2718
+ "serde",
2719
+ "serde_json",
2720
+ "tauri",
2721
+ "thiserror",
2722
+]
2723
+
2724
[[package]]
2725
name = "tauri-runtime"
2726
version = "0.12.2"
src-tauri/Cargo.toml
+1
@@ -18,6 +18,7 @@ serde = { version = "1.0", features = ["derive"] }
18
tauri = { version = "1.2.5", features = ["clipboard-write-text", "dialog-ask", "dialog-confirm", "dialog-open", "dialog-save", "fs-create-dir", "fs-exists", "fs-read-dir", "fs-read-file", "fs-rename-file", "fs-write-file", "path-all", "shell-open", "window-center", "window-close", "window-create", "window-hide", "window-maximize", "window-minimize", "window-print", "window-set-decorations", "window-set-focus", "window-set-fullscreen", "window-set-icon", "window-show", "window-start-dragging", "window-unmaximize", "window-unminimize"] }
19
tauri-plugin-fs-watch = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
20
trash = "3.0.2"
21
+tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
22
23
[dev-dependencies]
24
windows = "0.32.0"
src-tauri/src/main.rs
+1
@@ -55,6 +55,7 @@ fn main() {
55
tauri::Builder::default()
56
.invoke_handler(tauri::generate_handler![open_in_explorer, delete_file, attempt_file_access, is_file, is_folder])
57
.plugin(tauri_plugin_fs_watch::init())
58
+ .plugin(tauri_plugin_store::Builder::default().build())
59
.run(tauri::generate_context!())
60
.expect("error while running tauri application");
61
}
yarn.lock
+6
@@ -1227,6 +1227,12 @@ svelte@^3.58.0:
1227
dependencies:
1228
"@tauri-apps/api" "^1.2.0"
1229
1230
+"tauri-plugin-store-api@https://github.com/tauri-apps/tauri-plugin-store#v1":
1231
+ version "0.0.0"
1232
+ resolved "https://github.com/tauri-apps/tauri-plugin-store#96e2eb3971c981ece96f0a9e47dad14a2d1d2539"
1233
+ dependencies:
1234
+ "@tauri-apps/api" "^1.2.0"
1235
+
1236
to-regex-range@^5.0.1:
1237
version "5.0.1"
1238
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"