update to v3 upload action
Some checks failed
Release / meta (push) Successful in 3s
Release / linux-build (push) Successful in 1m35s
Release / android-build (push) Successful in 4m50s
Release / windows-build (push) Has been cancelled
Release / release-dev (push) Has been cancelled
Release / release-master (push) Has been cancelled

This commit is contained in:
2025-12-11 01:52:48 +00:00
parent 40fb88a089
commit c8d962b770
4 changed files with 63 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ jobs:
cp build/app/outputs/flutter-apk/app-release.apk app-release.apk cp build/app/outputs/flutter-apk/app-release.apk app-release.apk
- name: Upload Android APK artifact - name: Upload Android APK artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: android-apk name: android-apk
path: app-release.apk path: app-release.apk
@@ -128,7 +128,7 @@ jobs:
tar -C build/linux/x64/release/bundle -czf app-linux-x64.tar.gz . tar -C build/linux/x64/release/bundle -czf app-linux-x64.tar.gz .
- name: Upload Linux artifact - name: Upload Linux artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: linux-bundle name: linux-bundle
path: app-linux-x64.tar.gz path: app-linux-x64.tar.gz
@@ -168,7 +168,7 @@ jobs:
- name: Upload Windows artifact - name: Upload Windows artifact
if: env.BUILD_WINDOWS == 'true' if: env.BUILD_WINDOWS == 'true'
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: windows-zip name: windows-zip
path: app-windows-x64.zip path: app-windows-x64.zip
@@ -245,19 +245,19 @@ jobs:
- windows-build - windows-build
steps: steps:
- name: Download Android APK - name: Download Android APK
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: android-apk name: android-apk
path: artifacts path: artifacts
- name: Download Linux bundle - name: Download Linux bundle
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: linux-bundle name: linux-bundle
path: artifacts path: artifacts
- name: Download Windows bundle (optional) - name: Download Windows bundle (optional)
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: windows-zip name: windows-zip
path: artifacts path: artifacts

View File

@@ -509,6 +509,7 @@ class _NewEntryPageState extends State<NewEntryPage> {
return ReorderableListView.builder( return ReorderableListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
buildDefaultDragHandles: false,
onReorder: (oldIndex, newIndex) { onReorder: (oldIndex, newIndex) {
if (newIndex > oldIndex) newIndex -= 1; if (newIndex > oldIndex) newIndex -= 1;
setState(() { setState(() {

View File

@@ -210,7 +210,9 @@ class _TractionPageState extends State<TractionPage> {
children: [ children: [
SizedBox( SizedBox(
width: isMobile ? double.infinity : 240, width: isMobile ? double.infinity : 240,
child: Autocomplete<String>( child: RawAutocomplete<String>(
textEditingController: _classController,
focusNode: _classFocusNode,
optionsBuilder: (TextEditingValue textEditingValue) { optionsBuilder: (TextEditingValue textEditingValue) {
final query = textEditingValue.text.toLowerCase(); final query = textEditingValue.text.toLowerCase();
if (query.isEmpty) { if (query.isEmpty) {
@@ -220,8 +222,6 @@ class _TractionPageState extends State<TractionPage> {
(c) => c.toLowerCase().contains(query), (c) => c.toLowerCase().contains(query),
); );
}, },
textEditingController: _classController,
focusNode: _classFocusNode,
fieldViewBuilder: fieldViewBuilder:
( (
context, context,
@@ -239,6 +239,40 @@ class _TractionPageState extends State<TractionPage> {
onSubmitted: (_) => _refreshTraction(), onSubmitted: (_) => _refreshTraction(),
); );
}, },
optionsViewBuilder:
(context, onSelected, options) {
final optionList = options.toList();
if (optionList.isEmpty) {
return const SizedBox.shrink();
}
final maxWidth = isMobile
? MediaQuery.of(context).size.width - 64
: 240.0;
return Align(
alignment: Alignment.topLeft,
child: Material(
elevation: 4,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: 240,
),
child: ListView.builder(
padding: EdgeInsets.zero,
shrinkWrap: true,
itemCount: optionList.length,
itemBuilder: (context, index) {
final option = optionList[index];
return ListTile(
title: Text(option),
onTap: () => onSelected(option),
);
},
),
),
),
);
},
onSelected: (String selection) { onSelected: (String selection) {
setState(() { setState(() {
_selectedClass = selection; _selectedClass = selection;

View File

@@ -261,8 +261,26 @@ class DataService extends ChangeNotifier {
Future<void> fetchTrips() async { Future<void> fetchTrips() async {
try { try {
final json = await api.get('/trips'); final json = await api.get('/trips');
Iterable<dynamic>? raw;
if (json is List) { if (json is List) {
_tripList = json.map((e) => TripSummary.fromJson(e)).toList(); raw = json;
} else if (json is Map) {
for (final key in ['trips', 'trip_data', 'data']) {
final value = json[key];
if (value is List) {
raw = value;
break;
}
}
}
if (raw != null) {
_tripList = raw
.whereType<Map<String, dynamic>>()
.map((e) => TripSummary.fromJson(e))
.toList();
} else {
debugPrint('Unexpected trip list response: $json');
_tripList = [];
} }
} catch (e) { } catch (e) {
debugPrint('Failed to fetch trip list: $e'); debugPrint('Failed to fetch trip list: $e');