Compare commits
3 Commits
80c315866f
...
v0.2.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a6aee8a15 | |||
| 411e82807b | |||
| 2b4d2623fc |
@@ -19,6 +19,7 @@ jobs:
|
||||
- mileograph
|
||||
outputs:
|
||||
base_version: ${{ steps.meta.outputs.base }}
|
||||
release_tag: ${{ steps.meta.outputs.release_tag }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -29,6 +30,7 @@ jobs:
|
||||
RAW_VERSION=$(awk '/^version:/{print $2}' pubspec.yaml)
|
||||
BASE_VERSION=${RAW_VERSION%%+*}
|
||||
echo "base=${BASE_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=v${BASE_VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
android-build:
|
||||
runs-on:
|
||||
@@ -308,7 +310,7 @@ jobs:
|
||||
id: bundle
|
||||
run: |
|
||||
BASE="${{ needs.meta.outputs.base_version }}"
|
||||
TAG="v${BASE}"
|
||||
TAG="${{ needs.meta.outputs.release_tag }}"
|
||||
|
||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||
echo "apk=artifacts/mileograph-${BASE}.apk" >> "$GITHUB_OUTPUT"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -423,12 +423,12 @@ class _TractionPageState extends State<TractionPage> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Stack(
|
||||
children: [
|
||||
if (data.isTractionLoading && traction.isEmpty)
|
||||
const Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.0),
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 32.0),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
)
|
||||
else if (traction.isEmpty)
|
||||
Card(
|
||||
@@ -474,6 +474,17 @@ class _TractionPageState extends State<TractionPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
if (data.isTractionLoading)
|
||||
Positioned.fill(
|
||||
child: IgnorePointer(
|
||||
child: Container(
|
||||
color: Theme.of(context).colorScheme.surface.withOpacity(0.6),
|
||||
child: const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -97,10 +97,7 @@ class ApiService {
|
||||
return body;
|
||||
}
|
||||
|
||||
if (res.statusCode == 401 &&
|
||||
body is Map<String, dynamic> &&
|
||||
body['detail'] == 'Not authenticated' &&
|
||||
_onUnauthorized != null) {
|
||||
if (res.statusCode == 401 && _onUnauthorized != null) {
|
||||
await _onUnauthorized!();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
@@ -441,6 +442,30 @@ class DataService extends ChangeNotifier {
|
||||
return _locoClasses;
|
||||
}
|
||||
|
||||
Future<void> createLocoEvent({
|
||||
required int locoId,
|
||||
required String eventDate,
|
||||
required Map<String, dynamic> values,
|
||||
required String details,
|
||||
String eventType = 'other',
|
||||
}) async {
|
||||
try {
|
||||
await api.put(
|
||||
'/event/new',
|
||||
{
|
||||
'loco_id': locoId,
|
||||
'loco_event_type': eventType,
|
||||
'loco_event_date': eventDate,
|
||||
'loco_event_value': jsonEncode(values),
|
||||
'loco_event_details': details,
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('Failed to create loco event: $e');
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
void clear() {
|
||||
_homepageStats = null;
|
||||
_legs = [];
|
||||
|
||||
@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 0.1.6+1
|
||||
version: 0.2.0+1
|
||||
|
||||
environment:
|
||||
sdk: ^3.8.1
|
||||
|
||||
Reference in New Issue
Block a user