Implement complete Android settings and recovery controls (#104)
Android ARM verification / rust (push) Failing after 46m46s
Android ARM verification / android (push) Failing after 7s
Dependency security audit / rustsec (push) Successful in 22s

This commit is contained in:
hugo committed 2026-10-10 12:07:28 +02:00
1 parent 06575363a2
commit 43f660ace3
34 files changed
+2720 -64

No files matched your search

+53
View File
@@ -857,6 +857,12 @@ pub struct MobileGitIdentity {
pub email: String,
}
#[derive(Clone, uniffi::Record)]
pub struct MobileTotpCacheStatus {
pub entries: u32,
pub detail: String,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, uniffi::Enum)]
pub enum MobileMutationAction {
Move,
@@ -1629,6 +1635,21 @@ pub struct MobileKeyTransferImport {
#[uniffi::export]
impl MobileKeyTransferImport {
pub fn add_image(
&self,
image: Vec<u8>,
) -> Result<MobileKeyTransferProgress, MobileKeyTransferFfiError> {
self.importer
.lock()
.map_err(|_| MobileKeyTransferFfiError::Failed {
kind: MobileKeyTransferErrorKind::Failed,
message: "the key-transfer session is unavailable".to_owned(),
})?
.add_image(ironstorage::repository::SecretBytes::new(image))
.map(Into::into)
.map_err(Into::into)
}
pub fn add_frame(
&self,
payload: String,
@@ -1712,6 +1733,32 @@ pub struct MobileAuthentication {
#[uniffi::export]
impl MobileAuthentication {
pub fn set_authentication_timeout_text(
&self,
seconds: String,
) -> Result<(), MobileAuthenticationFfiError> {
self.authentication
.set_authentication_timeout_text(&seconds)
.map_err(Into::into)
}
pub fn totp_cache_status(&self) -> Result<MobileTotpCacheStatus, MobileAuthenticationFfiError> {
self.authentication
.totp_cache_status()
.map(|(entries, detail)| MobileTotpCacheStatus { entries, detail })
.map_err(Into::into)
}
pub fn rebuild_totp_cache(
&self,
operation: Arc<MobileTotpOperation>,
) -> Result<MobileTotpPage, MobileAuthenticationFfiError> {
self.authentication
.rebuild_totp_cache(&operation.operation)
.map(Into::into)
.map_err(Into::into)
}
pub fn state(&self) -> Result<MobileAuthenticationState, MobileAuthenticationFfiError> {
self.authentication
.state()
@@ -1760,6 +1807,12 @@ impl MobileAuthentication {
.map_err(Into::into)
}
pub fn set_default_key(&self, fingerprint: String) -> Result<(), MobileAuthenticationFfiError> {
self.authentication
.set_default_key(&fingerprint)
.map_err(Into::into)
}
pub fn set_git_identity(
&self,
name: String,