💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Update backup mode UI (#12251)
Aman Raj5ccde5796453
diff --git a/mobile/apps/auth/lib/ui/settings_page.dart b/mobile/apps/auth/lib/ui/settings_page.dartindex e51310baa6..a813b2769a 100644--- a/mobile/apps/auth/lib/ui/settings_page.dart+++ b/mobile/apps/auth/lib/ui/settings_page.dart@@ -81,6 +81,7 @@ class SettingsPage extends StatelessWidget {title: l10n.signInToBackup,leadingIcon: HugeIcons.strokeRoundedCloudUpload,state: BannerComponentState.informative,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () => _showBackupReminder(context),),);diff --git a/mobile/apps/photos/assets/2.0x/backup_mode_ducky.png b/mobile/apps/photos/assets/2.0x/backup_mode_ducky.pngnew file mode 100644index 0000000000..61cd8e8befBinary files /dev/null and b/mobile/apps/photos/assets/2.0x/backup_mode_ducky.png differdiff --git a/mobile/apps/photos/assets/3.0x/backup_mode_ducky.png b/mobile/apps/photos/assets/3.0x/backup_mode_ducky.pngnew file mode 100644index 0000000000..0001b37555Binary files /dev/null and b/mobile/apps/photos/assets/3.0x/backup_mode_ducky.png differdiff --git a/mobile/apps/photos/assets/backup_mode_ducky.png b/mobile/apps/photos/assets/backup_mode_ducky.pngnew file mode 100644index 0000000000..606c4f2f27Binary files /dev/null and b/mobile/apps/photos/assets/backup_mode_ducky.png differdiff --git a/mobile/apps/photos/assets/backup_mode_upload.svg b/mobile/apps/photos/assets/backup_mode_upload.svgnew file mode 100644index 0000000000..a1eb73ec20--- /dev/null+++ b/mobile/apps/photos/assets/backup_mode_upload.svg@@ -0,0 +1,3 @@+<svg width="48" height="35" viewBox="0 0 48 35" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M21.8182 19.3594L19.8545 21.2734C19.4545 21.6745 18.9549 21.875 18.3556 21.875C17.7564 21.875 17.2378 21.6562 16.8 21.2187C16.4 20.8177 16.2 20.3073 16.2 19.6875C16.2 19.0677 16.4 18.5573 16.8 18.1562L22.4727 12.4687C22.9091 12.0312 23.4182 11.8125 24 11.8125C24.5818 11.8125 25.0909 12.0312 25.5273 12.4687L31.2 18.1562C31.6 18.5573 31.8087 19.0589 31.8262 19.6612C31.8436 20.2635 31.6349 20.7827 31.2 21.2187C30.8 21.6198 30.3004 21.8298 29.7011 21.8487C29.1018 21.8677 28.5833 21.6759 28.1455 21.2734L26.1818 19.3594V30.625H38.1818C39.7091 30.625 41 30.0963 42.0545 29.039C43.1091 27.9817 43.6364 26.6875 43.6364 25.1562C43.6364 23.625 43.1091 22.3307 42.0545 21.2734C41 20.2161 39.7091 19.6875 38.1818 19.6875H34.9091V15.3125C34.9091 12.2864 33.8451 9.70666 31.7171 7.57312C29.5891 5.43958 27.0167 4.37354 24 4.375C20.9833 4.37645 18.4109 5.44322 16.2829 7.5753C14.1549 9.70739 13.0909 12.2864 13.0909 15.3125H12C9.89091 15.3125 8.09091 16.0599 6.6 17.5547C5.10909 19.0495 4.36364 20.8541 4.36364 22.9687C4.36364 25.0833 5.10909 26.888 6.6 28.3828C8.09091 29.8776 9.89091 30.625 12 30.625H15.2727C15.8909 30.625 16.4095 30.835 16.8284 31.255C17.2473 31.675 17.456 32.1941 17.4545 32.8125C17.4531 33.4308 17.2436 33.9507 16.8262 34.3722C16.4087 34.7936 15.8909 35.0029 15.2727 35H12C8.69091 35 5.864 33.8515 3.51927 31.5547C1.17455 29.2578 0.00145455 26.4505 0 23.1328C0 20.289 0.854545 17.7552 2.56364 15.5312C4.27273 13.3073 6.50909 11.8854 9.27273 11.2656C10.1818 7.91145 12 5.19531 14.7273 3.11718C17.4545 1.03906 20.5455 0 24 0C28.2545 0 31.864 1.48604 34.8284 4.45812C37.7927 7.4302 39.2742 11.0483 39.2727 15.3125C41.7818 15.6042 43.864 16.6891 45.5193 18.5675C47.1745 20.4458 48.0014 22.6421 48 25.1562C48 27.8906 47.0458 30.2152 45.1375 32.13C43.2291 34.0448 40.9105 35.0014 38.1818 35H26.1818C24.9818 35 23.9549 34.5719 23.1011 33.7159C22.2473 32.8599 21.8196 31.8296 21.8182 30.625V19.3594Z" fill="#08C225"/>+</svg>diff --git a/mobile/apps/photos/lib/main.dart b/mobile/apps/photos/lib/main.dartindex c7c31cfe12..4f9e927793 100644--- a/mobile/apps/photos/lib/main.dart+++ b/mobile/apps/photos/lib/main.dart@@ -439,7 +439,6 @@ Future<void> _init(NetworkClient.instance.downloadDio,packageInfo,);- wakeLockService.init(isBackground: isBackground);_logger.info("Configuration init $tlog");await Configuration.instance.init(preferences);diff --git a/mobile/apps/photos/lib/service_locator.dart b/mobile/apps/photos/lib/service_locator.dartindex 37a5a17141..cc937e9e9b 100644--- a/mobile/apps/photos/lib/service_locator.dart+++ b/mobile/apps/photos/lib/service_locator.dart@@ -82,7 +82,7 @@ class ServiceLocator {endpointConfig = EndpointConfig(prefs);localSettings = LocalSettings(prefs);backupSettings = BackupSettings(prefs);- wakeLockService = EnteWakeLockService(prefs);+ wakeLockService = EnteWakeLockService();}}diff --git a/mobile/apps/photos/lib/services/wake_lock_service.dart b/mobile/apps/photos/lib/services/wake_lock_service.dartindex 66737d7e75..2f15537c36 100644--- a/mobile/apps/photos/lib/services/wake_lock_service.dart+++ b/mobile/apps/photos/lib/services/wake_lock_service.dart@@ -1,50 +1,18 @@-import "package:shared_preferences/shared_preferences.dart";import "package:wakelock_plus/wakelock_plus.dart";enum WakeLockFor {videoPlayback,- fasterBackupsOniOSByKeepingScreenAwake,machineLearningSettingsScreen,- handlingMediaKitEdgeCase,rewindViewer,largeBackupStandbyScreen,albumSlideshow,}-// Temporary callers must not override the across-session setting.-// media_kit is the only code that intentionally bypasses this wrapper.class EnteWakeLockService {- static const String kKeepAppAwakeAcrossSessions =- "keepAppAwakeAcrossSessions";-- EnteWakeLockService(this._prefs);-- final SharedPreferences _prefs;-- void init({required bool isBackground}) {- if (isBackground) {- return;- }- if (_prefs.getBool(kKeepAppAwakeAcrossSessions) ?? false) {- WakelockPlus.enable();- }- }-void updateWakeLock({required bool enable,required WakeLockFor wakeLockFor,}) {- if (wakeLockFor == WakeLockFor.fasterBackupsOniOSByKeepingScreenAwake ||- wakeLockFor == WakeLockFor.handlingMediaKitEdgeCase) {- WakelockPlus.toggle(enable: enable);- _prefs.setBool(kKeepAppAwakeAcrossSessions, enable);- } else {- if (!shouldKeepAppAwakeAcrossSessions) {- WakelockPlus.toggle(enable: enable);- }- }+ WakelockPlus.toggle(enable: enable);}-- bool get shouldKeepAppAwakeAcrossSessions =>- _prefs.getBool(kKeepAppAwakeAcrossSessions) ?? false;}diff --git a/mobile/apps/photos/lib/ui/home/header_error_widget.dart b/mobile/apps/photos/lib/ui/home/header_error_widget.dartindex bdf06750a4..99156c526f 100644--- a/mobile/apps/photos/lib/ui/home/header_error_widget.dart+++ b/mobile/apps/photos/lib/ui/home/header_error_widget.dart@@ -23,6 +23,7 @@ class HeaderErrorWidget extends StatelessWidget {title: context.strings.subscribe,subtitle: context.strings.yourSubscriptionHasExpired,state: BannerComponentState.failure,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () async {await routeToPage(context,@@ -40,6 +41,7 @@ class HeaderErrorWidget extends StatelessWidget {title: context.strings.upgrade,subtitle: context.strings.storageLimitExceeded,state: BannerComponentState.failure,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () async {await routeToPage(context,@@ -57,6 +59,7 @@ class HeaderErrorWidget extends StatelessWidget {title: context.strings.freeUpDeviceSpace,subtitle: context.strings.backupPausedFreeUpDeviceStorage,state: BannerComponentState.failure,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () async {await routeToPage(context,@@ -74,6 +77,7 @@ class HeaderErrorWidget extends StatelessWidget {title: context.strings.backupFailed,subtitle: context.strings.couldNotBackUpTryLater,state: BannerComponentState.failure,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () {sendLogs(context,diff --git a/mobile/apps/photos/lib/ui/home/large_backup_screen.dart b/mobile/apps/photos/lib/ui/home/large_backup_screen.dartindex ff3fe74bbf..2a64f1e2ee 100644--- a/mobile/apps/photos/lib/ui/home/large_backup_screen.dart+++ b/mobile/apps/photos/lib/ui/home/large_backup_screen.dart@@ -4,7 +4,7 @@ import "package:ente_components/ente_components.dart";import "package:ente_screen_brightness/ente_screen_brightness.dart";import "package:ente_strings/ente_strings.dart";import "package:flutter/material.dart";-import "package:hugeicons/hugeicons.dart";+import "package:flutter_svg/flutter_svg.dart";import "package:intl/intl.dart";import "package:logging/logging.dart";import "package:photos/core/event_bus.dart";@@ -14,7 +14,6 @@ import "package:photos/service_locator.dart";import "package:photos/services/sync/large_backup_session_tracker.dart";import "package:photos/services/wake_lock_service.dart";import "package:photos/ui/components/alert_bottom_sheet.dart";-import "package:rive/rive.dart" as rive;Future<void> showLargeBackupScreen(BuildContext context,@@ -37,113 +36,53 @@ class LargeBackupScreen extends StatefulWidget {}class _LargeBackupScreenState extends State<LargeBackupScreen> {- late final rive.FileLoader _animationLoader;-- @override- void initState() {- super.initState();- _animationLoader = rive.FileLoader.fromAsset(- "assets/home_tab.riv",- riveFactory: rive.Factory.flutter,- );- }-- @override- void dispose() {- _animationLoader.dispose();- super.dispose();- }-@overrideWidget build(BuildContext context) {- return Theme(- data: darkThemeData,- child: Builder(- builder: (context) {- final colors = context.componentColors;- return SettingsPageScaffold(- title: pendingTranslation("Backup mode"),- bottomNavigationBar: SafeArea(- top: false,- child: Padding(- padding: const EdgeInsets.fromLTRB(- Spacing.lg,- Spacing.sm,- Spacing.lg,- Spacing.lg,- ),- child: ButtonComponent(- key: const ValueKey("start-large-backup-mode"),- label: pendingTranslation("Start backup mode"),- shouldSurfaceExecutionStates: false,- onTap: _startStandby,- ),- ),- ),- children: [- const SizedBox(height: Spacing.xl),- Center(- child: SizedBox(- height: 128,- child: rive.RiveWidgetBuilder(- fileLoader: _animationLoader,- builder: (context, state) {- if (state is rive.RiveLoaded) {- return rive.RiveWidget(- controller: state.controller,- fit: rive.Fit.contain,- );- }- return const SizedBox.shrink();- },- ),- ),- ),- const SizedBox(height: Spacing.xl),- Text(- pendingTranslation("Finish your backup"),- textAlign: TextAlign.center,- style: TextStyles.display1.copyWith(color: colors.textBase),- ),- const SizedBox(height: Spacing.md),- Text(- pendingTranslation(- "Keep Ente open while your backup finishes. The screen will dim and your iPhone will stay awake.",- ),- textAlign: TextAlign.center,- style: TextStyles.body.copyWith(color: colors.textLight),- ),- const SizedBox(height: Spacing.xxl),- Text(- pendingTranslation("Good to know"),- style: TextStyles.h2.copyWith(color: colors.textBase),- ),- const SizedBox(height: Spacing.lg),- _InstructionItem(- icon: HugeIcons.strokeRoundedSmartPhone01,- text: pendingTranslation(- "Leave Ente open. Keep your iPhone unlocked.",- ),- ),- const SizedBox(height: Spacing.xl),- _InstructionItem(- icon: HugeIcons.strokeRoundedMoon02,- text: pendingTranslation(- "The screen will dim. Tap it when you want to return.",- ),- ),- const SizedBox(height: Spacing.xl),- _InstructionItem(- icon: HugeIcons.strokeRoundedPlug01,- text: pendingTranslation(- "Keep your iPhone plugged in so your backup can continue.",- ),- ),- const SizedBox(height: Spacing.xxl),- ],- );- },+ final colors = context.componentColors;+ final l10n = context.strings;+ return SettingsPageScaffold(+ title: l10n.backupMode,+ padding: const EdgeInsets.fromLTRB(32, 0, 32, Spacing.lg),+ bottomNavigationBar: SafeArea(+ top: false,+ child: Padding(+ padding: const EdgeInsets.fromLTRB(+ Spacing.lg,+ Spacing.sm,+ Spacing.lg,+ Spacing.lg,+ ),+ child: ButtonComponent(+ key: const ValueKey("start-large-backup-mode"),+ label: l10n.backupModeStart,+ shouldSurfaceExecutionStates: false,+ onTap: _startStandby,+ ),+ ),),+ children: [+ const SizedBox(height: 80),+ Center(+ child: Image.asset(+ "assets/backup_mode_ducky.png",+ width: 185,+ height: 205,+ ),+ ),+ const SizedBox(height: Spacing.xl),+ Text(+ l10n.backupModeFinishYourBackup,+ textAlign: TextAlign.center,+ style: TextStyles.display2.copyWith(color: colors.textBase),+ ),+ const SizedBox(height: Spacing.lg),+ _InstructionItem(text: l10n.backupModeStayInEnte),+ const SizedBox(height: Spacing.md),+ _InstructionItem(text: l10n.backupModeScreenDimmingDescription),+ const SizedBox(height: Spacing.md),+ _InstructionItem(text: l10n.backupModePlugInPhone),+ const SizedBox(height: Spacing.xxl),+ ],);}@@ -151,10 +90,8 @@ class _LargeBackupScreenState extends State<LargeBackupScreen> {if (!widget.sessionTracker.isUploading) {await showAlertBottomSheet<void>(context,- title: pendingTranslation("No backup in progress"),- message: pendingTranslation(- "Start a backup, then return to backup mode.",- ),+ title: context.strings.backupModeNoBackupInProgress,+ message: context.strings.backupModeNoBackupInProgressDescription,);return;}@@ -252,54 +189,76 @@ class _LargeBackupStandbyScreenState extends State<_LargeBackupStandbyScreen>Widget build(BuildContext context) {return Theme(data: darkThemeData,- child: Builder(- builder: (context) {- final colors = context.componentColors;- return GestureDetector(- key: const ValueKey("large-backup-standby-screen"),- behavior: HitTestBehavior.opaque,- onTap: () => _close(_StandbyResult.returnedToInstructions),- child: Scaffold(- backgroundColor: colors.fillDark,- body: Center(- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- ListenableBuilder(- listenable: widget.sessionTracker,- builder: (context, _) {- final completed = widget.sessionTracker.completedCount;- final total = widget.sessionTracker.totalCount;- final statusText = switch ((completed, total)) {- (0, 1) => context.strings.uploadingSingleMemory,- (0, > 1) => context.strings.uploadingMultipleMemories(- count: _countFormatter.format(total),- ),- (_, > 0) => context.strings.syncProgress(- completed: _countFormatter.format(completed),- total: _countFormatter.format(total),+ child: GestureDetector(+ key: const ValueKey("large-backup-standby-screen"),+ behavior: HitTestBehavior.opaque,+ onTap: () => _close(_StandbyResult.returnedToInstructions),+ child: Scaffold(+ backgroundColor: fillBaseLight,+ body: SafeArea(+ child: Column(+ children: [+ Expanded(+ child: Align(+ alignment: const Alignment(0, 0.65),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ SvgPicture.asset(+ "assets/backup_mode_upload.svg",+ width: 48,+ height: 35,+ colorFilter: ColorFilter.mode(+ context.componentColors.primary,+ BlendMode.srcIn,),- _ => pendingTranslation("Finding more memories…"),- };- return Text(- statusText,+ ),+ const SizedBox(height: Spacing.xxl),+ Text(+ context.strings.backupModePreservingYourMemories,style: TextStyles.large.copyWith(- color: colors.textBase,+ color: specialWhiteLight,),- );- },+ ),+ const SizedBox(height: 6),+ ListenableBuilder(+ listenable: widget.sessionTracker,+ builder: (context, _) {+ final total = widget.sessionTracker.totalCount;+ final statusText = total > 0+ ? context.strings.backupModeBackingUpItems(+ count: total,+ formattedCount: _countFormatter.format(+ total,+ ),+ )+ : context+ .strings+ .backupModeCheckingForMoreItems;+ return Text(+ statusText,+ textAlign: TextAlign.center,+ style: TextStyles.body.copyWith(+ color: context.componentColors.primary,+ ),+ );+ },+ ),+ ],),- const SizedBox(height: 17),- Text(- pendingTranslation("Tap to return"),- style: TextStyles.body.copyWith(color: colors.textLight),- ),- ],+ ),),- ),+ Padding(+ padding: const EdgeInsets.only(bottom: Spacing.sm),+ child: Text(+ context.strings.backupModeTapToWakeScreen,+ style: TextStyles.body.copyWith(color: specialWhiteLight),+ ),+ ),+ ],),- );- },+ ),+ ),),);}@@ -386,9 +345,8 @@ class _LargeBackupStandbyScreenState extends State<_LargeBackupStandbyScreen>}class _InstructionItem extends StatelessWidget {- const _InstructionItem({required this.icon, required this.text});+ const _InstructionItem({required this.text});- final List<List<dynamic>> icon;final String text;@override@@ -398,12 +356,25 @@ class _InstructionItem extends StatelessWidget {return Row(crossAxisAlignment: CrossAxisAlignment.start,children: [- HugeIcon(icon: icon, color: colors.textBase, size: 24),- const SizedBox(width: Spacing.lg),+ SizedBox(+ width: 5,+ height: 20,+ child: Align(+ alignment: Alignment.center,+ child: DecoratedBox(+ decoration: BoxDecoration(+ color: colors.primary,+ shape: BoxShape.circle,+ ),+ child: const SizedBox.square(dimension: 4),+ ),+ ),+ ),+ const SizedBox(width: Spacing.md),Expanded(child: Text(text,- style: TextStyles.body.copyWith(color: colors.textBase),+ style: TextStyles.body.copyWith(color: colors.textLight),),),],diff --git a/mobile/apps/photos/lib/ui/home/status_bar_widget.dart b/mobile/apps/photos/lib/ui/home/status_bar_widget.dartindex 29338d67d4..1e4504254a 100644--- a/mobile/apps/photos/lib/ui/home/status_bar_widget.dart+++ b/mobile/apps/photos/lib/ui/home/status_bar_widget.dart@@ -155,18 +155,15 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {}bool get _shouldShowLargeBackupBanner =>- flagService.largeBackupStandby &&- Platform.isIOS &&- !_showErrorBanner &&- _largeBackupSession.isActive;+ Platform.isIOS && !_showErrorBanner && _largeBackupSession.isActive;Widget _largeBackupBanner(BuildContext context) {return _bannerPadding(BannerComponent(key: const ValueKey("large-backup-standby-banner"),leadingIcon: HugeIcons.strokeRoundedMoon02,- title: pendingTranslation("Finish your backup"),- subtitle: pendingTranslation("Keep Ente open with the screen dimmed"),+ title: context.strings.backupModeKeepAppOpen,+ subtitle: context.strings.backupModeScreenWillDim,state: BannerComponentState.success,onTap: () async {if (!_largeBackupSession.isActive) {@@ -186,6 +183,7 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {title: l10n.machineLearning,subtitle: l10n.machineLearningBannerSubtitle,state: BannerComponentState.success,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () async {await routeToPage(context,@@ -203,6 +201,7 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {leadingIcon: HugeIcons.strokeRoundedAlertCircle,title: context.strings.confirmYourRecoveryKey,state: BannerComponentState.warning,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () async {await routeToPage(context,diff --git a/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart b/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dartindex 97ae40e883..391a20d0f5 100644--- a/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart+++ b/mobile/apps/photos/lib/ui/settings/backup/backup_settings_screen.dart@@ -10,7 +10,6 @@ import "package:photo_manager/photo_manager.dart";import "package:photos/service_locator.dart";import "package:photos/services/sync/local_sync_service.dart";import "package:photos/services/sync/sync_service.dart";-import "package:photos/services/wake_lock_service.dart";import "package:photos/ui/common/backup_flow_helper.dart";import "package:photos/ui/home/large_backup_screen.dart";@@ -92,48 +91,18 @@ class BackupSettingsScreen extends StatelessWidget {],if (Platform.isIOS) ...[const SizedBox(height: 24),- if (flagService.largeBackupStandby) ...[- SettingsItem(- title: pendingTranslation("(i) Backup mode"),- subtitle: pendingTranslation(- "Keep Ente awake while your backup finishes",- ),- icon: HugeIcons.strokeRoundedMoon02,- showOnlyLoadingState: true,- onTap: () {- return showLargeBackupScreen(- context,- SyncService.instance.largeBackupSessionTracker,- );- },- ),- const SizedBox(height: 8),- ],- _toggleItem(- context,- title: l10n.disableAutoLock,- value: () => wakeLockService.shouldKeepAppAwakeAcrossSessions,- onChanged: () async {- wakeLockService.updateWakeLock(- enable: !wakeLockService.shouldKeepAppAwakeAcrossSessions,- wakeLockFor: WakeLockFor.fasterBackupsOniOSByKeepingScreenAwake,+ SettingsItem(+ title: l10n.backupMode,+ subtitle: l10n.backupModeSettingsDescription,+ icon: HugeIcons.strokeRoundedMoon02,+ showOnlyLoadingState: true,+ onTap: () {+ return showLargeBackupScreen(+ context,+ SyncService.instance.largeBackupSessionTracker,);},),- Padding(- padding: const EdgeInsets.only(- left: Spacing.lg,- right: Spacing.lg,- top: Spacing.sm,- bottom: Spacing.lg,- ),- child: Text(- l10n.deviceLockExplanation,- style: TextStyles.mini.copyWith(- color: context.componentColors.textLight,- ),- ),- ),],],);diff --git a/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart b/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dartindex ebcd959858..0392d15212 100644--- a/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart+++ b/mobile/apps/photos/lib/ui/settings/search/settings_search_registry.dart@@ -174,16 +174,6 @@ class SettingsSearchRegistry {isSubPage: true,keywords: ["resumable", "multipart", "uploads"],),- if (Platform.isIOS)- SettingsSearchItem(- title: l10n.disableAutoLock,- subtitle: l10n.backupSettings,- sectionPath: "${l10n.backup} > ${l10n.backupSettings}",- icon: HugeIcons.strokeRoundedSquareLock02,- routeBuilder: (_) => const BackupSettingsPage(),- isSubPage: true,- keywords: ["auto lock", "screen", "awake"],- ),]);}diff --git a/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart b/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dartindex 3046e19dda..10f91531c5 100644--- a/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart@@ -202,17 +202,10 @@ class _VideoWidgetMediaKitState extends State<VideoWidgetMediaKit>}player.dispose();_transformationController.dispose();- if (wakeLockService.shouldKeepAppAwakeAcrossSessions) {- wakeLockService.updateWakeLock(- enable: true,- wakeLockFor: WakeLockFor.handlingMediaKitEdgeCase,- );- } else {- wakeLockService.updateWakeLock(- enable: false,- wakeLockFor: WakeLockFor.videoPlayback,- );- }+ wakeLockService.updateWakeLock(+ enable: false,+ wakeLockFor: WakeLockFor.videoPlayback,+ );super.dispose();}diff --git a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dartindex aa91a4227f..c8e441f188 100644--- a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart+++ b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart@@ -53,8 +53,6 @@ class FlagService {return (flags.internalUser || kDebugMode) && !isDisabled;}- bool get largeBackupStandby => internalUser;-bool get librarySharing =>internalUser || _isServerFlagEnabled(_librarySharingFlag);diff --git a/mobile/packages/ente_components/example/lib/main.dart b/mobile/packages/ente_components/example/lib/main.dartindex 016e659620..bc97609c0c 100644--- a/mobile/packages/ente_components/example/lib/main.dart+++ b/mobile/packages/ente_components/example/lib/main.dart@@ -1248,6 +1248,7 @@ class _BannerPreview extends StatelessWidget {subtitle: 'Preparing secure upload',state: BannerComponentState.informative,leadingWidget: const _BannerLoadingLeading(),+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () {},),),@@ -1295,6 +1296,7 @@ class _BannerStatePreview extends StatelessWidget {title: spec.title,subtitle: spec.subtitle,state: spec.state,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () {ScaffoldMessenger.of(context,diff --git a/mobile/packages/ente_components/lib/components/banner_component.dart b/mobile/packages/ente_components/lib/components/banner_component.dartindex 07a6dca7cb..6c86ab26b7 100644--- a/mobile/packages/ente_components/lib/components/banner_component.dart+++ b/mobile/packages/ente_components/lib/components/banner_component.dart@@ -132,28 +132,23 @@ class BannerComponent extends StatelessWidget {],),),- const SizedBox(width: Spacing.md),- trailingWidget == null- ? _BannerActionButton(- iconColor: colors.textBase,- onTap: onTap,- )- : SizedBox(- key: const ValueKey(- 'banner-component-trailing-slot',- ),- width: actionSize,- height: actionSize,- child: Center(- child: IconTheme.merge(- data: IconThemeData(- color: colors.textBase,- size: _actionIconSize,- ),- child: trailingWidget,- ),+ if (trailingWidget != null) ...[+ const SizedBox(width: Spacing.md),+ SizedBox(+ key: const ValueKey('banner-component-trailing-slot'),+ width: actionSize,+ height: actionSize,+ child: Center(+ child: IconTheme.merge(+ data: IconThemeData(+ color: colors.textBase,+ size: _actionIconSize,),+ child: trailingWidget,),+ ),+ ),+ ],],),),@@ -174,29 +169,3 @@ class BannerComponent extends StatelessWidget {};}}--class _BannerActionButton extends StatelessWidget {- const _BannerActionButton({required this.iconColor, required this.onTap});-- final Color iconColor;- final VoidCallback onTap;-- @override- Widget build(BuildContext context) {- return GestureDetector(- behavior: HitTestBehavior.opaque,- onTap: onTap,- child: SizedBox(- width: BannerComponent.actionSize,- height: BannerComponent.actionSize,- child: Center(- child: Icon(- Icons.arrow_forward,- size: BannerComponent._actionIconSize,- color: iconColor,- ),- ),- ),- );- }-}diff --git a/mobile/packages/ente_components/lib/components/toast_component.dart b/mobile/packages/ente_components/lib/components/toast_component.dartindex a2ec3a6f15..3442bec0d4 100644--- a/mobile/packages/ente_components/lib/components/toast_component.dart+++ b/mobile/packages/ente_components/lib/components/toast_component.dart@@ -79,7 +79,7 @@ class _BannerToast extends StatelessWidget {subtitle: subtitle,state: state,leadingWidget: leadingWidget,- trailingWidget: trailingWidget ?? const SizedBox.shrink(),+ trailingWidget: trailingWidget,onTap: onDismiss,),),diff --git a/mobile/packages/ente_components/test/components/banner_component_test.dart b/mobile/packages/ente_components/test/components/banner_component_test.dartindex 547581d28f..5d3c16a8d2 100644--- a/mobile/packages/ente_components/test/components/banner_component_test.dart+++ b/mobile/packages/ente_components/test/components/banner_component_test.dart@@ -13,6 +13,7 @@ void main() {title: "Subscribe",subtitle: "Your subscription has expired",state: BannerComponentState.failure,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () => tapCount += 1,),),@@ -49,6 +50,11 @@ void main() {final title = tester.widget<Text>(find.text("Confirm your recovery key"));expect(title.maxLines, 2);expect(title.overflow, TextOverflow.ellipsis);+ expect(find.byIcon(Icons.arrow_forward), findsNothing);+ expect(+ find.byKey(const ValueKey("banner-component-trailing-slot")),+ findsNothing,+ );});testWidgets("BannerComponent maps state colors from component tokens", (@@ -169,6 +175,7 @@ void main() {title: "Syncing",subtitle: "Preparing secure upload",state: BannerComponentState.informative,+ trailingWidget: const Icon(Icons.arrow_forward),onTap: () {},),),diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arbindex 781dfc5e70..8953613970 100644--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb@@ -461,6 +461,33 @@"backupFile": "Backup file","backupFolderLabel": "Backup folder:","backupLocationChoiceDescription": "Where do you want to save your backups?",+ "backupMode": "Backup mode",+ "backupModeBackingUpItems": "{count, plural, one{Backing up {formattedCount} item} other{Backing up {formattedCount} items}}",+ "@backupModeBackingUpItems": {+ "placeholders": {+ "count": {+ "type": "int",+ "example": "12546"+ },+ "formattedCount": {+ "type": "String",+ "example": "12,546"+ }+ }+ },+ "backupModeCheckingForMoreItems": "Checking for more items",+ "backupModeFinishYourBackup": "Finish your backup",+ "backupModeKeepAppOpen": "Keep the app open",+ "backupModeNoBackupInProgress": "No backup in progress",+ "backupModeNoBackupInProgressDescription": "Start a backup, then return to backup mode.",+ "backupModePlugInPhone": "Plug in your phone. Backups use battery.",+ "backupModePreservingYourMemories": "Preserving your memories",+ "backupModeScreenDimmingDescription": "The screen dims to save battery. Tap it anytime to come back.",+ "backupModeScreenWillDim": "Screen will dim automatically to save battery",+ "backupModeSettingsDescription": "Keep the app open to finish your backup",+ "backupModeStart": "Start backup mode",+ "backupModeStayInEnte": "Stay in Ente. Switching apps pauses your backup.",+ "backupModeTapToWakeScreen": "Tap to wake the screen","backupOnlyNewPhotos": "Backup only new photos","backupOnlyNewPhotosAllFoldersSelected": "All folders are currently selected for backup.\n\nYou can continue for now, or update selected folders.","backupOnlyNewPhotosNoFoldersSelectedContinue": "No folders are currently selected for backup.\n\nYou can continue for now, or update selected folders.",@@ -1086,11 +1113,9 @@"@deviceLockEnablePreSteps": {"description": "Instructions for enabling device lock"},- "deviceLockExplanation": "Disable the device screen lock when Ente is in the foreground and there is a backup in progress. This is normally not needed, but may help big uploads and initial imports of large libraries complete faster.","deviceNotFound": "Device not found","didYouKnow": "Did you know?","digits": "Digits",- "disableAutoLock": "Disable auto lock","disableBackup": "Disable backup","disableDownloadWarningBody": "Viewers can still take screenshots or save a copy of your photos using external tools","disableDownloadWarningTitle": "Please note",