mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
feat: update to tauri beta, add permissions (#862)
Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
This commit is contained in:
@@ -12,7 +12,7 @@ rustc-args = ["--cfg", "docsrs"]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { workspace = true }
|
||||
tauri-plugin = { workspace = true, features = ["build"] }
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
|
||||
@@ -110,7 +110,7 @@ class BiometricPlugin(private val activity: Activity): Plugin(activity) {
|
||||
* Check the device's availability and type of biometric authentication.
|
||||
*/
|
||||
@Command
|
||||
fun getStatus(invoke: Invoke) {
|
||||
fun status(invoke: Invoke) {
|
||||
val manager = BiometricManager.from(activity)
|
||||
val biometryResult = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
manager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK)
|
||||
|
||||
@@ -2,15 +2,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use std::process::exit;
|
||||
const COMMANDS: &[&str] = &["authenticate", "status"];
|
||||
|
||||
fn main() {
|
||||
if let Err(error) = tauri_build::mobile::PluginBuilder::new()
|
||||
tauri_plugin::Builder::new(COMMANDS)
|
||||
.android_path("android")
|
||||
.ios_path("ios")
|
||||
.run()
|
||||
{
|
||||
println!("{error:#}");
|
||||
exit(1);
|
||||
}
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
"tslib": "2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-alpha.13"
|
||||
"@tauri-apps/api": "2.0.0-beta.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
schemas/
|
||||
@@ -0,0 +1 @@
|
||||
schemas/
|
||||
@@ -0,0 +1,13 @@
|
||||
# Automatically generated - DO NOT EDIT!
|
||||
|
||||
"$schema" = "../../schemas/schema.json"
|
||||
|
||||
[[permission]]
|
||||
identifier = "allow-authenticate"
|
||||
description = "Enables the authenticate command without any pre-configured scope."
|
||||
commands.allow = ["authenticate"]
|
||||
|
||||
[[permission]]
|
||||
identifier = "deny-authenticate"
|
||||
description = "Denies the authenticate command without any pre-configured scope."
|
||||
commands.deny = ["authenticate"]
|
||||
@@ -0,0 +1,13 @@
|
||||
# Automatically generated - DO NOT EDIT!
|
||||
|
||||
"$schema" = "../../schemas/schema.json"
|
||||
|
||||
[[permission]]
|
||||
identifier = "allow-status"
|
||||
description = "Enables the status command without any pre-configured scope."
|
||||
commands.allow = ["status"]
|
||||
|
||||
[[permission]]
|
||||
identifier = "deny-status"
|
||||
description = "Denies the status command without any pre-configured scope."
|
||||
commands.deny = ["status"]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Permissions
|
||||
|
||||
## allow-authenticate
|
||||
|
||||
Enables the authenticate command without any pre-configured scope.
|
||||
|
||||
## deny-authenticate
|
||||
|
||||
Denies the authenticate command without any pre-configured scope.
|
||||
|
||||
## allow-status
|
||||
|
||||
Enables the status command without any pre-configured scope.
|
||||
|
||||
## deny-status
|
||||
|
||||
Denies the status command without any pre-configured scope.
|
||||
|
||||
Reference in New Issue
Block a user