π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update empty states
vishnukvmd1e1865e9014b
diff --git a/mobile/apps/locker/lib/l10n/app_en.arb b/mobile/apps/locker/lib/l10n/app_en.arbindex eb4fbefaa6..5bec230b2b 100644--- a/mobile/apps/locker/lib/l10n/app_en.arb+++ b/mobile/apps/locker/lib/l10n/app_en.arb@@ -212,6 +212,10 @@"createCollection": "Create collection","nothingYet": "Nothing yet","uploadYourFirstDocument": "Upload your first document to get started",+ "collectionEmptyStateTitle": "Nothing to see here",+ "collectionEmptyStateSubtitle": "Add items to this collection to see them here",+ "homeLockerEmptyTitle": "Your Locker is empty",+ "homeLockerEmptySubtitle": "Click the + button to get started","uploadDocument": "Upload document","items": "{count} items","@items": {diff --git a/mobile/apps/locker/lib/l10n/app_localizations.dart b/mobile/apps/locker/lib/l10n/app_localizations.dartindex a7bcaf5455..26195fa9b3 100644--- a/mobile/apps/locker/lib/l10n/app_localizations.dart+++ b/mobile/apps/locker/lib/l10n/app_localizations.dart@@ -484,6 +484,30 @@ abstract class AppLocalizations {/// **'Upload your first document to get started'**String get uploadYourFirstDocument;+ /// No description provided for @collectionEmptyStateTitle.+ ///+ /// In en, this message translates to:+ /// **'Nothing to see here'**+ String get collectionEmptyStateTitle;++ /// No description provided for @collectionEmptyStateSubtitle.+ ///+ /// In en, this message translates to:+ /// **'Add items to this collection to see them here'**+ String get collectionEmptyStateSubtitle;++ /// No description provided for @homeLockerEmptyTitle.+ ///+ /// In en, this message translates to:+ /// **'Your Locker is empty'**+ String get homeLockerEmptyTitle;++ /// No description provided for @homeLockerEmptySubtitle.+ ///+ /// In en, this message translates to:+ /// **'Click the + button to get started'**+ String get homeLockerEmptySubtitle;+/// No description provided for @uploadDocument.////// In en, this message translates to:diff --git a/mobile/apps/locker/lib/l10n/app_localizations_en.dart b/mobile/apps/locker/lib/l10n/app_localizations_en.dartindex 9e53ea0e15..f42b817f1f 100644--- a/mobile/apps/locker/lib/l10n/app_localizations_en.dart+++ b/mobile/apps/locker/lib/l10n/app_localizations_en.dart@@ -241,6 +241,19 @@ class AppLocalizationsEn extends AppLocalizations {String get uploadYourFirstDocument =>'Upload your first document to get started';+ @override+ String get collectionEmptyStateTitle => 'Nothing to see here';++ @override+ String get collectionEmptyStateSubtitle =>+ 'Add items to this collection to see them here';++ @override+ String get homeLockerEmptyTitle => 'Your Locker is empty';++ @override+ String get homeLockerEmptySubtitle => 'Click the + button to get started';+@overrideString get uploadDocument => 'Upload document';diff --git a/mobile/apps/locker/lib/ui/components/home_empty_state_widget.dart b/mobile/apps/locker/lib/ui/components/home_empty_state_widget.dartindex 916f0916af..0ed47fced8 100644--- a/mobile/apps/locker/lib/ui/components/home_empty_state_widget.dart+++ b/mobile/apps/locker/lib/ui/components/home_empty_state_widget.dart@@ -1,12 +1,11 @@import "package:dotted_border/dotted_border.dart";import "package:ente_ui/theme/ente_theme.dart";import "package:flutter/material.dart";+import 'package:locker/l10n/l10n.dart';class HomeEmptyStateWidget extends StatelessWidget {- final VoidCallback onTap;const HomeEmptyStateWidget({super.key,- required this.onTap,});@override@@ -20,42 +19,39 @@ class HomeEmptyStateWidget extends StatelessWidget {dashPattern: [5, 5],radius: Radius.circular(24),),- child: GestureDetector(- onTap: onTap,- child: Container(- width: double.infinity,- decoration: BoxDecoration(- color: colorScheme.backdropBase,- borderRadius: BorderRadius.circular(24),- ),- padding: const EdgeInsets.symmetric(- horizontal: 24,- vertical: 42,- ),- child: Column(- mainAxisSize: MainAxisSize.min,- crossAxisAlignment: CrossAxisAlignment.center,- children: [- Image.asset(- 'assets/upload_file.png',- ),- const SizedBox(height: 12),- Text(- 'Upload a File',- style: textTheme.h3Bold.copyWith(- color: colorScheme.textBase,- ),+ child: Container(+ width: double.infinity,+ decoration: BoxDecoration(+ color: colorScheme.backdropBase,+ borderRadius: BorderRadius.circular(24),+ ),+ padding: const EdgeInsets.symmetric(+ horizontal: 24,+ vertical: 42,+ ),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.center,+ children: [+ Image.asset(+ 'assets/upload_file.png',+ ),+ const SizedBox(height: 12),+ Text(+ context.l10n.homeLockerEmptyTitle,+ style: textTheme.h3Bold.copyWith(+ color: colorScheme.textBase,),- const SizedBox(height: 8),- Text(- 'Click here to upload',- style: textTheme.small.copyWith(- color: colorScheme.primary700,- decoration: TextDecoration.none,- ),+ ),+ const SizedBox(height: 8),+ Text(+ context.l10n.homeLockerEmptySubtitle,+ style: textTheme.small.copyWith(+ color: colorScheme.primary700,+ decoration: TextDecoration.none,),- ],- ),+ ),+ ],),),);diff --git a/mobile/apps/locker/lib/ui/pages/collection_page.dart b/mobile/apps/locker/lib/ui/pages/collection_page.dartindex 6853cba288..7b3688e062 100644--- a/mobile/apps/locker/lib/ui/pages/collection_page.dart+++ b/mobile/apps/locker/lib/ui/pages/collection_page.dart@@ -415,12 +415,11 @@ class _CollectionPageState extends UploaderPageState<CollectionPage>child: Padding(padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),child: _displayedFiles.isEmpty- ? const Center(+ ? Center(child: EmptyStateWidget(assetPath: 'assets/empty_state.png',- title: "Nothing to see here",- subtitle:- "Upload files to this collection to see them here",+ title: context.l10n.collectionEmptyStateTitle,+ subtitle: context.l10n.collectionEmptyStateSubtitle,showBorder: false,),)diff --git a/mobile/apps/locker/lib/ui/pages/home_page.dart b/mobile/apps/locker/lib/ui/pages/home_page.dartindex b0d384319f..0b34347694 100644--- a/mobile/apps/locker/lib/ui/pages/home_page.dart+++ b/mobile/apps/locker/lib/ui/pages/home_page.dart@@ -646,10 +646,10 @@ class _HomePageState extends UploaderPageState<HomePage>);}if (_displayedCollections.isEmpty) {- return Center(+ return const Center(child: Padding(- padding: const EdgeInsets.all(16.0),- child: HomeEmptyStateWidget(onTap: addFile),+ padding: EdgeInsets.all(16.0),+ child: HomeEmptyStateWidget(),),);}@@ -702,9 +702,7 @@ class _HomePageState extends UploaderPageState<HomePage>Widget _buildRecentsSection() {if (_recentFiles.isEmpty) {- return HomeEmptyStateWidget(- onTap: addFile,- );+ return const HomeEmptyStateWidget();}return RecentsSectionWidget(collections: _filterOutUncategorized(_collections),