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
51 changes: 23 additions & 28 deletions lib/features/onboarding/welcome_tour_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:querya_desktop/core/layout/window_layout.dart';
import 'package:querya_desktop/core/storage/app_settings.dart';
import 'package:querya_desktop/core/theme/querya_workbench_theme.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

/// Shows or toggles the interactive Welcome Tour dialog.
Future<void> showWelcomeTourDialog(
Expand Down Expand Up @@ -261,15 +262,12 @@ class _WelcomeTourDialogState extends State<WelcomeTourDialog> {
),
),
if (widget.onGoHome != null) ...[
GhostButton(
QueryaButton.ghost(
key: const Key('welcome_tour_home_button'),
density: ButtonDensity.compact,
label: 'Home',
icon: material.Icons.home_rounded,
onPressed: _goHomeAndClose,
leading: const material.Icon(
material.Icons.home_rounded,
size: 16,
),
child: const Text('Home'),
size: QueryaControlSize.sm,
),
const material.SizedBox(width: 4),
],
Expand Down Expand Up @@ -348,27 +346,28 @@ class _WelcomeTourDialogState extends State<WelcomeTourDialog> {

// Action buttons
if (_currentStep > 0)
OutlineButton(
QueryaButton.secondary(
key: const Key('welcome_tour_prev_button'),
label: 'Back',
onPressed: _previous,
child: const Text('Back'),
size: QueryaControlSize.lg,
)
else
GhostButton(
QueryaButton.ghost(
key: const Key('welcome_tour_skip_button'),
label: 'Skip',
onPressed: _finish,
child: const Text('Skip'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 8),

PrimaryButton(
QueryaButton.primary(
key: const Key('welcome_tour_next_button'),
onPressed: _next,
child: Text(
_currentStep == _totalSteps - 1
label: _currentStep == _totalSteps - 1
? 'Get Started'
: 'Next',
),
onPressed: _next,
size: QueryaControlSize.lg,
),
],
),
Expand Down Expand Up @@ -695,28 +694,24 @@ class _HotkeysMatrixSlideView extends StatelessWidget {
children: [
if (onLaunchDemo != null)
material.Expanded(
child: OutlineButton(
child: QueryaButton.secondary(
key: const Key('welcome_tour_demo_button'),
label: 'Try Demo Playground',
icon: material.Icons.play_arrow_rounded,
onPressed: onLaunchDemo,
leading: const material.Icon(
material.Icons.play_arrow_rounded,
size: 18,
),
child: const Text('Try Demo Playground'),
size: QueryaControlSize.lg,
),
),
if (onLaunchDemo != null && onGoHome != null)
const material.SizedBox(width: 8),
if (onGoHome != null)
material.Expanded(
child: GhostButton(
child: QueryaButton.ghost(
key: const Key('welcome_tour_slide_home_button'),
label: 'Start Screen',
icon: material.Icons.home_rounded,
onPressed: onGoHome,
leading: const material.Icon(
material.Icons.home_rounded,
size: 16,
),
child: const Text('Start Screen'),
size: QueryaControlSize.lg,
),
),
],
Expand Down
61 changes: 37 additions & 24 deletions lib/features/updater/update_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:querya_desktop/core/updater/update_manifest.dart';
import 'package:querya_desktop/features/updater/update_changelog_view.dart';
import 'package:querya_desktop/features/updater/update_controller.dart';
import 'package:querya_desktop/shared/widgets/widgets.dart';
import 'package:querya_desktop/core/ui/querya_control_tokens.dart';

enum UpdateDialogPhase {
checking,
Expand Down Expand Up @@ -64,13 +65,15 @@ Future<bool?> showUnsavedUpdateRestartDialog(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: 'Restart anyway',
onPressed: () => material.Navigator.of(ctx).pop(true),
child: const Text('Restart anyway'),
size: QueryaControlSize.lg,
),
],
),
Expand Down Expand Up @@ -526,62 +529,72 @@ class UpdateDialogContentState extends material.State<UpdateDialogContent> {
children: [
...switch (_phase) {
UpdateDialogPhase.checking => [
GhostButton(
QueryaButton.ghost(
label: 'Close',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Close'),
size: QueryaControlSize.lg,
),
],
UpdateDialogPhase.upToDate => [
PrimaryButton(
QueryaButton.primary(
label: 'Close',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Close'),
size: QueryaControlSize.lg,
),
],
UpdateDialogPhase.available => [
GhostButton(
QueryaButton.ghost(
label: 'Remind me later',
onPressed: () => unawaited(_remindLater()),
child: const Text('Remind me later'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 8),
if (_installBlocked)
PrimaryButton(
QueryaButton.primary(
label: 'Copy update command',
onPressed: () => unawaited(_copyPackageCommand()),
child: const Text('Copy update command'),
size: QueryaControlSize.lg,
)
else
PrimaryButton(
QueryaButton.primary(
label: 'Download',
onPressed: () => unawaited(_startDownload()),
child: const Text('Download'),
size: QueryaControlSize.lg,
),
],
UpdateDialogPhase.downloading => [
GhostButton(
QueryaButton.ghost(
label: 'Cancel',
onPressed: () {
setState(() => _downloadCancelled = true);
},
child: const Text('Cancel'),
size: QueryaControlSize.lg,
),
],
UpdateDialogPhase.readyToInstall => [
GhostButton(
QueryaButton.ghost(
label: 'Close',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Close'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 8),
PrimaryButton(
QueryaButton.primary(
label: 'Restart & Update Now',
onPressed: () => unawaited(_install()),
child: const Text('Restart & Update Now'),
size: QueryaControlSize.lg,
),
],
UpdateDialogPhase.error => [
GhostButton(
QueryaButton.ghost(
label: 'Close',
onPressed: () => material.Navigator.of(context).pop(),
child: const Text('Close'),
size: QueryaControlSize.lg,
),
const material.SizedBox(width: 8),
PrimaryButton(
QueryaButton.primary(
label: 'Retry',
onPressed: () => unawaited(_runCheck()),
child: const Text('Retry'),
size: QueryaControlSize.lg,
),
],
},
Expand Down
Loading