Redesign devices list as a sortable, responsive headered list

GET /api/devices accepts sort_by/sort_order (whitelisted columns; default
last_seen DESC, stable secondary sort on mac_address), device registration
captures an optional hostname, and the Flutter list switches between a
wide headered layout and a compact ListTile under 600px. Per-row overflow
menu retains View details / Register / Forget actions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-30 11:09:55 -04:00
co-authored by Claude Opus 4.7
parent 29f836f281
commit 3a579f0321
10 changed files with 939 additions and 285 deletions
+4 -1
View File
@@ -8,6 +8,7 @@ class Device {
final bool isRegistered;
final String owner;
final DeviceType deviceType;
final String? name;
Device({
required this.macAddress,
@@ -17,6 +18,7 @@ class Device {
required this.isRegistered,
required this.owner,
required this.deviceType,
this.name,
});
Device.fromJson(Map<String, dynamic> json)
@@ -26,5 +28,6 @@ class Device {
lastSeen = DateTime.parse(json['last_seen'] as String),
isRegistered = json['is_registered'] as bool,
owner = json['owner'] as String,
deviceType = DeviceType.fromString(json['device_type'] as String);
deviceType = DeviceType.fromString(json['device_type'] as String),
name = json['name'] as String?;
}