π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update CTA
AmanRajSinghMouryadd55c0886939
diff --git a/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dart b/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dartindex 429b70ef7a..f70913f099 100644--- a/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/name_face_banner.dart@@ -1,9 +1,13 @@+import "dart:async";+import "package:flutter/material.dart";import "package:hugeicons/hugeicons.dart";+import "package:intl/intl.dart";import "package:photos/generated/intl/app_localizations.dart";import "package:photos/service_locator.dart";import "package:photos/theme/ente_theme.dart";-import "package:photos/ui/home/landing_page_widget.dart";+import "package:photos/ui/account/email_entry_page.dart";+import "package:photos/utils/ml_util.dart";class NameFaceBanner extends StatefulWidget {const NameFaceBanner({super.key});@@ -14,6 +18,23 @@ class NameFaceBanner extends StatefulWidget {class _NameFaceBannerState extends State<NameFaceBanner> {bool _dismissed = false;+ IndexStatus? _indexStatus;+ Timer? _pollTimer;++ @override+ void initState() {+ super.initState();+ _fetchStatus();+ _pollTimer = Timer.periodic(const Duration(seconds: 10), (_) {+ _fetchStatus();+ });+ }++ @override+ void dispose() {+ _pollTimer?.cancel();+ super.dispose();+ }@overrideWidget build(BuildContext context) {@@ -25,105 +46,123 @@ class _NameFaceBannerState extends State<NameFaceBanner> {final colorScheme = getEnteColorScheme(context);final l10n = AppLocalizations.of(context);+ final format = NumberFormat();+ final status = _indexStatus;++ final indexed = status?.indexedItems ?? 78;+ final total =+ (status?.indexedItems ?? 78) + (status?.pendingItems ?? 25601);+ final safeTotal = total <= 0 ? 1 : total;+ final progress = (indexed / safeTotal).clamp(0.0, 1.0);return Padding(padding: const EdgeInsets.all(12),- child: Container(- padding: const EdgeInsets.symmetric(vertical: 24),- decoration: BoxDecoration(- color: colorScheme.backgroundColour,- borderRadius: BorderRadius.circular(20),- ),- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- Padding(- padding: const EdgeInsets.symmetric(horizontal: 16),- child: Row(- crossAxisAlignment: CrossAxisAlignment.center,+ child: GestureDetector(+ behavior: HitTestBehavior.opaque,+ onTap: () async {+ await Navigator.of(context).push(+ MaterialPageRoute(+ builder: (_) => const EmailEntryPage(),+ ),+ );+ },+ child: Container(+ padding: const EdgeInsets.all(16),+ decoration: BoxDecoration(+ color: colorScheme.backgroundColour,+ borderRadius: BorderRadius.circular(14.331),+ ),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Row(+ mainAxisAlignment: MainAxisAlignment.spaceBetween,children: [- Expanded(- child: Text(- l10n.offlineNameFaceBannerTitle,- textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 16,- height: 20 / 16,- letterSpacing: -1.0,- color: colorScheme.textBase,- ),+ Text(+ l10n.mlProgressBannerTitle,+ style: TextStyle(+ fontFamily: "Nunito",+ fontWeight: FontWeight.w800,+ fontSize: 18,+ height: 27.132 / 18,+ letterSpacing: -0.9554,+ color: colorScheme.greenBase,),),GestureDetector(onTap: _onDismiss,behavior: HitTestBehavior.opaque,child: Padding(- padding: const EdgeInsets.all(4),+ padding: const EdgeInsets.all(6),child: HugeIcon(icon: HugeIcons.strokeRoundedCancel01,color: colorScheme.contentLight,- size: 18,+ size: 20,strokeWidth: 2,),),),],),- ),- const SizedBox(height: 8),- ConstrainedBox(- constraints: const BoxConstraints(maxWidth: 250),- child: Text(- l10n.offlineNameFaceBannerSubtitle,- textAlign: TextAlign.center,+ const SizedBox(height: 8),+ Text(+ l10n.mlProgressBannerDescription,style: TextStyle(- fontFamily: "Inter",- fontWeight: FontWeight.w500,- fontSize: 10,- height: 16 / 10,- color: colorScheme.contentLight,+ fontFamily: "Montserrat",+ fontWeight: FontWeight.w600,+ fontSize: 12,+ height: 15.287 / 12,+ color: colorScheme.contentLighter,),),- ),- const SizedBox(height: 16),- GestureDetector(- onTap: () {- Navigator.of(context).push(- MaterialPageRoute(- builder: (_) => const LandingPageWidget(),- ),- );- },- child: Container(- width: 140,- alignment: Alignment.center,- decoration: BoxDecoration(- color: colorScheme.greenBase,- borderRadius: BorderRadius.circular(12),- ),- padding: const EdgeInsets.symmetric(- vertical: 18,+ const SizedBox(height: 24),+ ClipRRect(+ borderRadius: BorderRadius.circular(57),+ child: LinearProgressIndicator(+ value: progress,+ minHeight: 5,+ backgroundColor: const Color.fromRGBO(193, 193, 193, 0.11),+ valueColor:+ AlwaysStoppedAnimation<Color>(colorScheme.greenBase),),+ ),+ const SizedBox(height: 8),+ Align(+ alignment: Alignment.centerRight,child: Text(- l10n.signUp,- style: const TextStyle(+ l10n.mlProgressBannerStatus(+ indexed: format.format(indexed),+ total: format.format(safeTotal),+ ),+ style: TextStyle(fontFamily: "Montserrat",fontWeight: FontWeight.w600,fontSize: 10,- height: 12 / 10,- color: Colors.white,+ height: 15.287 / 10,+ color: colorScheme.contentLighter,),),),- ),- ],+ ],+ ),),),);}+ Future<void> _fetchStatus() async {+ try {+ final status = await getIndexStatus();+ if (!mounted) return;+ setState(() {+ _indexStatus = status;+ });+ } catch (_) {+ // Keep fallback values if indexing status is unavailable.+ }+ }+void _onDismiss() {setState(() {_dismissed = true;diff --git a/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dart b/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dartindex ae82bf7937..0e08b3d4c0 100644--- a/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/save_faces_banner.dart@@ -3,7 +3,7 @@ import "package:hugeicons/hugeicons.dart";import "package:photos/generated/intl/app_localizations.dart";import "package:photos/service_locator.dart";import "package:photos/theme/ente_theme.dart";-import "package:photos/ui/home/landing_page_widget.dart";+import "package:photos/ui/account/email_entry_page.dart";class SaveFacesBanner extends StatefulWidget {const SaveFacesBanner({super.key});@@ -92,7 +92,7 @@ class _SaveFacesBannerState extends State<SaveFacesBanner> {onTap: () {Navigator.of(context).push(MaterialPageRoute(- builder: (_) => const LandingPageWidget(),+ builder: (_) => const EmailEntryPage(),),);},diff --git a/mobile/apps/photos/lib/ui/components/banners/shared_empty_offline_state_widget.dart b/mobile/apps/photos/lib/ui/components/banners/shared_empty_offline_state_widget.dartindex a1a0644a9a..102ef0d66f 100644--- a/mobile/apps/photos/lib/ui/components/banners/shared_empty_offline_state_widget.dart+++ b/mobile/apps/photos/lib/ui/components/banners/shared_empty_offline_state_widget.dart@@ -1,7 +1,7 @@import "package:flutter/material.dart";import "package:photos/generated/l10n.dart";import "package:photos/theme/ente_theme.dart";-import "package:photos/ui/home/landing_page_widget.dart";+import "package:photos/ui/account/email_entry_page.dart";class SharedEmptyOfflineStateWidget extends StatelessWidget {const SharedEmptyOfflineStateWidget({super.key});@@ -45,10 +45,10 @@ class SharedEmptyOfflineStateWidget extends StatelessWidget {),const SizedBox(height: 24),GestureDetector(- onTap: () {- Navigator.of(context).push(+ onTap: () async {+ await Navigator.of(context).push(MaterialPageRoute(- builder: (_) => const LandingPageWidget(),+ builder: (_) => const EmailEntryPage(),),);},diff --git a/mobile/apps/photos/lib/ui/home/header_widget.dart b/mobile/apps/photos/lib/ui/home/header_widget.dartindex 3299ca39d7..d3aff6844a 100644--- a/mobile/apps/photos/lib/ui/home/header_widget.dart+++ b/mobile/apps/photos/lib/ui/home/header_widget.dart@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';import 'package:logging/logging.dart';import 'package:photos/service_locator.dart';import "package:photos/services/wrapped/wrapped_service.dart";+import "package:photos/ui/account/email_entry_page.dart";import "package:photos/ui/components/banners/get_started_banner.dart";-import "package:photos/ui/home/landing_page_widget.dart";import "package:photos/ui/home/memories/memories_widget.dart";import 'package:photos/ui/home/status_bar_widget.dart';import "package:photos/ui/wrapped/rewind_banner.dart";@@ -70,7 +70,7 @@ class _HeaderWidgetState extends State<HeaderWidget> {onGetStarted: () async {await Navigator.of(context).push(MaterialPageRoute(- builder: (_) => const LandingPageWidget(),+ builder: (_) => const EmailEntryPage(),),);},diff --git a/mobile/apps/photos/lib/ui/offline/empty/on_ente.dart b/mobile/apps/photos/lib/ui/offline/empty/on_ente.dartindex 42cbee288a..96be1bb5e3 100644--- a/mobile/apps/photos/lib/ui/offline/empty/on_ente.dart+++ b/mobile/apps/photos/lib/ui/offline/empty/on_ente.dart@@ -2,7 +2,7 @@ import "package:flutter/material.dart";import "package:photos/generated/l10n.dart";import "package:photos/models/collection/collection.dart";import "package:photos/theme/ente_theme.dart";-import "package:photos/ui/home/landing_page_widget.dart";+import "package:photos/ui/account/email_entry_page.dart";class EmptyOnEnteSection extends StatelessWidget {final List<Collection> collections;@@ -60,10 +60,10 @@ class EmptyOnEnteSection extends StatelessWidget {),const SizedBox(height: 16),GestureDetector(- onTap: () {- Navigator.of(context).push(+ onTap: () async {+ await Navigator.of(context).push(MaterialPageRoute(- builder: (_) => const LandingPageWidget(),+ builder: (_) => const EmailEntryPage(),),);},