diff --git a/.config/dictionaries/project.dic b/.config/dictionaries/project.dic index 3fd135d47f3..ec491f75676 100644 --- a/.config/dictionaries/project.dic +++ b/.config/dictionaries/project.dic @@ -135,6 +135,7 @@ timelike tojunit Traceback TXNZD +Typer unmanaged UTXO vitss diff --git a/catalyst_voices/lib/app/view/app_content.dart b/catalyst_voices/lib/app/view/app_content.dart index e50e0a73f04..671fd100434 100644 --- a/catalyst_voices/lib/app/view/app_content.dart +++ b/catalyst_voices/lib/app/view/app_content.dart @@ -29,7 +29,7 @@ final class AppContent extends StatelessWidget { localeListResolutionCallback: basicLocaleListResolution, routerConfig: _routeConfig(context), theme: ThemeData( - brightness: Brightness.dark, + //brightness: Brightness.dark, bottomNavigationBarTheme: const BottomNavigationBarThemeData( type: BottomNavigationBarType.fixed, ), diff --git a/catalyst_voices/lib/pages/coming_soon/coming_soon.dart b/catalyst_voices/lib/pages/coming_soon/coming_soon.dart new file mode 100644 index 00000000000..79e7ad0b417 --- /dev/null +++ b/catalyst_voices/lib/pages/coming_soon/coming_soon.dart @@ -0,0 +1,53 @@ +import 'package:catalyst_voices/pages/coming_soon/description.dart'; +import 'package:catalyst_voices/pages/coming_soon/logo.dart'; +import 'package:catalyst_voices/pages/coming_soon/title.dart'; +import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; +import 'package:catalyst_voices_shared/catalyst_voices_shared.dart'; +import 'package:flutter/material.dart'; + +final class ComingSoonPage extends StatelessWidget { + static const comingSoonPageKey = Key('ComingSoon'); + + const ComingSoonPage({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + key: comingSoonPageKey, + body: Container( + constraints: const BoxConstraints.expand(), + decoration: BoxDecoration( + image: DecorationImage( + image: CatalystImage.asset( + VoicesAssets.images.comingSoonBkg.path, + ).image, + fit: BoxFit.cover, + ), + ), + child: ResponsivePadding( + xs: const EdgeInsets.only(left: 17), + sm: const EdgeInsets.only(left: 119), + md: const EdgeInsets.only(left: 150), + lg: const EdgeInsets.only(left: 150), + other: const EdgeInsets.only(left: 150), + child: Align( + alignment: Alignment.centerLeft, + child: ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 356), + child: const Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ComingSoonLogo(), + ComingSoonTitle(), + ComingSoonDescription(), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/catalyst_voices/lib/pages/coming_soon/description.dart b/catalyst_voices/lib/pages/coming_soon/description.dart new file mode 100644 index 00000000000..90214c098b0 --- /dev/null +++ b/catalyst_voices/lib/pages/coming_soon/description.dart @@ -0,0 +1,36 @@ +import 'package:animated_text_kit/animated_text_kit.dart'; +import 'package:catalyst_voices_assets/generated/colors.gen.dart'; +import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class ComingSoonDescription extends StatelessWidget { + const ComingSoonDescription({super.key}); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: 66, + child: DefaultTextStyle( + style: GoogleFonts.notoSans( + textStyle: const TextStyle(color: VoicesColors.blueText), + fontSize: 16, + fontWeight: FontWeight.w400, + ), + child: AnimatedTextKit( + pause: const Duration(milliseconds: 2000), + animatedTexts: [ + // We need an empty initial text to trigger an initial + // pause + TyperAnimatedText('', speed: Duration.zero), + TyperAnimatedText( + context.l10n.comingSoonDescription, + speed: const Duration(milliseconds: 30), + ), + ], + totalRepeatCount: 1, + ), + ), + ); + } +} diff --git a/catalyst_voices/lib/pages/coming_soon/logo.dart b/catalyst_voices/lib/pages/coming_soon/logo.dart new file mode 100644 index 00000000000..0547e27a5a6 --- /dev/null +++ b/catalyst_voices/lib/pages/coming_soon/logo.dart @@ -0,0 +1,32 @@ +import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; +import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class ComingSoonLogo extends StatelessWidget { + const ComingSoonLogo({super.key}); + + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + return Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + CatalystImage.asset( + VoicesAssets.images.logo.path, + ), + Container( + margin: const EdgeInsets.only(left: 13, bottom: 6), + child: Text( + l10n.comingSoonSubtitle, + style: GoogleFonts.notoSans( + textStyle: const TextStyle(color: VoicesColors.blue), + fontSize: 19, + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ); + } +} diff --git a/catalyst_voices/lib/pages/coming_soon/title.dart b/catalyst_voices/lib/pages/coming_soon/title.dart new file mode 100644 index 00000000000..e2230b295cb --- /dev/null +++ b/catalyst_voices/lib/pages/coming_soon/title.dart @@ -0,0 +1,62 @@ +import 'package:animated_text_kit/animated_text_kit.dart'; +import 'package:catalyst_voices_assets/generated/colors.gen.dart'; +import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class ComingSoonTitle extends StatelessWidget { + const ComingSoonTitle({super.key}); + + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + return Container( + height: 122, + margin: const EdgeInsets.symmetric(vertical: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DefaultTextStyle( + style: GoogleFonts.poppins( + textStyle: const TextStyle(color: VoicesColors.blue), + fontSize: 53, + height: 1.15, + fontWeight: FontWeight.w700, + ), + child: AnimatedTextKit( + animatedTexts: [ + TyperAnimatedText( + l10n.comingSoonTitle1, + speed: const Duration(milliseconds: 200), + ), + ], + totalRepeatCount: 1, + ), + ), + DefaultTextStyle( + style: GoogleFonts.poppins( + textStyle: const TextStyle(color: VoicesColors.blue), + fontSize: 53, + height: 1.15, + fontWeight: FontWeight.w700, + ), + child: AnimatedTextKit( + pause: const Duration(milliseconds: 1200), + animatedTexts: [ + TyperAnimatedText( + '', + speed: Duration.zero, + ), + TyperAnimatedText( + l10n.comingSoonTitle2, + speed: const Duration(milliseconds: 200), + ), + ], + totalRepeatCount: 1, + ), + ), + ], + ), + ); + } +} diff --git a/catalyst_voices/lib/routes/app_router.dart b/catalyst_voices/lib/routes/app_router.dart index 608056d2ab2..1cf6faceacf 100644 --- a/catalyst_voices/lib/routes/app_router.dart +++ b/catalyst_voices/lib/routes/app_router.dart @@ -28,18 +28,8 @@ final class AppRouter { AuthenticationBloc authenticationBloc, GoRouterState state, ) { - final isAuthenticated = authenticationBloc.isAuthenticated; - final signingIn = state.matchedLocation == login_route.loginPath; - - if (!isAuthenticated) { - return login_route.loginPath; - } - - if (signingIn) { - return home_route.homePath; - } - - return null; + // Always return home route that defaults to coming soon page. + return home_route.homePath; } static String? _isWeb() { diff --git a/catalyst_voices/lib/routes/home_page_route.dart b/catalyst_voices/lib/routes/home_page_route.dart index 2efb81d2023..c69d7aa56e8 100644 --- a/catalyst_voices/lib/routes/home_page_route.dart +++ b/catalyst_voices/lib/routes/home_page_route.dart @@ -1,15 +1,15 @@ -import 'package:catalyst_voices/pages/home/home_page.dart'; +import 'package:catalyst_voices/pages/coming_soon/coming_soon.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; part 'home_page_route.g.dart'; -const homePath = '/home'; +const homePath = '/'; @TypedGoRoute(path: homePath) final class HomeRoute extends GoRouteData { @override Widget build(BuildContext context, GoRouterState state) { - return const HomePage(); + return const ComingSoonPage(); } } diff --git a/catalyst_voices/lib/routes/home_page_route.g.dart b/catalyst_voices/lib/routes/home_page_route.g.dart index 60410b89093..3ec8ca4cf9a 100644 --- a/catalyst_voices/lib/routes/home_page_route.g.dart +++ b/catalyst_voices/lib/routes/home_page_route.g.dart @@ -11,7 +11,7 @@ List get $appRoutes => [ ]; RouteBase get $homeRoute => GoRouteData.$route( - path: '/home', + path: '/', factory: $HomeRouteExtension._fromState, ); @@ -19,7 +19,7 @@ extension $HomeRouteExtension on HomeRoute { static HomeRoute _fromState(GoRouterState state) => HomeRoute(); String get location => GoRouteData.$location( - '/home', + '/', ); void go(BuildContext context) => context.go(location); diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/colors/colors.xml b/catalyst_voices/packages/catalyst_voices_assets/assets/colors/colors.xml index cb790c64dcf..0a9f7a30dd0 100644 --- a/catalyst_voices/packages/catalyst_voices_assets/assets/colors/colors.xml +++ b/catalyst_voices/packages/catalyst_voices_assets/assets/colors/colors.xml @@ -9,4 +9,6 @@ #7CAE7A #B02E0C #565656 + #1235C7 + #506288 diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/images/coming_soon_bkg.webp b/catalyst_voices/packages/catalyst_voices_assets/assets/images/coming_soon_bkg.webp new file mode 100644 index 00000000000..c61fc9f3fb6 Binary files /dev/null and b/catalyst_voices/packages/catalyst_voices_assets/assets/images/coming_soon_bkg.webp differ diff --git a/catalyst_voices/packages/catalyst_voices_assets/assets/images/logo.webp b/catalyst_voices/packages/catalyst_voices_assets/assets/images/logo.webp new file mode 100644 index 00000000000..e0e9688c742 Binary files /dev/null and b/catalyst_voices/packages/catalyst_voices_assets/assets/images/logo.webp differ diff --git a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart index 52ced289c96..467a659fa9b 100644 --- a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart +++ b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/assets.gen.dart @@ -12,12 +12,19 @@ import 'package:flutter/widgets.dart'; class $AssetsImagesGen { const $AssetsImagesGen(); + /// File path: assets/images/coming_soon_bkg.webp + AssetGenImage get comingSoonBkg => + const AssetGenImage('assets/images/coming_soon_bkg.webp'); + /// File path: assets/images/dummy_catalyst_voices.webp AssetGenImage get dummyCatalystVoices => const AssetGenImage('assets/images/dummy_catalyst_voices.webp'); + /// File path: assets/images/logo.webp + AssetGenImage get logo => const AssetGenImage('assets/images/logo.webp'); + /// List of all assets - List get values => [dummyCatalystVoices]; + List get values => [comingSoonBkg, dummyCatalystVoices, logo]; } class VoicesAssets { diff --git a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart index d0115681433..6259051f28f 100644 --- a/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart +++ b/catalyst_voices/packages/catalyst_voices_assets/lib/generated/colors.gen.dart @@ -13,6 +13,12 @@ import 'package:flutter/material.dart'; class VoicesColors { VoicesColors._(); + /// Color: #1235C7 + static const Color blue = Color(0xFF1235C7); + + /// Color: #506288 + static const Color blueText = Color(0xFF506288); + /// Color: #000000 static const Color darkBackground = Color(0xFF000000); diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart index 1fcd2e59b3a..e91c8b2ffb1 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations.dart @@ -151,6 +151,30 @@ abstract class VoicesLocalizations { /// In en, this message translates to: /// **'Catalyst Voices'** String get homeScreenText; + + /// Text shown after logo in coming soon page + /// + /// In en, this message translates to: + /// **'Voices'** + String get comingSoonSubtitle; + + /// Text shown as main title in coming soon page + /// + /// In en, this message translates to: + /// **'Coming'** + String get comingSoonTitle1; + + /// Text shown as main title in coming soon page + /// + /// In en, this message translates to: + /// **'soon'** + String get comingSoonTitle2; + + /// Text shown as description in coming soon page + /// + /// In en, this message translates to: + /// **'Project Catalyst is the world\'s largest decentralized innovation engine for solving real-world challenges.'** + String get comingSoonDescription; } class _VoicesLocalizationsDelegate extends LocalizationsDelegate { diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart index 2b8cc9c8402..7f270f05dcc 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_en.dart @@ -33,4 +33,16 @@ class VoicesLocalizationsEn extends VoicesLocalizations { @override String get homeScreenText => 'Catalyst Voices'; + + @override + String get comingSoonSubtitle => 'Voices'; + + @override + String get comingSoonTitle1 => 'Coming'; + + @override + String get comingSoonTitle2 => 'soon'; + + @override + String get comingSoonDescription => 'Project Catalyst is the world\'s largest decentralized innovation engine for solving real-world challenges.'; } diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart index a38f8f03a19..67c9f0888f1 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/generated/catalyst_voices_localizations_es.dart @@ -33,4 +33,16 @@ class VoicesLocalizationsEs extends VoicesLocalizations { @override String get homeScreenText => 'Catalyst Voices'; + + @override + String get comingSoonSubtitle => 'Voices'; + + @override + String get comingSoonTitle1 => 'Coming'; + + @override + String get comingSoonTitle2 => 'soon'; + + @override + String get comingSoonDescription => 'Project Catalyst is the world\'s largest decentralized innovation engine for solving real-world challenges.'; } diff --git a/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb b/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb index 5136e4327b0..db3ea5ada57 100644 --- a/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb +++ b/catalyst_voices/packages/catalyst_voices_localization/lib/l10n/intl_en.arb @@ -39,5 +39,21 @@ "homeScreenText": "Catalyst Voices", "@homeScreenText": { "description": "Text shown in the home screen" + }, + "comingSoonSubtitle": "Voices", + "@comingSoonSubtitle": { + "description": "Text shown after logo in coming soon page" + }, + "comingSoonTitle1": "Coming", + "@comingSoonTitle1": { + "description": "Text shown as main title in coming soon page" + }, + "comingSoonTitle2": "soon", + "@comingSoonTitle2": { + "description": "Text shown as main title in coming soon page" + }, + "comingSoonDescription": "Project Catalyst is the world's largest decentralized innovation engine for solving real-world challenges.", + "@comingSoonDescription": { + "description": "Text shown as description in coming soon page" } } diff --git a/catalyst_voices/packages/catalyst_voices_shared/test/src/responsive_builder_test.dart b/catalyst_voices/packages/catalyst_voices_shared/test/src/responsive_builder_test.dart index 4cf620ce0fe..f786cd82b94 100644 --- a/catalyst_voices/packages/catalyst_voices_shared/test/src/responsive_builder_test.dart +++ b/catalyst_voices/packages/catalyst_voices_shared/test/src/responsive_builder_test.dart @@ -76,7 +76,7 @@ void main() { other: const EdgeInsets.all(32), builder: (context, padding) => Padding( padding: padding!, - child: const Text('Test') + child: const Text('Test'), ), ), ), diff --git a/catalyst_voices/pubspec.yaml b/catalyst_voices/pubspec.yaml index 52631fffc6c..1663cf72f63 100644 --- a/catalyst_voices/pubspec.yaml +++ b/catalyst_voices/pubspec.yaml @@ -8,6 +8,7 @@ environment: flutter: 3.19.1 dependencies: + animated_text_kit: ^4.2.2 animations: ^2.0.11 catalyst_voices_assets: path: ./packages/catalyst_voices_assets @@ -34,6 +35,7 @@ dependencies: sdk: flutter formz: ^0.7.0 go_router: ^13.0.0 + google_fonts: ^6.2.1 url_launcher: ^6.2.2 url_strategy: ^0.2.0