Skip to content

Commit

Permalink
feat: My account, account page, translations
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalheartxs committed Sep 24, 2024
1 parent e4908d8 commit 0e10899
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 10 deletions.
21 changes: 11 additions & 10 deletions catalyst_voices/lib/pages/account/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:catalyst_voices/widgets/buttons/voices_icon_button.dart';
import 'package:catalyst_voices/widgets/buttons/voices_text_button.dart';
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart';
import 'package:catalyst_voices_brands/catalyst_voices_brands.dart';
import 'package:catalyst_voices_localization/catalyst_voices_localization.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

Expand Down Expand Up @@ -87,14 +88,14 @@ class _Header extends StatelessWidget {
direction: Axis.vertical,
children: [
Text(
'My Account / Profile & Keychain',
context.l10n.myAccountProfileKeychain,
style: Theme.of(context).textTheme.displayMedium?.copyWith(
color: Colors.white,
),
),
const SizedBox(height: 4),
Text(
'Your Catalyst keychain & role registration',
context.l10n.yourCatalystKeychainAndRoleRegistration,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: Colors.white,
),
Expand All @@ -111,13 +112,13 @@ class _Header extends StatelessWidget {
class _Tab extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const DefaultTabController(
return DefaultTabController(
length: 1,
child: TabBar(
padding: EdgeInsets.symmetric(horizontal: 20),
padding: const EdgeInsets.symmetric(horizontal: 20),
isScrollable: true,
tabs: [
Tab(text: 'Profile & Keychain'),
Tab(text: context.l10n.profileAndKeychain),
],
),
);
Expand Down Expand Up @@ -157,16 +158,16 @@ class _KeychainCard extends StatelessWidget {
children: [
Expanded(
child: Text(
'Catalyst Keychain',
context.l10n.catalystKeychain,
style: Theme.of(context).textTheme.titleLarge,
),
),
VoicesTextButton.customColor(
leading: VoicesAssets.icons.x.buildIcon(),
color: Theme.of(context).colors.iconsError,
onTap: onRemoveKeychain,
child: const Text(
'Remove Keychain',
child: Text(
context.l10n.removeKeychain,
),
),
],
Expand All @@ -175,7 +176,7 @@ class _KeychainCard extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(vertical: 24),
child: Text(
'Wallet connected',
context.l10n.walletConnected,
style: Theme.of(context).textTheme.titleMedium,
),
),
Expand Down Expand Up @@ -208,7 +209,7 @@ class _KeychainCard extends StatelessWidget {
bottom: 24,
),
child: Text(
'Current Role registrations',
context.l10n.currentRoleRegistrations,
style: Theme.of(context).textTheme.titleMedium,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,48 @@ abstract class VoicesLocalizations {
/// In en, this message translates to:
/// **'Good password strength'**
String get goodPasswordStrength;

/// Title of My Account page
///
/// In en, this message translates to:
/// **'My Account / Profile & Keychain'**
String get myAccountProfileKeychain;

/// Subtitle of My Account page
///
/// In en, this message translates to:
/// **'Your Catalyst keychain & role registration'**
String get yourCatalystKeychainAndRoleRegistration;

/// Tab on My Account page
///
/// In en, this message translates to:
/// **'Profile & Keychain'**
String get profileAndKeychain;

/// Title of Catalyst Keychain card
///
/// In en, this message translates to:
/// **'Catalyst Keychain'**
String get catalystKeychain;

/// Action on Catalyst Keychain card
///
/// In en, this message translates to:
/// **'Remove Keychain'**
String get removeKeychain;

/// Describes that wallet is connected on Catalyst Keychain card
///
/// In en, this message translates to:
/// **'Wallet connected'**
String get walletConnected;

/// Describes roles on Catalyst Keychain card
///
/// In en, this message translates to:
/// **'Current Role registrations'**
String get currentRoleRegistrations;
}

class _VoicesLocalizationsDelegate extends LocalizationsDelegate<VoicesLocalizations> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,25 @@ class VoicesLocalizationsEn extends VoicesLocalizations {

@override
String get goodPasswordStrength => 'Good password strength';

@override
String get myAccountProfileKeychain => 'My Account / Profile & Keychain';

@override
String get yourCatalystKeychainAndRoleRegistration => 'Your Catalyst keychain & role registration';

@override
String get profileAndKeychain => 'Profile & Keychain';

@override
String get catalystKeychain => 'Catalyst Keychain';

@override
String get removeKeychain => 'Remove Keychain';

@override
String get walletConnected => 'Wallet connected';

@override
String get currentRoleRegistrations => 'Current Role registrations';
}
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,25 @@ class VoicesLocalizationsEs extends VoicesLocalizations {

@override
String get goodPasswordStrength => 'Good password strength';

@override
String get myAccountProfileKeychain => 'My Account / Profile & Keychain';

@override
String get yourCatalystKeychainAndRoleRegistration => 'Your Catalyst keychain & role registration';

@override
String get profileAndKeychain => 'Profile & Keychain';

@override
String get catalystKeychain => 'Catalyst Keychain';

@override
String get removeKeychain => 'Remove Keychain';

@override
String get walletConnected => 'Wallet connected';

@override
String get currentRoleRegistrations => 'Current Role registrations';
}
Original file line number Diff line number Diff line change
Expand Up @@ -425,5 +425,33 @@
"goodPasswordStrength": "Good password strength",
"@goodPasswordStrength": {
"description": "Describes a password that is strong."
},
"myAccountProfileKeychain": "My Account / Profile & Keychain",
"@myAccountProfileKeychain": {
"description": "Title of My Account page"
},
"yourCatalystKeychainAndRoleRegistration": "Your Catalyst keychain & role registration",
"@yourCatalystKeychainAndRoleRegistration": {
"description": "Subtitle of My Account page"
},
"profileAndKeychain": "Profile & Keychain",
"@profileAndKeychain": {
"description": "Tab on My Account page"
},
"catalystKeychain": "Catalyst Keychain",
"@catalystKeychain": {
"description": "Title of Catalyst Keychain card"
},
"removeKeychain": "Remove Keychain",
"@removeKeychain": {
"description": "Action on Catalyst Keychain card"
},
"walletConnected": "Wallet connected",
"@walletConnected": {
"description": "Describes that wallet is connected on Catalyst Keychain card"
},
"currentRoleRegistrations": "Current Role registrations",
"@currentRoleRegistrations": {
"description": "Describes roles on Catalyst Keychain card"
}
}

0 comments on commit 0e10899

Please sign in to comment.