diff --git a/ng-app/src-tauri/src/lib.rs b/ng-app/src-tauri/src/lib.rs index 18ff0f4..873d008 100644 --- a/ng-app/src-tauri/src/lib.rs +++ b/ng-app/src-tauri/src/lib.rs @@ -572,7 +572,9 @@ impl AppBuilder { pub fn run(self) { let setup = self.setup; - let builder = tauri::Builder::default() + + #[allow(unused_mut)] + let mut builder = tauri::Builder::default() .setup(move |app| { if let Some(setup) = setup { (setup)(app)?; @@ -592,7 +594,7 @@ impl AppBuilder { #[cfg(mobile)] { - let builder = builder.plugin(tauri_plugin_barcode_scanner::init()); + builder = builder.plugin(tauri_plugin_barcode_scanner::init()); } builder diff --git a/ng-app/src/api.ts b/ng-app/src/api.ts index 05e13d2..f6eaecc 100644 --- a/ng-app/src/api.ts +++ b/ng-app/src/api.ts @@ -106,6 +106,11 @@ const handler = { }; //console.log(info,res); return res; + } else if (path[0] === "get_device_name") { + let tauri_platform = import.meta.env.TAURI_PLATFORM; + if (tauri_platform == 'android') return "Android Phone"; + else if (tauri_platform == 'ios') return "iPhone"; + else return await tauri.invoke(path[0],{}); } else if (path[0] === "locales") { let from_rust = await tauri.invoke("locales",{}); let from_js = window.navigator.languages; diff --git a/ng-app/src/lib/components/PasswordInput.svelte b/ng-app/src/lib/components/PasswordInput.svelte index 6ed9c88..80a9569 100644 --- a/ng-app/src/lib/components/PasswordInput.svelte +++ b/ng-app/src/lib/components/PasswordInput.svelte @@ -40,6 +40,7 @@