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
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:
@@ -86,7 +86,7 @@ jobs:
|
||||
cp build/app/outputs/flutter-apk/app-release.apk app-release.apk
|
||||
|
||||
- name: Upload Android APK artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: android-apk
|
||||
path: app-release.apk
|
||||
@@ -128,7 +128,7 @@ jobs:
|
||||
tar -C build/linux/x64/release/bundle -czf app-linux-x64.tar.gz .
|
||||
|
||||
- name: Upload Linux artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-bundle
|
||||
path: app-linux-x64.tar.gz
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
|
||||
- name: Upload Windows artifact
|
||||
if: env.BUILD_WINDOWS == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows-zip
|
||||
path: app-windows-x64.zip
|
||||
@@ -245,19 +245,19 @@ jobs:
|
||||
- windows-build
|
||||
steps:
|
||||
- name: Download Android APK
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: android-apk
|
||||
path: artifacts
|
||||
|
||||
- name: Download Linux bundle
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux-bundle
|
||||
path: artifacts
|
||||
|
||||
- name: Download Windows bundle (optional)
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-zip
|
||||
path: artifacts
|
||||
|
||||
@@ -509,6 +509,7 @@ class _NewEntryPageState extends State<NewEntryPage> {
|
||||
return ReorderableListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
buildDefaultDragHandles: false,
|
||||
onReorder: (oldIndex, newIndex) {
|
||||
if (newIndex > oldIndex) newIndex -= 1;
|
||||
setState(() {
|
||||
|
||||
@@ -210,7 +210,9 @@ class _TractionPageState extends State<TractionPage> {
|
||||
children: [
|
||||
SizedBox(
|
||||
width: isMobile ? double.infinity : 240,
|
||||
child: Autocomplete<String>(
|
||||
child: RawAutocomplete<String>(
|
||||
textEditingController: _classController,
|
||||
focusNode: _classFocusNode,
|
||||
optionsBuilder: (TextEditingValue textEditingValue) {
|
||||
final query = textEditingValue.text.toLowerCase();
|
||||
if (query.isEmpty) {
|
||||
@@ -220,8 +222,6 @@ class _TractionPageState extends State<TractionPage> {
|
||||
(c) => c.toLowerCase().contains(query),
|
||||
);
|
||||
},
|
||||
textEditingController: _classController,
|
||||
focusNode: _classFocusNode,
|
||||
fieldViewBuilder:
|
||||
(
|
||||
context,
|
||||
@@ -239,6 +239,40 @@ class _TractionPageState extends State<TractionPage> {
|
||||
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) {
|
||||
setState(() {
|
||||
_selectedClass = selection;
|
||||
|
||||
@@ -261,8 +261,26 @@ class DataService extends ChangeNotifier {
|
||||
Future<void> fetchTrips() async {
|
||||
try {
|
||||
final json = await api.get('/trips');
|
||||
Iterable<dynamic>? raw;
|
||||
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) {
|
||||
debugPrint('Failed to fetch trip list: $e');
|
||||
|
||||
Reference in New Issue
Block a user