updating uptime

This commit is contained in:
2026-06-24 10:48:59 +02:00
parent a79cfadf51
commit 9e55ec1097
3 changed files with 18 additions and 3 deletions

11
.vscode/launch.json vendored
View File

@@ -15,6 +15,17 @@
"--dart-define=BASE_URL=http://localhost:6950/api" "--dart-define=BASE_URL=http://localhost:6950/api"
] ]
}, },
{
"name": "qpay - live",
"request": "launch",
"type": "dart",
"deviceId": "chrome",
"args": [
"--dart-define=APP_ENV=live",
"--web-port=9005",
"--dart-define=BASE_URL=https://payapi.velocityafrica.net/api"
]
},
] ]
} }

View File

@@ -1,6 +1,7 @@
class UptimeItemModel { class UptimeItemModel {
final String id; final String id;
final String createdAt; final String createdAt;
final String updatedAt;
final bool deleted; final bool deleted;
final String name; final String name;
final bool status; final bool status;
@@ -8,6 +9,7 @@ class UptimeItemModel {
const UptimeItemModel({ const UptimeItemModel({
required this.id, required this.id,
required this.createdAt, required this.createdAt,
required this.updatedAt,
required this.deleted, required this.deleted,
required this.name, required this.name,
required this.status, required this.status,
@@ -17,6 +19,7 @@ class UptimeItemModel {
return UptimeItemModel( return UptimeItemModel(
id: json['id'] as String, id: json['id'] as String,
createdAt: json['createdAt'] as String, createdAt: json['createdAt'] as String,
updatedAt: json['updatedAt'],
deleted: json['deleted'] as bool, deleted: json['deleted'] as bool,
name: json['name'] as String, name: json['name'] as String,
status: json['status'] as bool, status: json['status'] as bool,
@@ -27,6 +30,7 @@ class UptimeItemModel {
return { return {
'id': id, 'id': id,
'createdAt': createdAt, 'createdAt': createdAt,
'updatedAt': updatedAt,
'deleted': deleted, 'deleted': deleted,
'name': name, 'name': name,
'status': status, 'status': status,

View File

@@ -328,7 +328,7 @@ class _UptimeCard extends StatelessWidget {
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
'Last checked ${_formatTimestamp(item.createdAt)}', 'Last checked ${_formatTimestamp(item.updatedAt)}',
style: theme.textTheme.bodySmall?.copyWith( style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurface.withAlpha(120), color: theme.colorScheme.onSurface.withAlpha(120),
), ),