Merge upstream/dev (8 commits) [upstream-sync]
This commit is contained in:
commit
65097d053d
76 files changed
+2533
-1050
No files matched your search
@@ -1423,56 +1423,58 @@ class AppSettingsScreen extends StatelessWidget {
|
||||
) {
|
||||
showMeshSheet(
|
||||
context,
|
||||
builder: (ctx) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BottomSheetHeader(title: context.l10n.appSettings_mapTimeFilter),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 4, 16, 8),
|
||||
child: Text(context.l10n.appSettings_showNodesDiscoveredWithin),
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_allTime,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 0,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(0);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_lastHour,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 1,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(1);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_last6Hours,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 6,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(6);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_last24Hours,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 24,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(24);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_lastWeek,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 168,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(168);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
SizedBox(height: MediaQuery.paddingOf(ctx).bottom + 8),
|
||||
],
|
||||
builder: (ctx) => SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BottomSheetHeader(title: context.l10n.appSettings_mapTimeFilter),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 4, 16, 8),
|
||||
child: Text(context.l10n.appSettings_showNodesDiscoveredWithin),
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_allTime,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 0,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(0);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_lastHour,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 1,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(1);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_last6Hours,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 6,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(6);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_last24Hours,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 24,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(24);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_lastWeek,
|
||||
selected: settingsService.settings.mapTimeFilterHours == 168,
|
||||
onTap: () {
|
||||
settingsService.setMapTimeFilterHours(168);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
SizedBox(height: MediaQuery.paddingOf(ctx).bottom + 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1483,29 +1485,32 @@ class AppSettingsScreen extends StatelessWidget {
|
||||
) {
|
||||
showMeshSheet(
|
||||
context,
|
||||
builder: (ctx) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BottomSheetHeader(title: context.l10n.appSettings_unitsTitle),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_unitsMetric,
|
||||
selected: settingsService.settings.unitSystem == UnitSystem.metric,
|
||||
onTap: () {
|
||||
settingsService.setUnitSystem(UnitSystem.metric);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_unitsImperial,
|
||||
selected:
|
||||
settingsService.settings.unitSystem == UnitSystem.imperial,
|
||||
onTap: () {
|
||||
settingsService.setUnitSystem(UnitSystem.imperial);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
SizedBox(height: MediaQuery.paddingOf(ctx).bottom + 8),
|
||||
],
|
||||
builder: (ctx) => SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BottomSheetHeader(title: context.l10n.appSettings_unitsTitle),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_unitsMetric,
|
||||
selected:
|
||||
settingsService.settings.unitSystem == UnitSystem.metric,
|
||||
onTap: () {
|
||||
settingsService.setUnitSystem(UnitSystem.metric);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
MeshSheetOption(
|
||||
label: context.l10n.appSettings_unitsImperial,
|
||||
selected:
|
||||
settingsService.settings.unitSystem == UnitSystem.imperial,
|
||||
onTap: () {
|
||||
settingsService.setUnitSystem(UnitSystem.imperial);
|
||||
Navigator.pop(ctx);
|
||||
},
|
||||
),
|
||||
SizedBox(height: MediaQuery.paddingOf(ctx).bottom + 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1922,6 +1927,7 @@ class _MapApiKeyDialogState extends State<_MapApiKeyDialog> {
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return AlertDialog(
|
||||
scrollable: true,
|
||||
title: Text(l10n.appSettings_stadiaApiKey),
|
||||
content: SizedBox(
|
||||
width: 420,
|
||||
|
||||
Reference in new issue
Block a user