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
73 changes: 43 additions & 30 deletions lib/features/key_manager/key_management_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -504,21 +504,26 @@ class _KeyManagementScreenState extends ConsumerState<KeyManagementScreen> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(vertical: 16),
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
const Icon(
LucideIcons.userPlus,
size: 20,
),
const SizedBox(width: 8),
Text(
S.of(context)!.generateNewUser,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
Flexible(
child: Text(
S.of(context)!.generateNewUser,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
overflow: TextOverflow.visible,
softWrap: true,
),
),
],
Expand Down Expand Up @@ -634,34 +639,42 @@ class _KeyManagementScreenState extends ConsumerState<KeyManagementScreen> {
),
),
actions: [
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(),
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
Flexible(
child: TextButton(
onPressed: () => Navigator.of(dialogContext).pop(),
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
),
ElevatedButton(
onPressed: () {
Navigator.of(dialogContext).pop();
_generateNewMasterKey();
},
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
const SizedBox(width: 8),
Flexible(
child: ElevatedButton(
onPressed: () {
Navigator.of(dialogContext).pop();
_generateNewMasterKey();
},
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
),
),
child: Text(
S.of(context)!.continueButton,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
child: Text(
S.of(context)!.continueButton,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
),
Expand Down
136 changes: 76 additions & 60 deletions lib/features/relays/widgets/relay_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,40 +101,48 @@ class RelaySelector extends ConsumerWidget {
),
),
actions: [
TextButton(
onPressed: () {
Navigator.pop(dialogContext);
},
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
Flexible(
child: TextButton(
onPressed: () {
Navigator.pop(dialogContext);
},
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
),
ElevatedButton(
onPressed: () {
final url = controller.text.trim();
if (url.isNotEmpty) {
final newRelay = Relay(url: url, isHealthy: true);
ref.read(relaysProvider.notifier).addRelay(newRelay);
Navigator.pop(dialogContext);
}
},
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
const SizedBox(width: 8),
Flexible(
child: ElevatedButton(
onPressed: () {
final url = controller.text.trim();
if (url.isNotEmpty) {
final newRelay = Relay(url: url, isHealthy: true);
ref.read(relaysProvider.notifier).addRelay(newRelay);
Navigator.pop(dialogContext);
}
},
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
),
),
child: Text(
S.of(context)!.add,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
child: Text(
S.of(context)!.add,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
),
Expand Down Expand Up @@ -181,40 +189,48 @@ class RelaySelector extends ConsumerWidget {
),
),
actions: [
TextButton(
onPressed: () => Navigator.pop(dialogContext),
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
Flexible(
child: TextButton(
onPressed: () => Navigator.pop(dialogContext),
child: Text(
S.of(context)!.cancel,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
),
ElevatedButton(
onPressed: () {
final newUrl = controller.text.trim();
if (newUrl.isNotEmpty && newUrl != relay.url) {
final updatedRelay = relay.copyWith(url: newUrl);
ref
.read(relaysProvider.notifier)
.updateRelay(relay, updatedRelay);
}
Navigator.pop(dialogContext);
},
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
const SizedBox(width: 8),
Flexible(
child: ElevatedButton(
onPressed: () {
final newUrl = controller.text.trim();
if (newUrl.isNotEmpty && newUrl != relay.url) {
final updatedRelay = relay.copyWith(url: newUrl);
ref
.read(relaysProvider.notifier)
.updateRelay(relay, updatedRelay);
}
Navigator.pop(dialogContext);
},
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
),
),
child: Text(
S.of(context)!.save,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
child: Text(
S.of(context)!.save,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
textAlign: TextAlign.center,
),
),
),
Expand Down
50 changes: 29 additions & 21 deletions lib/features/trades/screens/trade_detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -594,31 +594,39 @@ class TradeDetailScreen extends ConsumerWidget {
),
),
actions: [
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(false),
child: Text(
S.of(context)!.no,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
Flexible(
child: TextButton(
onPressed: () => Navigator.of(dialogContext).pop(false),
child: Text(
S.of(context)!.no,
style: const TextStyle(
color: AppTheme.textSecondary,
fontSize: 16,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
),
),
),
ElevatedButton(
onPressed: () => Navigator.of(dialogContext).pop(true),
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
const SizedBox(width: 8),
Flexible(
child: ElevatedButton(
onPressed: () => Navigator.of(dialogContext).pop(true),
style: ElevatedButton.styleFrom(
backgroundColor: AppTheme.activeColor,
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
),
),
child: Text(
S.of(context)!.yes,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
child: Text(
S.of(context)!.yes,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
textAlign: TextAlign.center,
),
),
),
Expand Down