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
6 changes: 4 additions & 2 deletions lib/core/sdui/sdui_form_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart' as material;
import 'package:file_selector/file_selector.dart';
import 'package:querya_desktop/core/sdui/sdui_form_schema.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Renders a connection / settings form from an SDUI JSON schema (Block A).
///
Expand Down Expand Up @@ -275,9 +276,10 @@ class SduiFormBuilderState extends material.State<SduiFormBuilder> {
),
),
const Gap(8),
OutlineButton(
QueryaButton.secondary(
label: 'Browse',
onPressed: () => _pickFile(field),
child: const Text('Browse'),
size: QueryaControlSize.md,
),
],
),
Expand Down
11 changes: 7 additions & 4 deletions lib/core/unsaved_work_guard.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart' as material;
import 'package:querya_desktop/core/unsaved_work_registry.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Confirms before Home / Close / tree navigation discards SQL, staged grid
/// edits, or a dirty document editor. Returns true when it is safe to tear
Expand Down Expand Up @@ -40,13 +41,15 @@ Future<bool?> showDiscardUnsavedWorkDialog(material.BuildContext context) {
spacing: 8,
runSpacing: 8,
children: [
OutlineButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(ctx).pop(false),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
DestructiveButton(
QueryaButton.destructive(
label: 'Discard',
onPressed: () => material.Navigator.of(ctx).pop(true),
child: const Text('Discard'),
size: QueryaControlSize.lg,
),
],
),
Expand Down
6 changes: 4 additions & 2 deletions lib/features/connections/driver_manager_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:querya_desktop/features/connections/connection_type_choice.dart'
import 'package:querya_desktop/features/connections/driver_icon.dart';
import 'package:querya_desktop/features/connections/new_connection_dialog.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// One row in the driver list.
typedef _DriverInfo = ({
Expand Down Expand Up @@ -138,9 +139,10 @@ class _DriverManagerDialogContent extends material.StatelessWidget {
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
PrimaryButton(
QueryaButton.primary(
label: 'Close',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Close'),
size: QueryaControlSize.lg,
),
],
),
Expand Down
11 changes: 7 additions & 4 deletions lib/features/connections/new_connection_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/core/motion/querya_hover_surface.dart';
import 'package:querya_desktop/features/connections/driver_icon.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

export 'package:querya_desktop/core/database/connection_type.dart';
export 'package:querya_desktop/core/database/connection_type_choice.dart';
Expand Down Expand Up @@ -237,16 +238,18 @@ class _NewConnectionDialogContentState
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
PrimaryButton(
QueryaButton.primary(
label: 'Next',
onPressed: _selected == null
? null
: () => material.Navigator.of(context).pop(_selected),
child: const Text('Next'),
size: QueryaControlSize.lg,
),
],
),
Expand Down
11 changes: 7 additions & 4 deletions lib/features/connections/new_connection_url_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/core/storage/local_db.dart';
import 'package:querya_desktop/features/connections/connection_url_parser.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Shows a dialog to create a new database connection from a URI.
/// Returns the ConnectionRow or null if cancelled.
Expand Down Expand Up @@ -208,14 +209,16 @@ class _NewConnectionUrlDialogContentState
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
PrimaryButton(
QueryaButton.primary(
label: 'Create',
onPressed: _validateAndSubmit,
child: const Text('Create'),
size: QueryaControlSize.lg,
),
],
),
Expand Down
11 changes: 7 additions & 4 deletions lib/features/connections/new_folder_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart' as material;
import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Shows a dialog to create a new folder (same style as new connection).
/// Returns the folder name or null if cancelled.
Expand Down Expand Up @@ -100,18 +101,20 @@ class _NewFolderDialogContentState
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
ListenableBuilder(
listenable: _nameController,
builder: (context, __) => PrimaryButton(
builder: (context, __) => QueryaButton.primary(
label: 'Create',
onPressed: _name.isEmpty
? null
: () => material.Navigator.of(context).pop(_name),
child: const Text('Create'),
size: QueryaControlSize.lg,
),
),
],
Expand Down
36 changes: 14 additions & 22 deletions lib/features/connections/ssh_tunnel_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,14 @@ class _SshTunnelSectionState extends material.State<SshTunnelSection> {
placeholder: const Text('••••••••'),
features: [
InputFeature.trailing(
IconButton.ghost(
size: ButtonSize.small,
icon: material.Icon(
_obscurePassword
? material.Icons.visibility_off_outlined
: material.Icons.visibility_outlined,
size: 16,
),
QueryaButton.icon(
icon: _obscurePassword
? material.Icons.visibility_off_outlined
: material.Icons.visibility_outlined,
tooltip: _obscurePassword ? 'Show password' : 'Hide password',
size: QueryaControlSize.sm,
onPressed: () {
setState(
() => _obscurePassword = !_obscurePassword,
);
setState(() => _obscurePassword = !_obscurePassword);
},
),
),
Expand Down Expand Up @@ -404,18 +400,14 @@ class _SshTunnelSectionState extends material.State<SshTunnelSection> {
placeholder: const Text('Passphrase if key is encrypted'),
features: [
InputFeature.trailing(
IconButton.ghost(
size: ButtonSize.small,
icon: material.Icon(
_obscurePassphrase
? material.Icons.visibility_off_outlined
: material.Icons.visibility_outlined,
size: 16,
),
QueryaButton.icon(
icon: _obscurePassphrase
? material.Icons.visibility_off_outlined
: material.Icons.visibility_outlined,
tooltip: _obscurePassphrase ? 'Show passphrase' : 'Hide passphrase',
size: QueryaControlSize.sm,
onPressed: () {
setState(
() => _obscurePassphrase = !_obscurePassphrase,
);
setState(() => _obscurePassphrase = !_obscurePassphrase);
},
),
),
Expand Down
11 changes: 7 additions & 4 deletions lib/features/erd/erd_group_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart' as material;
import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Name and note of a diagram group (#1282), as the user typed them.
typedef ErdGroupText = ({String name, String? note});
Expand Down Expand Up @@ -116,17 +117,19 @@ class _ErdGroupDialogState extends material.State<_ErdGroupDialog> {
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
ListenableBuilder(
listenable: _name,
builder: (context, _) => PrimaryButton(
builder: (context, _) => QueryaButton.primary(
key: const material.ValueKey('erd_group_submit'),
label: widget.action,
onPressed: _name.text.trim().isEmpty ? null : _submit,
child: Text(widget.action),
size: QueryaControlSize.lg,
),
),
],
Expand Down
11 changes: 7 additions & 4 deletions lib/features/erd/erd_note_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart' as material;
import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Asks for the text of a sticky note (#1283); null when cancelled.
Future<String?> showErdNoteDialog(
Expand Down Expand Up @@ -92,20 +93,22 @@ class _ErdNoteDialogState extends material.State<_ErdNoteDialog> {
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
ListenableBuilder(
listenable: _text,
builder: (context, _) => PrimaryButton(
builder: (context, _) => QueryaButton.primary(
key: const material.ValueKey('erd_note_submit'),
label: widget.action,
onPressed: _text.text.trim().isEmpty
? null
: () => material.Navigator.of(context)
.pop(_text.text.trim()),
child: Text(widget.action),
size: QueryaControlSize.lg,
),
),
],
Expand Down
11 changes: 7 additions & 4 deletions lib/features/erd/erd_view_name_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart' as material;
import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Asks for the name of a saved diagram view (#1284); null when cancelled.
Future<String?> showErdViewNameDialog(
Expand Down Expand Up @@ -98,17 +99,19 @@ class _ErdViewNameDialogState extends material.State<_ErdViewNameDialog> {
child: material.Row(
mainAxisAlignment: material.MainAxisAlignment.end,
children: [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 12),
ListenableBuilder(
listenable: _name,
builder: (context, _) => PrimaryButton(
builder: (context, _) => QueryaButton.primary(
key: const material.ValueKey('erd_view_submit'),
label: widget.action,
onPressed: _name.text.trim().isEmpty ? null : _submit,
child: Text(widget.action),
size: QueryaControlSize.lg,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:querya_desktop/core/storage/local_db.dart';
import 'package:querya_desktop/core/ui/querya_icons.dart';
import 'package:querya_desktop/features/connections/driver_icon.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Prompts the user to pick which of several equally-live connections an
/// ambiguous extension command should target (#892), instead of silently
Expand Down Expand Up @@ -101,9 +102,10 @@ class _ExtensionConnectionPickerDialog extends material.StatelessWidget {
const Gap(12),
material.Align(
alignment: material.Alignment.centerRight,
child: OutlineButton(
child: QueryaButton.ghost(
label: 'Cancel',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
),
],
Expand Down
Loading
Loading