Compare commits

..

No commits in common. "3098d1170f2cd1c603c4f4b41c28d59a20e57263" and "11a374765cfceb820b9c44b21cf1350ab97446a7" have entirely different histories.

3 changed files with 2 additions and 6 deletions

View File

@ -32,15 +32,12 @@ 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<T: DeserializeOwned + Debug>(&self, hint: KeyHint) -> Option<T> {
let stores = self.app_handle.state::<StoreCollection<Wry>>();
with_store(self.app_handle.clone(), stores, self.path, |store| {
store
.get(hint.key)
.ok_or_else(|| Error::Deserialize(format!("Key {} not found in store", hint.key).into()))
.ok_or_else(|| Error::Deserialize("Value not found".into()))
.and_then(|value| {
if !hint.encrypted {
return Ok(serde_json::from_value::<T>(value.clone())?);

View File

@ -58,7 +58,7 @@ export const loginPortalAtom = atom(
}
if (userAuthCookie === "empty" || prelogonUserAuthCookie === "empty") {
throw new Error("Got empty user auth cookie");
throw new Error("Failed to login, please try again");
}
// Here, we have got the portal config successfully, refresh the cached portal data

View File

@ -66,7 +66,6 @@ export default function PasswordAuth() {
type="submit"
loading={loading}
disabled={loading}
sx={{ flex: 1 }}
>
Login
</LoadingButton>