Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions lib/features/key_manager/key_management_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,13 @@ class _KeyManagementScreenState extends ConsumerState<KeyManagementScreen> {
S.of(context)!.secretWordsInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down Expand Up @@ -320,10 +323,13 @@ class _KeyManagementScreenState extends ConsumerState<KeyManagementScreen> {
S.of(context)!.privacyInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down Expand Up @@ -430,10 +436,13 @@ class _KeyManagementScreenState extends ConsumerState<KeyManagementScreen> {
S.of(context)!.currentTradeIndexInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down
113 changes: 57 additions & 56 deletions lib/features/order/widgets/form_section.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:mostro_mobile/core/app_theme.dart';
import 'package:mostro_mobile/generated/l10n.dart';

class FormSection extends StatelessWidget {
final String title;
Expand All @@ -8,6 +9,7 @@ class FormSection extends StatelessWidget {
final Widget child;
final Widget? extraContent;
final String? infoTooltip;
final String? infoTitle;

const FormSection({
super.key,
Expand All @@ -17,6 +19,7 @@ class FormSection extends StatelessWidget {
required this.child,
this.extraContent,
this.infoTooltip,
this.infoTitle,
});

@override
Expand Down Expand Up @@ -46,62 +49,16 @@ class FormSection extends StatelessWidget {
),
if (infoTooltip != null) ...[
const SizedBox(width: 4),
GestureDetector(
onTap: () {
showDialog(
context: context,
builder: (context) => Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
backgroundColor: const Color(0xFF1E2230),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8.0, vertical: 12.0),
child: Text(
infoTooltip!,
style: const TextStyle(
color: Colors.white,
fontSize: 16,
height: 1.4),
textAlign: TextAlign.center,
),
),
const SizedBox(height: 16),
SizedBox(
width: double.infinity,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF8CC63F),
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(
vertical: 12),
),
onPressed: () =>
Navigator.of(context).pop(),
child: const Text('OK',
style: TextStyle(
fontWeight: FontWeight.bold)),
),
),
],
),
),
),
);
},
child: Icon(
Icons.info_outline,
size: 14,
color: AppTheme.textSubtle,
InkWell(
onTap: () => _showInfoDialog(context, infoTitle ?? title, infoTooltip!),
borderRadius: BorderRadius.circular(12),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 14,
color: AppTheme.textSubtle,
),
),
),
],
Expand Down Expand Up @@ -136,4 +93,48 @@ class FormSection extends StatelessWidget {
),
);
}

void _showInfoDialog(BuildContext context, String title, String content) {
showDialog(
context: context,
builder: (BuildContext dialogContext) {
return AlertDialog(
backgroundColor: AppTheme.backgroundCard,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: Colors.white.withValues(alpha: 0.1)),
),
title: Text(
title,
style: const TextStyle(
color: AppTheme.textPrimary,
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
content: Text(
content,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 14,
height: 1.5,
),
),
actions: [
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(),
child: Text(
S.of(context)!.ok,
style: const TextStyle(
color: AppTheme.activeColor,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
],
);
},
);
}
}
29 changes: 24 additions & 5 deletions lib/features/order/widgets/payment_methods_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:mostro_mobile/features/order/providers/payment_methods_provider.
import 'package:mostro_mobile/features/order/widgets/form_section.dart';
import 'package:mostro_mobile/shared/providers/exchange_service_provider.dart';
import 'package:mostro_mobile/generated/l10n.dart';
import 'package:mostro_mobile/core/app_theme.dart';

class PaymentMethodsSection extends ConsumerWidget {
final List<String> selectedMethods;
Expand Down Expand Up @@ -183,17 +184,35 @@ class PaymentMethodsSection extends ConsumerWidget {
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(S.of(context)!.cancel,
style: const TextStyle(color: Colors.white70)),
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
TextButton(
ElevatedButton(
onPressed: () {
onMethodsChanged(
dialogSelectedMethods, dialogShowOtherField);
Navigator.of(context).pop();
},
child: Text(S.of(context)!.confirm,
style: const TextStyle(color: Color(0xFF8CC63F))),
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: Text(
S.of(context)!.confirm,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
),
],
);
Expand Down
1 change: 1 addition & 0 deletions lib/features/order/widgets/premium_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class PremiumSection extends StatelessWidget {
icon: premiumValueIcon,
iconBackgroundColor: AppTheme.purpleAccent, // Purple color for premium
infoTooltip: S.of(context)!.premiumTooltip,
infoTitle: S.of(context)!.premiumTitle,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down
1 change: 1 addition & 0 deletions lib/features/order/widgets/price_type_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class PriceTypeSection extends StatelessWidget {
iconBackgroundColor: AppTheme.purpleAccent.withValues(
alpha: 0.3), // Purple color consistent with other sections
infoTooltip: S.of(context)!.priceTypeTooltip,
infoTitle: S.of(context)!.priceType,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expand Down
22 changes: 14 additions & 8 deletions lib/features/settings/about_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,13 @@ class AboutScreen extends ConsumerWidget {
InkWell(
onTap: () => _showInfoDialog(context, label, explanation),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 16,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 16,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down Expand Up @@ -561,10 +564,13 @@ class AboutScreen extends ConsumerWidget {
InkWell(
onTap: () => _showInfoDialog(context, label, explanation),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 16,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 16,
color: AppTheme.textSecondary,
),
),
),
const SizedBox(width: 6),
Expand Down
44 changes: 28 additions & 16 deletions lib/features/settings/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ class SettingsScreen extends ConsumerWidget {
S.of(context)!.languageInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down Expand Up @@ -167,10 +170,13 @@ class SettingsScreen extends ConsumerWidget {
S.of(context)!.currencyInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down Expand Up @@ -227,10 +233,13 @@ class SettingsScreen extends ConsumerWidget {
S.of(context)!.relaysInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down Expand Up @@ -314,10 +323,13 @@ class SettingsScreen extends ConsumerWidget {
S.of(context)!.mostroInfoText,
),
borderRadius: BorderRadius.circular(12),
child: const Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.info_outline,
size: 20,
color: AppTheme.textSecondary,
),
),
),
],
Expand Down
4 changes: 2 additions & 2 deletions lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
"priceType": "Price type",
"fixedPrice": "Fixed price",
"market": "Market",
"priceTypeTooltip": "• Select Market Price if you want to use the price that Bitcoin has when someone takes your offer.\\n• Select Fixed Price if you want to define the exact amount of Bitcoin you will exchange.",
"priceTypeTooltip": "• Select Market Price if you want to use the price that Bitcoin has when someone takes your offer.\n\n• Select Fixed Price if you want to define the exact amount of Bitcoin you will exchange.",

"@_comment_take_order_screen": "Take Order Screen Strings",
"orderDetails": "ORDER DETAILS",
Expand Down Expand Up @@ -633,7 +633,7 @@
"@_comment_settings_info_dialogs": "Settings Info Dialog Text",
"languageInfoText": "Choose your preferred language for the application interface.",
"currencyInfoText": "Choose the default currency for your orders.",
"relaysInfoText": "• Relays are servers that help distribute your messages across the Nostr network\n\n• Adding more relays can improve connectivity and redundancy\n\n• Relays don't sync with each other, so only those you're connected to will receive your messages.",
"relaysInfoText": "• Relays are servers that help distribute your messages across the Nostr network.\n\n• Adding more relays can improve connectivity and redundancy.\n\n• Relays don't sync with each other, so only those you're connected to will receive your messages.",
"mostroInfoText": "• The Mostro you select will be the one where you post your offers.\n\n• In case of a dispute, a human assigned to that Mostro will be the one to resolve it.",

"@_comment_account_info_dialogs": "Account Screen Info Dialog Text",
Expand Down
Loading