Merge origin/dev into feat/bookmarks-ux-improvements

This commit is contained in:
zjs81 committed 2026-11-23 23:30:35 -07:00
commit faa9bf3752
16 files changed
+408 -316

No files matched your search

+2 -4
View File
@@ -21,6 +21,7 @@ import '../widgets/app_bar.dart';
import '../widgets/mesh_ui.dart';
import '../widgets/path_map_scaffold.dart';
import '../widgets/quick_switch_bar.dart';
import '../widgets/sync_progress_overlay.dart';
import '../icons/los_icon.dart';
import '../theme/mesh_theme.dart';
@@ -440,10 +441,7 @@ class _LineOfSightMapScreenState extends State<LineOfSightMapScreen> {
left: 0,
right: 0,
top: 0,
child: LinearProgressIndicator(
color: LosPalette.selected,
backgroundColor: LosPalette.chartBackground,
),
child: const MeshProgressBar(),
),
],
),
+5 -6
View File
@@ -17,6 +17,7 @@ import '../widgets/mesh_nav_tile.dart';
import '../widgets/mesh_ui.dart';
import '../widgets/radio_disconnected_banner.dart';
import '../widgets/routing_sheet.dart';
import '../widgets/sync_progress_overlay.dart';
import '../utils/keys.dart';
import '../helpers/snack_bar_builder.dart';
@@ -889,12 +890,10 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
label: Text(l10n.common_save),
),
],
bottom: _loadingAll
? PreferredSize(
preferredSize: const Size.fromHeight(4),
child: LinearProgressIndicator(value: _loadAllProgress),
)
: null,
bottom: MeshProgressAppBarBottom(
active: _loadingAll,
value: _loadAllProgress,
),
),
body: MeshSettingsTileTheme(
child: SafeArea(
+27 -53
View File
@@ -7,6 +7,7 @@ import '../connector/meshcore_protocol.dart';
import '../l10n/l10n.dart';
import '../theme/mesh_theme.dart';
import '../helpers/snack_bar_builder.dart';
import '../widgets/confirm_clear_dialog.dart';
import '../widgets/mesh_nav_tile.dart';
import '../widgets/adaptive_app_bar_title.dart';
import '../widgets/mesh_ui.dart';
@@ -621,6 +622,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
MeshCoreConnector connector,
) {
final l10n = context.l10n;
final scheme = Theme.of(context).colorScheme;
final connected = connector.isConnected;
final offline = l10n.settings_requiresConnection;
return Column(
@@ -643,8 +645,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
icon: Icons.restart_alt,
title: l10n.settings_rebootDevice,
subtitle: connected ? l10n.settings_rebootDeviceSubtitle : offline,
titleColor: MeshPalette.warn,
iconColor: MeshPalette.warn,
titleColor: scheme.tertiary,
iconColor: scheme.tertiary,
onTap: connected ? () => _confirmReboot(context, connector) : null,
),
const Divider(height: 1, indent: 16),
@@ -652,8 +654,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
icon: Icons.delete_outline,
title: l10n.settings_deleteAllPaths,
subtitle: l10n.settings_deleteAllPathsSubtitle,
titleColor: MeshPalette.alert,
iconColor: MeshPalette.alert,
titleColor: scheme.error,
iconColor: scheme.error,
onTap: () => _confirmDeleteAllPaths(context, connector),
),
],
@@ -717,62 +719,34 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
}
void _confirmDeleteAllPaths(
Future<void> _confirmDeleteAllPaths(
BuildContext context,
MeshCoreConnector connector,
) {
) async {
final l10n = context.l10n;
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(l10n.settings_deleteAllPaths),
content: Text(l10n.settings_deleteAllPathsSubtitle),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(l10n.common_cancel),
),
TextButton(
onPressed: () {
Navigator.pop(context);
connector.deleteAllPaths();
},
child: Text(
l10n.common_deleteAll,
style: TextStyle(color: Theme.of(context).colorScheme.error),
),
),
],
),
final confirmed = await showConfirmClearDialog(
context,
title: l10n.settings_deleteAllPaths,
message: l10n.settings_deleteAllPathsSubtitle,
confirmLabel: l10n.common_deleteAll,
);
if (confirmed) connector.deleteAllPaths();
}
void _confirmReboot(BuildContext context, MeshCoreConnector connector) {
Future<void> _confirmReboot(
BuildContext context,
MeshCoreConnector connector,
) async {
final l10n = context.l10n;
final screenContext = context;
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(l10n.settings_rebootDevice),
content: Text(l10n.settings_rebootDeviceConfirm),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(l10n.common_cancel),
),
TextButton(
onPressed: () {
Navigator.pop(context);
if (!_ensureConnected(screenContext, connector)) return;
connector.rebootDevice();
},
child: Text(
l10n.common_reboot,
style: TextStyle(color: Theme.of(context).colorScheme.tertiary),
),
),
],
),
final confirmed = await showConfirmClearDialog(
context,
title: l10n.settings_rebootDevice,
message: l10n.settings_rebootDeviceConfirm,
confirmLabel: l10n.common_reboot,
warning: true,
);
if (!confirmed || !context.mounted) return;
if (!_ensureConnected(context, connector)) return;
connector.rebootDevice();
}
}