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:
Tillmann
2024-02-04 03:14:41 +09:00
committed by GitHub
parent 506ce4835b
commit d198c01486
387 changed files with 21883 additions and 943 deletions
+1 -1
View File
@@ -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)
+3 -7
View File
@@ -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();
}
+1 -1
View File
@@ -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/
+1
View File
@@ -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.