mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
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:
co-authored by
Claude Opus 4.7
parent
29f836f281
commit
3a579f0321
@@ -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?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user