Refactor backup subscription UI

This commit is contained in:
trevor-signal
2025-10-15 11:05:59 -04:00
committed by GitHub
parent dbaf2f5e68
commit 6ec7272d4e
14 changed files with 481 additions and 320 deletions

View File

@@ -232,7 +232,7 @@ export type StorageAccessType = {
backupTier: number | undefined;
cloudBackupStatus: BackupStatusType | undefined;
backupSubscriptionStatus: BackupsSubscriptionType;
backupSubscriptionStatus: BackupsSubscriptionType | undefined;
backupKeyViewed: boolean;
localBackupFolder: string | undefined;

View File

@@ -47,13 +47,9 @@ export type BackupMediaDownloadStatusType = {
isIdle: boolean;
};
export type BackupsSubscriptionType =
export type BackupsSubscriptionType = (
| {
status: 'off' | 'not-found' | 'expired';
}
| {
status: 'free';
mediaIncludedInBackupDurationDays: number;
status: 'not-found' | 'expired';
}
| (
| {
@@ -66,7 +62,8 @@ export type BackupsSubscriptionType =
expiryTimestamp?: number;
cost?: SubscriptionCostType;
}
);
)
) & { lastFetchedAtMs?: number; isFetching?: boolean };
export type LocalBackupMetadataVerificationType = {
snapshotDir: string;