diff --git a/gpgui/src-tauri/src/storage.rs b/gpgui/src-tauri/src/storage.rs index 6a6847d..6770362 100644 --- a/gpgui/src-tauri/src/storage.rs +++ b/gpgui/src-tauri/src/storage.rs @@ -32,12 +32,15 @@ impl AppStorage<'_> { } } + /// Get a value from the store (.data.json). + /// If the value is encrypted, it will be decrypted. + /// If the value is not found, or if there is an error, `None` is returned. pub fn get(&self, hint: KeyHint) -> Option { let stores = self.app_handle.state::>(); with_store(self.app_handle.clone(), stores, self.path, |store| { store .get(hint.key) - .ok_or_else(|| Error::Deserialize("Value not found".into())) + .ok_or_else(|| Error::Deserialize(format!("Key {} not found in store", hint.key).into())) .and_then(|value| { if !hint.encrypted { return Ok(serde_json::from_value::(value.clone())?); diff --git a/gpgui/src/components/ConnectForm/PasswordAuth.tsx b/gpgui/src/components/ConnectForm/PasswordAuth.tsx index a66892e..e9f3a22 100644 --- a/gpgui/src/components/ConnectForm/PasswordAuth.tsx +++ b/gpgui/src/components/ConnectForm/PasswordAuth.tsx @@ -66,6 +66,7 @@ export default function PasswordAuth() { type="submit" loading={loading} disabled={loading} + sx={{ flex: 1 }} > Login