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
27 changes: 6 additions & 21 deletions lib/features/connections/extension_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,41 +279,26 @@ class _ExtensionConnectionFormContentState
),
material.FocusTraversalGroup(
policy: material.WidgetOrderTraversalPolicy(),
child: material.Container(
padding: const material.EdgeInsets.symmetric(
horizontal: 24,
vertical: 16,
),
decoration: material.BoxDecoration(
border: material.Border(
top: material.BorderSide(
color: theme.border.withValues(alpha: 0.3),
),
),
),
child: material.Row(
children: [
QueryaButton.secondary(
child: QueryaDialogActions(
secondary: [
QueryaButton.secondary(
label: 'Test Connection',
icon: material.Icons.bolt_rounded,
loading: _testing,
size: QueryaControlSize.lg,
onPressed: _schema == null || _testing ? null : _testConnection,
),
const Spacer(),
QueryaButton.ghost(
],
cancel: QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
QueryaButton.primary(
primary: QueryaButton.primary(
label: 'Save',
onPressed: _schema == null ? null : _save,
size: QueryaControlSize.lg,
),
],
),
),
),
],
Expand Down
31 changes: 8 additions & 23 deletions lib/features/connections/sqlite_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -385,44 +385,29 @@ class _SqliteConnectionFormContentState
// Footer
material.FocusTraversalGroup(
policy: material.WidgetOrderTraversalPolicy(),
child: material.Container(
padding: const material.EdgeInsets.symmetric(
horizontal: 24, vertical: 16),
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) {
return material.Wrap(
spacing: 12,
runSpacing: 8,
alignment: material.WrapAlignment.spaceBetween,
children: [
QueryaButton.secondary(
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) => QueryaDialogActions(
secondary: [
QueryaButton.secondary(
label: 'Test Connection',
icon: material.Icons.link_rounded,
loading: _isTesting,
size: QueryaControlSize.lg,
onPressed: formValid && !_isTesting ? _testConnection : null,
),
material.Row(
mainAxisSize: material.MainAxisSize.min,
children: [
QueryaButton.ghost(
],
cancel: QueryaButton.ghost(
label: 'Cancel',
onPressed: () =>
material.Navigator.of(context).pop(),
size: QueryaControlSize.lg,
),
const Gap(12),
QueryaButton.primary(
primary: QueryaButton.primary(
label: 'Save',
onPressed: formValid ? _save : null,
size: QueryaControlSize.lg,
),
],
),
],
);
},
),
),
),
Expand Down
24 changes: 8 additions & 16 deletions lib/features/mongodb/mongodb_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -644,36 +644,28 @@ class _MongoConnectionFormContentState
),
material.FocusTraversalGroup(
policy: material.WidgetOrderTraversalPolicy(),
child: material.Container(
padding: const material.EdgeInsets.symmetric(
horizontal: 24, vertical: 16),
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) {
return material.Row(
children: [
QueryaButton.secondary(
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) => QueryaDialogActions(
secondary: [
QueryaButton.secondary(
label: 'Test Connection',
icon: material.Icons.link_rounded,
loading: _isTesting,
size: QueryaControlSize.lg,
onPressed: formValid && !_isTesting ? _testConnection : null,
),
const material.Spacer(),
QueryaButton.ghost(
],
cancel: QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
size: QueryaControlSize.lg,
),
const Gap(12),
QueryaButton.primary(
primary: QueryaButton.primary(
label: 'Save',
onPressed: formValid ? _save : null,
size: QueryaControlSize.lg,
),
],
);
},
),
),
),
Expand Down
31 changes: 8 additions & 23 deletions lib/features/mysql/mysql_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -549,44 +549,29 @@ class _MysqlConnectionFormContentState
),
material.FocusTraversalGroup(
policy: material.WidgetOrderTraversalPolicy(),
child: material.Container(
padding: const material.EdgeInsets.symmetric(
horizontal: 24, vertical: 16),
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) {
return material.Wrap(
spacing: 12,
runSpacing: 8,
alignment: material.WrapAlignment.spaceBetween,
children: [
QueryaButton.secondary(
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) => QueryaDialogActions(
secondary: [
QueryaButton.secondary(
label: 'Test Connection',
icon: material.Icons.link_rounded,
loading: _isTesting,
size: QueryaControlSize.lg,
onPressed: formValid && !_isTesting ? _testConnection : null,
),
material.Row(
mainAxisSize: material.MainAxisSize.min,
children: [
QueryaButton.ghost(
],
cancel: QueryaButton.ghost(
label: 'Cancel',
onPressed: () =>
material.Navigator.of(context).pop(),
size: QueryaControlSize.lg,
),
const Gap(12),
QueryaButton.primary(
primary: QueryaButton.primary(
label: 'Save',
onPressed: formValid ? _save : null,
size: QueryaControlSize.lg,
),
],
),
],
);
},
),
),
),
Expand Down
31 changes: 8 additions & 23 deletions lib/features/postgresql/postgresql_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -771,44 +771,29 @@ class _PostgresConnectionFormContentState
// Footer — Wrap avoids overflow on narrow viewports (e.g. in tests)
material.FocusTraversalGroup(
policy: material.WidgetOrderTraversalPolicy(),
child: material.Container(
padding: const material.EdgeInsets.symmetric(
horizontal: 24, vertical: 16),
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) {
return material.Wrap(
spacing: 12,
runSpacing: 8,
alignment: material.WrapAlignment.spaceBetween,
children: [
QueryaButton.secondary(
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) => QueryaDialogActions(
secondary: [
QueryaButton.secondary(
label: 'Test Connection',
icon: material.Icons.link_rounded,
loading: _isTesting,
size: QueryaControlSize.lg,
onPressed: formValid && !_isTesting ? _testConnection : null,
),
material.Row(
mainAxisSize: material.MainAxisSize.min,
children: [
QueryaButton.ghost(
],
cancel: QueryaButton.ghost(
label: 'Cancel',
onPressed: () =>
material.Navigator.of(context).pop(),
size: QueryaControlSize.lg,
),
const Gap(12),
QueryaButton.primary(
primary: QueryaButton.primary(
label: 'Save',
onPressed: formValid ? _save : null,
size: QueryaControlSize.lg,
),
],
),
],
);
},
),
),
),
Expand Down
24 changes: 8 additions & 16 deletions lib/features/redis/redis_connection_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -563,36 +563,28 @@ class _RedisConnectionFormContentState
),
material.FocusTraversalGroup(
policy: material.WidgetOrderTraversalPolicy(),
child: material.Container(
padding: const material.EdgeInsets.symmetric(
horizontal: 24, vertical: 16),
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) {
return material.Row(
children: [
QueryaButton.secondary(
child: ValueListenableBuilder<bool>(
valueListenable: _formValidNotifier.listenable,
builder: (context, formValid, _) => QueryaDialogActions(
secondary: [
QueryaButton.secondary(
label: 'Test Connection',
icon: material.Icons.link_rounded,
loading: _isTesting,
size: QueryaControlSize.lg,
onPressed: formValid && !_isTesting ? _testConnection : null,
),
const material.Spacer(),
QueryaButton.ghost(
],
cancel: QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
size: QueryaControlSize.lg,
),
const Gap(12),
QueryaButton.primary(
primary: QueryaButton.primary(
label: 'Save',
onPressed: formValid ? _save : null,
size: QueryaControlSize.lg,
),
],
);
},
),
),
),
Expand Down
Loading