π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update shared section tab empty state
AmanRajSinghMourya25259a44c418
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.dartnew file mode 100644index 0000000000..f2f2941884--- /dev/null+++ b/mobile/apps/photos/lib/ui/components/banners/shared_empty_offline_state_widget.dart@@ -0,0 +1,81 @@+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";++class SharedEmptyOfflineStateWidget extends StatelessWidget {+ const SharedEmptyOfflineStateWidget({super.key});++ @override+ Widget build(BuildContext context) {+ final colorScheme = getEnteColorScheme(context);+ final textTheme = getEnteTextTheme(context);+ final l10n = AppLocalizations.of(context);++ return Center(+ child: Padding(+ padding: const EdgeInsets.symmetric(horizontal: 36),+ child: Column(+ mainAxisAlignment: MainAxisAlignment.center,+ children: [+ Image.asset(+ "assets/ducky_share.png",+ height: 180,+ errorBuilder: (context, error, stackTrace) {+ return const SizedBox(height: 180);+ },+ ),+ const SizedBox(height: 24),+ Text(+ l10n.offlineEnableSharingTitle,+ style: TextStyle(+ fontFamily: "Nunito",+ fontWeight: FontWeight.w900,+ fontSize: 28,+ letterSpacing: -1.0,+ color: colorScheme.textBase,+ ),+ ),+ const SizedBox(height: 12),+ Text(+ l10n.offlineEnableSharingDesc,+ textAlign: TextAlign.center,+ style: textTheme.body.copyWith(+ color: colorScheme.textMuted,+ ),+ ),+ const SizedBox(height: 24),+ GestureDetector(+ onTap: () {+ Navigator.of(context).push(+ MaterialPageRoute(+ builder: (_) => const LandingPageWidget(),+ ),+ );+ },+ child: Container(+ height: 48,+ padding:+ const EdgeInsets.symmetric(vertical: 14, horizontal: 24),+ decoration: BoxDecoration(+ color: colorScheme.greenBase,+ borderRadius: BorderRadius.circular(16),+ ),+ child: Text(+ l10n.offlineEnableSharingAction,+ style: const TextStyle(+ fontFamily: "Montserrat",+ fontWeight: FontWeight.bold,+ fontSize: 13,+ height: 16 / 13,+ color: Colors.white,+ ),+ ),+ ),+ ),+ ],+ ),+ ),+ );+ }+}diff --git a/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dart b/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dartindex 922f4accdf..048013e551 100644--- a/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dart+++ b/mobile/apps/photos/lib/ui/tabs/shared_collections_tab.dart@@ -20,8 +20,8 @@ import "package:photos/theme/ente_theme.dart";import "package:photos/ui/collections/album/row_item.dart";import "package:photos/ui/collections/collection_list_page.dart";import "package:photos/ui/common/loading_widget.dart";+import "package:photos/ui/components/banners/shared_empty_offline_state_widget.dart";import "package:photos/ui/components/buttons/icon_button_widget.dart";-import "package:photos/ui/offline/empty/share.dart";import "package:photos/ui/social/widgets/feed_preview_widget.dart";import "package:photos/ui/tabs/section_title.dart";import "package:photos/ui/tabs/shared/all_quick_links_page.dart";@@ -123,11 +123,8 @@ class _SharedCollectionsTabState extends State<SharedCollectionsTab>builder: (context, snapshot) {if (snapshot.hasData) {if (isOfflineMode) {- return SafeArea(- child: SingleChildScrollView(- physics: const BouncingScrollPhysics(),- child: EmptySharedSection(collections: snapshot.data!),- ),+ return const SafeArea(+ child: SharedEmptyOfflineStateWidget(),);}if ((snapshot.data?.incoming.length ?? 0) == 0 &&