Add device detail screen and navigate to it from notifications and devices

- New /devices/:macAddress route showing all device fields with Register/Forget actions
- Device list items are now tappable; popup menu gains a "View details" item
- Notification list items with a linked device are tappable; popup menu gains a "View device" item
- Backend: new DB migration adds optional mac_address column to notifications
- Device-related notifications (NewDeviceFound, DeviceOnlineAfterTime, DeviceChanged) now store the triggering device's MAC address

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-27 18:24:35 -04:00
co-authored by Claude Sonnet 4.6
parent 07f7d54531
commit 2da339a2b0
10 changed files with 472 additions and 15 deletions
+11
View File
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:frontend/settings/settings.dart';
import 'package:go_router/go_router.dart';
import 'devices/device_detail.dart';
import 'devices/device_list.dart';
import 'notifications/notification_list.dart';
import 'utils/pref_utils.dart';
@@ -26,6 +27,16 @@ final GoRouter router = GoRouter(
name: 'devices',
builder: (context, state) => const DeviceList(),
redirect: (context, state) => _redirectToSettings(),
routes: [
GoRoute(
path: ':macAddress',
name: 'deviceDetail',
builder: (context, state) {
final mac = state.pathParameters['macAddress']!;
return DeviceDetail(macAddress: mac);
},
),
],
),
GoRoute(
path: '/settings',