UNPKG

matrix-react-sdk

Version:
52 lines (51 loc) 1.88 kB
import React from "react"; import { BackupTrustInfo, KeyBackupInfo } from "matrix-js-sdk/src/crypto-api"; interface IState { loading: boolean; error: boolean; backupKeyStored: boolean | null; backupKeyCached: boolean | null; backupKeyWellFormed: boolean | null; secretStorageKeyInAccount: boolean | null; secretStorageReady: boolean | null; /** Information on the current key backup version, as returned by the server. * * `null` could mean any of: * * we haven't yet requested the data from the server. * * we were unable to reach the server. * * the server returned key backup version data we didn't understand or was malformed. * * there is actually no backup on the server. */ backupInfo: KeyBackupInfo | null; /** * Information on whether the backup in `backupInfo` is correctly signed, and whether we have the right key to * decrypt it. * * `undefined` if `backupInfo` is null, or if crypto is not enabled in the client. */ backupTrustInfo: BackupTrustInfo | undefined; /** * If key backup is currently enabled, the backup version we are backing up to. */ activeBackupVersion: string | null; /** * Number of sessions remaining to be backed up. `null` if we have no information on this. */ sessionsRemaining: number | null; } export default class SecureBackupPanel extends React.PureComponent<{}, IState> { private unmounted; constructor(props: {}); componentDidMount(): void; componentWillUnmount(): void; private onKeyBackupSessionsRemaining; private onKeyBackupStatus; private loadBackupStatus; private getUpdatedDiagnostics; private startNewBackup; private deleteBackup; private restoreBackup; private resetSecretStorage; render(): React.ReactNode; } export {};