Kapcsolat menü és a hozzá tartozó funkciók.
This commit is contained in:
@@ -6,7 +6,9 @@ import 'package:terepi_seged/pages/ntrip_settings/presentation/views/ntrip_setti
|
||||
import 'package:terepi_seged/routes/app_pages.dart';
|
||||
import 'package:terepi_seged/services/auth_service.dart';
|
||||
import 'package:terepi_seged/services/ntrip_service.dart';
|
||||
import 'package:terepi_seged/services/permission_service.dart';
|
||||
import 'package:terepi_seged/services/project_service.dart';
|
||||
import 'package:terepi_seged/services/ts_sync_service.dart';
|
||||
|
||||
import '../services/gnss/gnss_connection.dart';
|
||||
import '../services/gnss/gnss_device_service.dart';
|
||||
@@ -105,14 +107,36 @@ class AppDrawer extends StatelessWidget {
|
||||
// Get.to(() => const NtripSettingsView());
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.phone_outlined),
|
||||
title: const Text('Kapcsolatok'),
|
||||
onTap: () {
|
||||
Get.back();
|
||||
// Get.to(() => const NtripSettingsView());
|
||||
},
|
||||
),
|
||||
Obx(() {
|
||||
final signedIn = AuthService.to.isSignedIn;
|
||||
final allowed = !Get.isRegistered<PermissionService>() ||
|
||||
PermissionService.to.canContacts;
|
||||
if (!signedIn || !allowed) return const SizedBox.shrink();
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.phone_outlined),
|
||||
title: const Text('Kapcsolatok'),
|
||||
onTap: () {
|
||||
Get.back();
|
||||
Get.toNamed(Routes.CONTACTS);
|
||||
},
|
||||
);
|
||||
}),
|
||||
Obx(() => ListTile(
|
||||
leading: TsSyncService.to.isSyncing.value
|
||||
? const SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(strokeWidth: 2))
|
||||
: const Icon(Icons.sync),
|
||||
title: const Text('Szinkronizálás'),
|
||||
subtitle: Text(
|
||||
TsSyncService.to.pendingCount.value > 0
|
||||
? '${TsSyncService.to.pendingCount.value} elem feltöltésre vár'
|
||||
: 'Minden szinkronban',
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
onTap: TsSyncService.to.syncNow,
|
||||
)),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.data_exploration_outlined),
|
||||
title: const Text('Mérés'),
|
||||
|
||||
Reference in New Issue
Block a user