diff --git a/lib/src/localization/generated/app_localizations.dart b/lib/src/localization/generated/app_localizations.dart index 62dfb10f..03f997c7 100644 --- a/lib/src/localization/generated/app_localizations.dart +++ b/lib/src/localization/generated/app_localizations.dart @@ -1580,12 +1580,6 @@ abstract class AppLocalizations { /// **'Restore backup'** String get twonlySafeRecoverTitle; - /// No description provided for @twonlySafeRecoverDesc. - /// - /// In en, this message translates to: - /// **'If you have created a backup with twonly Backup, you can restore it here.'** - String get twonlySafeRecoverDesc; - /// No description provided for @twonlySafeRecoverBtn. /// /// In en, this message translates to: diff --git a/lib/src/localization/generated/app_localizations_de.dart b/lib/src/localization/generated/app_localizations_de.dart index a18dab76..41d3d4ce 100644 --- a/lib/src/localization/generated/app_localizations_de.dart +++ b/lib/src/localization/generated/app_localizations_de.dart @@ -813,10 +813,6 @@ class AppLocalizationsDe extends AppLocalizations { @override String get twonlySafeRecoverTitle => 'Backup wiederherstellen'; - @override - String get twonlySafeRecoverDesc => - 'Wenn du ein Backup mit twonly Backup erstellt hast, kannst du es hier wiederherstellen.'; - @override String get twonlySafeRecoverBtn => 'Backup wiederherstellen'; diff --git a/lib/src/localization/generated/app_localizations_en.dart b/lib/src/localization/generated/app_localizations_en.dart index bcb668bc..93778448 100644 --- a/lib/src/localization/generated/app_localizations_en.dart +++ b/lib/src/localization/generated/app_localizations_en.dart @@ -807,10 +807,6 @@ class AppLocalizationsEn extends AppLocalizations { @override String get twonlySafeRecoverTitle => 'Restore backup'; - @override - String get twonlySafeRecoverDesc => - 'If you have created a backup with twonly Backup, you can restore it here.'; - @override String get twonlySafeRecoverBtn => 'Restore backup'; diff --git a/lib/src/visual/views/onboarding/components/onboarding_wrapper.dart b/lib/src/visual/views/onboarding/components/onboarding_wrapper.dart index 9064ad09..2e11c426 100644 --- a/lib/src/visual/views/onboarding/components/onboarding_wrapper.dart +++ b/lib/src/visual/views/onboarding/components/onboarding_wrapper.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/visual/themes/light.dart'; class OnboardingWrapper extends StatelessWidget { @@ -10,11 +11,20 @@ class OnboardingWrapper extends StatelessWidget { @override Widget build(BuildContext context) { + final isDark = isDarkMode(context); + final backgroundColor = isDark ? const Color(0xFF0F172A) : primaryColor; + final topBlobColor = isDark + ? primaryColor.withValues(alpha: 0.15) + : Colors.white.withValues(alpha: 0.1); + final bottomBlobColor = isDark + ? primaryColor.withValues(alpha: 0.08) + : Colors.black.withValues(alpha: 0.05); + return GestureDetector( onTap: () => FocusManager.instance.primaryFocus?.unfocus(), behavior: HitTestBehavior.opaque, child: Scaffold( - backgroundColor: primaryColor, + backgroundColor: backgroundColor, body: Stack( children: [ Positioned( @@ -25,7 +35,7 @@ class OnboardingWrapper extends StatelessWidget { height: 300, decoration: BoxDecoration( shape: BoxShape.circle, - color: Colors.white.withValues(alpha: 0.1), + color: topBlobColor, ), ), ), @@ -37,7 +47,7 @@ class OnboardingWrapper extends StatelessWidget { height: 200, decoration: BoxDecoration( shape: BoxShape.circle, - color: Colors.black.withValues(alpha: 0.05), + color: bottomBlobColor, ), ), ), diff --git a/lib/src/visual/views/onboarding/recover.view.dart b/lib/src/visual/views/onboarding/recover.view.dart index 4b114767..71ec9f58 100644 --- a/lib/src/visual/views/onboarding/recover.view.dart +++ b/lib/src/visual/views/onboarding/recover.view.dart @@ -66,6 +66,10 @@ class _BackupRecoveryViewState extends State { @override Widget build(BuildContext context) { + final isDark = isDarkMode(context); + final cardColor = isDark ? const Color(0xFF1E293B) : Colors.white; + final inputColor = isDark ? const Color(0xFF0F172A) : Colors.grey[100]; + return OnboardingWrapper( children: [ Row( @@ -118,11 +122,13 @@ class _BackupRecoveryViewState extends State { Container( padding: const EdgeInsets.all(24), decoration: BoxDecoration( - color: Colors.white, + color: cardColor, borderRadius: BorderRadius.circular(32), boxShadow: [ BoxShadow( - color: Colors.black.withValues(alpha: 0.1), + color: isDark + ? Colors.black.withValues(alpha: 0.3) + : Colors.black.withValues(alpha: 0.1), blurRadius: 20, offset: const Offset(0, 10), ), @@ -134,20 +140,25 @@ class _BackupRecoveryViewState extends State { TextField( controller: usernameCtrl, onChanged: (value) => setState(() {}), - style: const TextStyle( + style: TextStyle( fontSize: 18, fontWeight: FontWeight.w500, + color: isDark ? Colors.white : Colors.black, ), decoration: InputDecoration( hintText: context.lang.registerUsernameDecoration, + hintStyle: TextStyle( + color: isDark ? Colors.grey[500] : Colors.grey[600], + ), filled: true, - fillColor: Colors.grey[100], + fillColor: inputColor, border: OutlineInputBorder( borderRadius: BorderRadius.circular(16), borderSide: BorderSide.none, ), - prefixIcon: const Icon( + prefixIcon: Icon( Icons.alternate_email, + color: isDark ? Colors.grey[400] : Colors.grey[600], ), ), ), @@ -155,21 +166,26 @@ class _BackupRecoveryViewState extends State { TextField( controller: passwordCtrl, onChanged: (value) => setState(() {}), - style: const TextStyle( + style: TextStyle( fontSize: 18, fontWeight: FontWeight.w500, + color: isDark ? Colors.white : Colors.black, ), obscureText: obscureText, decoration: InputDecoration( hintText: context.lang.password, + hintStyle: TextStyle( + color: isDark ? Colors.grey[500] : Colors.grey[600], + ), filled: true, - fillColor: Colors.grey[100], + fillColor: inputColor, border: OutlineInputBorder( borderRadius: BorderRadius.circular(16), borderSide: BorderSide.none, ), - prefixIcon: const Icon( + prefixIcon: Icon( Icons.lock_outline_rounded, + color: isDark ? Colors.grey[400] : Colors.grey[600], ), suffixIcon: IconButton( onPressed: () { @@ -182,6 +198,7 @@ class _BackupRecoveryViewState extends State { ? FontAwesomeIcons.eye : FontAwesomeIcons.eyeSlash, size: 16, + color: isDark ? Colors.grey[400] : Colors.grey[600], ), ), ), diff --git a/lib/src/visual/views/onboarding/register.view.dart b/lib/src/visual/views/onboarding/register.view.dart index 7a44dcf9..23668693 100644 --- a/lib/src/visual/views/onboarding/register.view.dart +++ b/lib/src/visual/views/onboarding/register.view.dart @@ -150,6 +150,14 @@ class _RegisterViewState extends State { @override Widget build(BuildContext context) { + final isDark = isDarkMode(context); + final cardColor = isDark ? const Color(0xFF1E293B) : Colors.white; + final inputColor = isDark ? const Color(0xFF0F172A) : Colors.grey[100]; + final sloganColor = isDark + ? Colors.white.withValues(alpha: 0.9) + : Colors.grey[800]; + final secondaryButtonColor = isDark ? Colors.grey[400] : Colors.grey[600]; + return OnboardingWrapper( children: [ const SizedBox(height: 40), @@ -176,11 +184,13 @@ class _RegisterViewState extends State { Container( padding: const EdgeInsets.all(24), decoration: BoxDecoration( - color: Colors.white, + color: cardColor, borderRadius: BorderRadius.circular(32), boxShadow: [ BoxShadow( - color: Colors.black.withValues(alpha: 0.1), + color: isDark + ? Colors.black.withValues(alpha: 0.3) + : Colors.black.withValues(alpha: 0.1), blurRadius: 20, offset: const Offset(0, 10), ), @@ -206,7 +216,7 @@ class _RegisterViewState extends State { textAlign: TextAlign.center, style: TextStyle( fontSize: 16, - color: Colors.grey[800], + color: sloganColor, fontWeight: FontWeight.w600, ), ), @@ -230,20 +240,25 @@ class _RegisterViewState extends State { RegExp('[a-z0-9A-Z._]'), ), ], - style: const TextStyle( + style: TextStyle( fontSize: 18, fontWeight: FontWeight.w500, + color: isDark ? Colors.white : Colors.black, ), decoration: InputDecoration( hintText: context.lang.registerUsernameDecoration, + hintStyle: TextStyle( + color: isDark ? Colors.grey[500] : Colors.grey[600], + ), filled: true, - fillColor: Colors.grey[100], + fillColor: inputColor, border: OutlineInputBorder( borderRadius: BorderRadius.circular(16), borderSide: BorderSide.none, ), - prefixIcon: const Icon( + prefixIcon: Icon( Icons.alternate_email, + color: isDark ? Colors.grey[400] : Colors.grey[600], ), ), ), @@ -309,7 +324,7 @@ class _RegisterViewState extends State { ), style: TextButton.styleFrom( minimumSize: const Size.fromHeight(50), - foregroundColor: Colors.grey[600], + foregroundColor: secondaryButtonColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(18), ), diff --git a/pubspec.yaml b/pubspec.yaml index 7e2231ff..c9e27762 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec publish_to: 'none' -version: 0.2.12+121 +version: 0.2.13+122 environment: sdk: ^3.11.0