mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-08-03 22:43:00 +10:00
Merge branch 'main' into dev-roomserver
This commit is contained in:
@@ -17,6 +17,8 @@ import '../widgets/quick_switch_bar.dart';
|
|||||||
import 'channels_screen.dart';
|
import 'channels_screen.dart';
|
||||||
import 'chat_screen.dart';
|
import 'chat_screen.dart';
|
||||||
import 'contacts_screen.dart';
|
import 'contacts_screen.dart';
|
||||||
|
import '../widgets/repeater_login_dialog.dart';
|
||||||
|
import 'repeater_hub_screen.dart';
|
||||||
import 'settings_screen.dart';
|
import 'settings_screen.dart';
|
||||||
|
|
||||||
class MapScreen extends StatefulWidget {
|
class MapScreen extends StatefulWidget {
|
||||||
@@ -549,6 +551,27 @@ class _MapScreenState extends State<MapScreen> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showRepeaterLogin(BuildContext context, Contact repeater) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => RepeaterLoginDialog(
|
||||||
|
repeater: repeater,
|
||||||
|
onLogin: (password) {
|
||||||
|
// Navigate to repeater hub screen after successful login
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => RepeaterHubScreen(
|
||||||
|
repeater: repeater,
|
||||||
|
password: password,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void _showNodeInfo(BuildContext context, Contact contact) {
|
void _showNodeInfo(BuildContext context, Contact contact) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -593,6 +616,14 @@ class _MapScreenState extends State<MapScreen> {
|
|||||||
},
|
},
|
||||||
child: const Text('Open Chat'),
|
child: const Text('Open Chat'),
|
||||||
),
|
),
|
||||||
|
if (contact.type == advTypeRepeater)
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
_showRepeaterLogin(context, contact);
|
||||||
|
},
|
||||||
|
child: const Text('Manage Repeater'),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
|
|||||||
}) {
|
}) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(icon, color: Theme.of(context).primaryColor),
|
Icon(icon, color: Theme.of(context).textTheme.headlineSmall?.color),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.info_outline, color: Theme.of(context).primaryColor),
|
Icon(Icons.info_outline, color: Theme.of(context).textTheme.headlineSmall?.color),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'System Information',
|
'System Information',
|
||||||
@@ -446,7 +446,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.radio, color: Theme.of(context).primaryColor),
|
Icon(Icons.radio, color: Theme.of(context).textTheme.headlineSmall?.color),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'Radio Statistics',
|
'Radio Statistics',
|
||||||
@@ -475,7 +475,7 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.analytics, color: Theme.of(context).primaryColor),
|
Icon(Icons.analytics, color: Theme.of(context).textTheme.headlineSmall?.color),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
const Text(
|
const Text(
|
||||||
'Packet Statistics',
|
'Packet Statistics',
|
||||||
|
|||||||
Reference in New Issue
Block a user