Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

local gallery get started banner

laurensprieme931579ace6d
diff --git a/mobile/apps/photos/assets/2.0x/ducky_get_started.png b/mobile/apps/photos/assets/2.0x/ducky_get_started.png
deleted file mode 100644
index a3d881c5a3..0000000000
Binary files a/mobile/apps/photos/assets/2.0x/ducky_get_started.png and /dev/null differ
diff --git a/mobile/apps/photos/assets/3.0x/ducky_get_started.png b/mobile/apps/photos/assets/3.0x/ducky_get_started.png
deleted file mode 100644
index 2193872f02..0000000000
Binary files a/mobile/apps/photos/assets/3.0x/ducky_get_started.png and /dev/null differ
diff --git a/mobile/apps/photos/assets/ducky_10gb_free.png b/mobile/apps/photos/assets/ducky_10gb_free.png
new file mode 100644
index 0000000000..e86dcf1669
Binary files /dev/null and b/mobile/apps/photos/assets/ducky_10gb_free.png differ
diff --git a/mobile/apps/photos/assets/ducky_get_started.png b/mobile/apps/photos/assets/ducky_get_started.png
deleted file mode 100644
index 43c298704d..0000000000
Binary files a/mobile/apps/photos/assets/ducky_get_started.png and /dev/null differ
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arb
index 351f7472e1..4dd8de2950 100644
--- a/mobile/apps/photos/lib/l10n/intl_en.arb
+++ b/mobile/apps/photos/lib/l10n/intl_en.arb
@@ -3066,6 +3066,9 @@
"moreThanJustAGallery": "More than just a gallery.",
"encryptedBackupDescription": "Encrypted backup, smart search, shareable links, and seamless sync across all your devices.",
"getStarted": "Get started",
+ "offlineHomeSignupBannerTitle": "Protect your memories forever",
+ "offlineHomeSignupBannerDescription": "Encrypted backups across 3 locations to keep your memories safe.",
+ "offlineHomeSignupBannerAction": "Back up now",
"unlockSmartFeatures": "Unlock smart features",
"enableOnDeviceMLDescription": "Enable on-device ML to search by faces, places, and more. Your photos never leave your device.",
"offlineEnableSharingTitle": "Sharing starts here",
diff --git a/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart b/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart
index dbc94e6e40..de1be7436b 100644
--- a/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart
+++ b/mobile/apps/photos/lib/ui/components/banners/get_started_banner.dart
@@ -1,11 +1,8 @@
import "package:flutter/material.dart";
-import "package:hugeicons/hugeicons.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/service_locator.dart";
-import "package:photos/theme/colors.dart";
import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/account/email_entry_page.dart";
-import "package:photos/ui/components/banners/banner_action_button.dart";
class GetStartedBanner extends StatefulWidget {
const GetStartedBanner({super.key});
@@ -24,107 +21,143 @@ class _GetStartedBannerState extends State<GetStartedBanner> {
return const SizedBox.shrink();
}
- final colorScheme = getEnteColorScheme(context);
- final textTheme = getEnteTextTheme(context);
final l10n = AppLocalizations.of(context);
+ final colorScheme = getEnteColorScheme(context);
- final titleStyle = textTheme.largeBold.copyWith(
+ const titleStyle = TextStyle(
fontFamily: "Nunito",
- fontWeight: FontWeight.w800,
- fontSize: 20,
- height: 24 / 18,
- letterSpacing: -1,
+ fontWeight: FontWeight.w900,
+ fontSize: 22,
+ height: 22 / 22,
color: Colors.white,
);
+ // Subtitle uses Inter (the Ente design system default) to match the
+ // pre-redesign banner. Inter has all weight files declared in
+ // pubspec.yaml, so SemiBold (w600) resolves correctly β€” Montserrat
+ // only ships the Bold file and would render at the wrong weight.
+ final descriptionStyle = TextStyle(
+ fontFamily: "Inter",
+ fontWeight: FontWeight.w600,
+ fontSize: 12,
+ height: 20 / 12,
+ letterSpacing: -0.2,
+ color: Colors.white.withValues(alpha: 0.8),
+ );
+ const buttonStyle = TextStyle(
+ fontFamily: "Nunito",
+ fontWeight: FontWeight.w900,
+ fontSize: 14,
+ height: 14 / 14,
+ letterSpacing: -0.48,
+ color: Colors.black,
+ );
return Padding(
- padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 8),
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
child: GestureDetector(
onTap: _onGetStarted,
child: Container(
- height: 180,
+ width: double.infinity,
+ height: 188,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(16),
+ borderRadius: BorderRadius.circular(15),
color: colorScheme.greenBase,
),
- child: Stack(
- children: [
- Padding(
- padding: const EdgeInsets.all(16),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Expanded(
- child: ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 235),
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ final innerWidth = constraints.maxWidth - 32;
+ final titleMaxWidth =
+ (innerWidth - 32).clamp(120.0, double.infinity);
+ // 12px Inter SemiBold needs ~240px to fit the English
+ // description on two lines; clamp so it doesn't overflow
+ // on very narrow devices.
+ final descMaxWidth = innerWidth < 240.0 ? innerWidth : 240.0;
+
+ return Stack(
+ children: [
+ Positioned(
+ right: 8,
+ bottom: 0,
+ child: IgnorePointer(
+ child: Image.asset(
+ "assets/ducky_10gb_free.png",
+ width: 188,
+ fit: BoxFit.contain,
+ ),
+ ),
+ ),
+ Positioned.fill(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(16, 18, 16, 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(
+ width: titleMaxWidth,
+ child: FittedBox(
+ fit: BoxFit.scaleDown,
+ alignment: Alignment.centerLeft,
+ child: Text(
+ l10n.offlineHomeSignupBannerTitle,
+ maxLines: 1,
+ softWrap: false,
+ style: titleStyle,
+ ),
+ ),
+ ),
+ const SizedBox(height: 13),
+ SizedBox(
+ width: descMaxWidth,
child: Text(
- l10n.moreThanJustAGallery,
- style: titleStyle,
- maxLines: 1,
- softWrap: false,
+ l10n.offlineHomeSignupBannerDescription,
+ maxLines: 2,
overflow: TextOverflow.ellipsis,
+ style: descriptionStyle,
),
),
- ),
- GestureDetector(
- onTap: _onDismiss,
- behavior: HitTestBehavior.opaque,
- child: Container(
- decoration: const BoxDecoration(
- shape: BoxShape.circle,
- color: greenDark,
- ),
- child: const Padding(
- padding: EdgeInsets.all(4),
- child: HugeIcon(
- icon: HugeIcons.strokeRoundedCancel01,
- color: contentDark,
- size: 18,
- strokeWidth: 2.5,
+ const Spacer(),
+ GestureDetector(
+ onTap: _onGetStarted,
+ behavior: HitTestBehavior.opaque,
+ child: Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 20,
+ vertical: 12,
+ ),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Text(
+ l10n.offlineHomeSignupBannerAction,
+ style: buttonStyle,
),
),
),
- ),
- ],
+ ],
+ ),
),
- const SizedBox(height: 4),
- ConstrainedBox(
- constraints: const BoxConstraints(maxWidth: 235),
- child: Text(
- l10n.encryptedBackupDescription,
- style: textTheme.smallMuted.copyWith(
- color: Colors.white.withValues(alpha: 0.9),
+ ),
+ Positioned(
+ top: 12,
+ right: 12,
+ child: GestureDetector(
+ onTap: _onDismiss,
+ behavior: HitTestBehavior.opaque,
+ child: const Padding(
+ padding: EdgeInsets.all(4),
+ child: Icon(
+ Icons.close,
+ color: Colors.white,
+ size: 16,
),
),
),
- ],
- ),
- ),
- Positioned(
- left: 16,
- bottom: 16,
- child: BannerActionButton(
- label: l10n.getStarted,
- onTap: _onGetStarted,
- variant: BannerActionButtonVariant.neutral,
- ),
- ),
- Positioned(
- right: 16,
- bottom: 12,
- child: IgnorePointer(
- child: Image.asset(
- "assets/ducky_get_started.png",
- height: 120,
- fit: BoxFit.contain,
),
- ),
- ),
- ],
+ ],
+ );
+ },
),
),
),