From ecfa56367bef2e957d26acc32930123a38372253 Mon Sep 17 00:00:00 2001 From: MnlPhlp Date: Mon, 25 Nov 2024 00:58:54 +0100 Subject: [PATCH] added scanning state handler --- Cargo.toml | 2 +- build.rs | 1 + examples/plugin-blec-example/package.json | 3 +- examples/plugin-blec-example/src/App.vue | 107 ++++++++++++++---- guest-js/index.ts | 9 ++ package.json | 2 +- .../commands/scanning_state.toml | 13 +++ permissions/autogenerated/reference.md | 27 +++++ permissions/default.toml | 2 +- permissions/schemas/schema.json | 10 ++ src/commands.rs | 24 +++- src/handler.rs | 40 ++++++- 12 files changed, 214 insertions(+), 26 deletions(-) create mode 100644 permissions/autogenerated/commands/scanning_state.toml diff --git a/Cargo.toml b/Cargo.toml index eb35bb8..89defaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tauri-plugin-blec" license = "MIT OR Apache-2.0" -version = "0.1.6" +version = "0.2.0" authors = ["Manuel Philipp"] description = "BLE-Client plugin for Tauri" edition = "2021" diff --git a/build.rs b/build.rs index 1d7609d..f9f1a79 100644 --- a/build.rs +++ b/build.rs @@ -11,6 +11,7 @@ const COMMANDS: &[&str] = &[ "subscribe", "subscribe_string", "unsubscribe", + "scanning_state", ]; fn main() { diff --git a/examples/plugin-blec-example/package.json b/examples/plugin-blec-example/package.json index bcc6f33..b5ef307 100644 --- a/examples/plugin-blec-example/package.json +++ b/examples/plugin-blec-example/package.json @@ -10,7 +10,8 @@ "tauri": "tauri" }, "dependencies": { - "@mnlphlp/plugin-blec": ">=0.1.1", + "@mnlphlp/plugin-blec": ">=0.3.0", + "@saeris/vue-spinners": "^1.0.8", "@tauri-apps/api": ">=2.0.0", "@tauri-apps/plugin-log": "~2", "@tauri-apps/plugin-shell": ">=2.0.0", diff --git a/examples/plugin-blec-example/src/App.vue b/examples/plugin-blec-example/src/App.vue index 4f6701d..536105e 100644 --- a/examples/plugin-blec-example/src/App.vue +++ b/examples/plugin-blec-example/src/App.vue @@ -1,16 +1,23 @@