π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update error states
AmanRajSinghMourya55c203a7a8ff
diff --git a/mobile/apps/locker/lib/ui/drawer/common_settings.dart b/mobile/apps/locker/lib/ui/drawer/common_settings.dartindex d922cdee7b..699e5768c1 100644--- a/mobile/apps/locker/lib/ui/drawer/common_settings.dart+++ b/mobile/apps/locker/lib/ui/drawer/common_settings.dart@@ -1,7 +1,7 @@import "package:expandable/expandable.dart";import "package:flutter/material.dart";-Widget sectionOptionSpacing = const SizedBox(height: 6);+Widget sectionOptionSpacing = const SizedBox(height: 8);ExpandableThemeData getExpandableTheme() {return const ExpandableThemeData(diff --git a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart b/mobile/apps/locker/lib/ui/pages/all_collections_page.dartindex 2c5332324b..4757030c37 100644--- a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart+++ b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart@@ -12,6 +12,7 @@ import 'package:locker/models/ui_section_type.dart';import 'package:locker/services/collections/collections_service.dart';import 'package:locker/services/collections/models/collection.dart';import "package:locker/ui/components/empty_state_widget.dart";+import "package:locker/ui/components/gradient_button.dart";import 'package:locker/ui/components/item_list_view.dart';import 'package:locker/ui/pages/collection_page.dart';import "package:locker/ui/viewer/actions/collection_selection_overlay_bar.dart";@@ -178,29 +179,26 @@ class _AllCollectionsPageState extends State<AllCollectionsPage> {);}- //TODO: Fix issue when this is trueif (_error != null) {return Center(- child: Column(- mainAxisAlignment: MainAxisAlignment.center,- children: [- const Icon(- Icons.error_outline,- color: Colors.red,- size: 64,- ),- const SizedBox(height: 16),- Text(- _error!,- style: const TextStyle(color: Colors.red),- textAlign: TextAlign.center,- ),- const SizedBox(height: 16),- ElevatedButton(- onPressed: _loadCollections,- child: Text(context.l10n.retry),- ),- ],+ child: Padding(+ padding: const EdgeInsets.all(16.0),+ child: Column(+ mainAxisAlignment: MainAxisAlignment.center,+ children: [+ EmptyStateWidget(+ assetPath: 'assets/empty_state.png',+ title: context.l10n.somethingWentWrong,+ subtitle: _error!,+ showBorder: false,+ ),+ const SizedBox(height: 20),+ GradientButton(+ onTap: _loadCollections,+ text: context.l10n.retry,+ ),+ ],+ ),),);}@@ -208,9 +206,9 @@ class _AllCollectionsPageState extends State<AllCollectionsPage> {if (_sortedCollections.isEmpty) {return Center(child: Padding(- padding: const EdgeInsets.all(32.0),+ padding: const EdgeInsets.all(16.0),child: Column(- mainAxisAlignment: MainAxisAlignment.start,+ mainAxisAlignment: MainAxisAlignment.center,children: [EmptyStateWidget(assetPath: 'assets/empty_state.png',diff --git a/mobile/apps/locker/lib/ui/pages/collection_page.dart b/mobile/apps/locker/lib/ui/pages/collection_page.dartindex ec56e8fdd2..2da3159f07 100644--- a/mobile/apps/locker/lib/ui/pages/collection_page.dart+++ b/mobile/apps/locker/lib/ui/pages/collection_page.dart@@ -473,7 +473,7 @@ class _CollectionPageState extends UploaderPageState<CollectionPage>),Expanded(child: Padding(- padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),+ padding: const EdgeInsets.all(16.0),child: _displayedFiles.isEmpty? Center(child: EmptyStateWidget(diff --git a/mobile/apps/locker/lib/ui/pages/home_page.dart b/mobile/apps/locker/lib/ui/pages/home_page.dartindex e53143a6ee..33154af77d 100644--- a/mobile/apps/locker/lib/ui/pages/home_page.dart+++ b/mobile/apps/locker/lib/ui/pages/home_page.dart@@ -20,6 +20,7 @@ import 'package:locker/services/collections/models/collection.dart';import 'package:locker/services/configuration.dart';import 'package:locker/services/files/sync/models/file.dart';import "package:locker/states/user_details_state.dart";+import "package:locker/ui/components/empty_state_widget.dart";import "package:locker/ui/components/gradient_button.dart";import "package:locker/ui/components/home_empty_state_widget.dart";import 'package:locker/ui/components/recents_section_widget.dart';@@ -674,34 +675,25 @@ class _HomePageState extends UploaderPageState<HomePage>}Widget _buildBody() {- final colorScheme = getEnteColorScheme(context);if (_error != null) {- return SingleChildScrollView(- physics: const AlwaysScrollableScrollPhysics(),- child: SizedBox(- height: MediaQuery.of(context).size.height - 200,- child: Center(- child: Column(- mainAxisAlignment: MainAxisAlignment.center,- children: [- Icon(- Icons.error_outline,- color: colorScheme.warning400,- size: 64,- ),- const SizedBox(height: 16),- Text(- _error!,- style: TextStyle(color: colorScheme.warning400),- textAlign: TextAlign.center,- ),- const SizedBox(height: 16),- ElevatedButton(- onPressed: () => _loadCollections(),- child: Text(context.l10n.retry),- ),- ],- ),+ return Center(+ child: Padding(+ padding: const EdgeInsets.all(16.0),+ child: Column(+ mainAxisAlignment: MainAxisAlignment.center,+ children: [+ EmptyStateWidget(+ assetPath: 'assets/empty_state.png',+ title: context.l10n.somethingWentWrong,+ subtitle: _error!,+ showBorder: false,+ ),+ const SizedBox(height: 20),+ GradientButton(+ onTap: _loadCollections,+ text: context.l10n.retry,+ ),+ ],),),);