π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Refine local backup UI copy and spacing
Prateek Sunalc4ef76bf1aae
diff --git a/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart b/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dartindex 38e6271991..d85a18f91e 100644--- a/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart+++ b/mobile/apps/auth/lib/ui/settings/data/local_backup/local_backup_experience.dart@@ -112,12 +112,6 @@ class _LocalBackupExperienceState extends State<LocalBackupExperience> {await _withBusyGuard(() async {if (shouldEnable) {- final authenticated = await _authenticateForBackupAction(- 'Authenticate to enable backups',- );- if (!authenticated) {- return;- }final success = await _startEnableFlow();if (!success) {return;diff --git a/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart b/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dartindex abaac6450f..e8b211488a 100644--- a/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart+++ b/mobile/apps/auth/lib/ui/settings/data/local_backup_settings_page.dart@@ -76,20 +76,39 @@ class LocalBackupSettingsPage extends StatelessWidget {onTap: () async {await controller.updatePassword(context);},- );- },- ),- const SizedBox(height: 20),- _BackupLocationCard(- controller: controller,- colorScheme: colorScheme,- textTheme: textTheme,- ),+ );+ },+ ),+ const SizedBox(height: 16),+ _BackupLocationCard(+ controller: controller,+ colorScheme: colorScheme,+ textTheme: textTheme,+ ),const SizedBox(height: 12),- _BackupActionCard(- controller: controller,- colorScheme: colorScheme,- textTheme: textTheme,+ MenuItemWidget(+ captionedTextWidget: const CaptionedTextWidget(+ title: 'Create backup now',+ ),+ alignCaptionedTextToLeft: true,+ singleBorderRadius: 12,+ menuItemColor: colorScheme.fillFaint,+ trailingWidget: controller.isBusy+ ? const SizedBox(+ width: 20,+ height: 20,+ child: CircularProgressIndicator(+ strokeWidth: 2,+ ),+ )+ : const Icon(+ Icons.chevron_right_outlined,+ color: Colors.grey,+ ),+ onTap: () async {+ if (controller.isBusy) return;+ await controller.runManualBackup();+ },),],)@@ -148,29 +167,12 @@ class _LocalBackupVariantShell extends StatelessWidget {? SafeArea(bottom: false, child: body): const _LocalBackupLoading(),),- if (controller.isBusy && controller.shouldShowBusyOverlay)- const _LocalBackupBusyOverlay(),],),);}}-class _LocalBackupBusyOverlay extends StatelessWidget {- const _LocalBackupBusyOverlay();-- @override- Widget build(BuildContext context) {- return Positioned.fill(- child: Container(- color: _scaleAlpha(Colors.black, 0.05),- alignment: Alignment.center,- child: const CircularProgressIndicator(),- ),- );- }-}-class _LocalBackupLoading extends StatelessWidget {const _LocalBackupLoading();@@ -309,68 +311,3 @@ class _BackupButton extends StatelessWidget {);}}--class _BackupActionCard extends StatelessWidget {- const _BackupActionCard({- required this.controller,- required this.colorScheme,- required this.textTheme,- });-- final LocalBackupExperienceController controller;- final dynamic colorScheme;- final dynamic textTheme;-- @override- Widget build(BuildContext context) {- return Material(- color: colorScheme.fillFaint,- borderRadius: BorderRadius.circular(12),- child: Padding(- padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),- child: Row(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Expanded(- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Text(- 'Manual backup',- style: textTheme.bodyBold,- ),- const SizedBox(height: 6),- Text(- 'Create an on-demand encrypted backup to your selected folder.',- style: textTheme.miniFaint,- ),- ],- ),- ),- TextButton(- onPressed: controller.runManualBackup,- style: TextButton.styleFrom(- backgroundColor: colorScheme.fillMuted,- shape: const StadiumBorder(),- padding: const EdgeInsets.symmetric(- horizontal: 18,- vertical: 10,- ),- minimumSize: const Size(0, 40),- ),- child: Text(- 'Backup now',- style: textTheme.smallBold,- ),- ),- ],- ),- ),- );- }-}--Color _scaleAlpha(Color color, double factor) {- final normalized = (color.a * factor).clamp(0.0, 1.0);- return color.withValues(alpha: normalized);-}