[RC] Fixed release builds
maybe, if we didn't mess up the ymls again
This commit is contained in:
parent
dbce10b812
commit
9de0bd8c3c
4
.github/workflows/cleanup.yml
vendored
4
.github/workflows/cleanup.yml
vendored
|
@ -10,10 +10,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Dart
|
- name: Set up Dart
|
||||||
uses: dart-lang/setup-dart@v2
|
uses: dart-lang/setup-dart@v1
|
||||||
|
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v3
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import 'dart:convert';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'bottom_bar.dart';
|
|
||||||
import 'app_state.dart';
|
|
||||||
import 'settings_page.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'app_state.dart';
|
||||||
|
import 'bottom_bar.dart';
|
||||||
|
import 'settings_page.dart';
|
||||||
|
|
||||||
class LogsPage extends StatefulWidget {
|
class LogsPage extends StatefulWidget {
|
||||||
const LogsPage({Key? key}) : super(key: key);
|
const LogsPage({Key? key}) : super(key: key);
|
||||||
|
@ -96,21 +97,36 @@ class _LogsPageState extends State<LogsPage> {
|
||||||
DataColumn(label: Text('Intensity')),
|
DataColumn(label: Text('Intensity')),
|
||||||
DataColumn(label: Text('Duration (s)')),
|
DataColumn(label: Text('Duration (s)')),
|
||||||
DataColumn(label: Text('Type')),
|
DataColumn(label: Text('Type')),
|
||||||
|
DataColumn(label: Text('Created At')),
|
||||||
],
|
],
|
||||||
rows: logs.map((log) {
|
rows: logs.map((log) {
|
||||||
final controlledBy = log['controlledBy'] as Map<String, dynamic>?;
|
final controlledBy =
|
||||||
|
log['controlledBy'] as Map<String, dynamic>?;
|
||||||
if (controlledBy != null) {
|
if (controlledBy != null) {
|
||||||
final name = getDisplayName(controlledBy);
|
final name = getDisplayName(controlledBy);
|
||||||
final intensity = log['intensity'] as int?;
|
final intensity = log['intensity'] as int?;
|
||||||
final duration = (log['duration'] as int?)! / 1000;
|
final duration = (log['duration'] as int?)! / 1000;
|
||||||
final type = log['type'] as String?;
|
final type = log['type'] as String?;
|
||||||
if (intensity != null && type != null) {
|
final createdAt = log['createdOn'] as String?;
|
||||||
|
|
||||||
|
if (intensity != null && type != null && createdAt != null) {
|
||||||
|
final userTimezone =
|
||||||
|
DateTime.now().timeZoneOffset; // Get user's timezone
|
||||||
|
|
||||||
|
final utcDateTime = DateTime.parse(createdAt);
|
||||||
|
final localDateTime = utcDateTime
|
||||||
|
.add(userTimezone); // Convert to local timezone
|
||||||
|
|
||||||
|
final formattedCreatedAt =
|
||||||
|
DateFormat('dd/MM/yy - HH:mm').format(localDateTime);
|
||||||
|
|
||||||
return DataRow(
|
return DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(Text(name)),
|
DataCell(Text(name)),
|
||||||
DataCell(Text(intensity.toString())),
|
DataCell(Text(intensity.toString())),
|
||||||
DataCell(Text(duration.toString())),
|
DataCell(Text(duration.toString())),
|
||||||
DataCell(getIconForType(type)),
|
DataCell(getIconForType(type)),
|
||||||
|
DataCell(Text(formattedCreatedAt)),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,15 +178,16 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||||
future: fetchCommitData(),
|
future: fetchCommitData(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
return CircularProgressIndicator();
|
return const CircularProgressIndicator();
|
||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
return Text('Error: ${snapshot.error}');
|
return Text('Error: ${snapshot.error}');
|
||||||
} else {
|
} else {
|
||||||
return Text('App Version: 0.2-beta7 - Build Date: Dec. 7, 2023\n'
|
return Text(
|
||||||
|
'App Version: 0.3-rc0 - Build Date: Dec. 7, 2023\n'
|
||||||
'(C) Mercury, 2023\n'
|
'(C) Mercury, 2023\n'
|
||||||
'Connected to api.shocklink.org, version ${snapshot.data}',
|
'Connected to api.shocklink.org, version ${snapshot.data}',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: TextStyle(fontSize: 12),
|
style: const TextStyle(fontSize: 12),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -176,6 +176,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.0"
|
version: "3.3.0"
|
||||||
|
intl:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: intl
|
||||||
|
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.19.0"
|
||||||
js:
|
js:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -4,7 +4,7 @@ description: Companion app for managing openshock-compatible devices
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.2.7
|
version: 0.3.0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.2 <4.0.0'
|
sdk: '>=3.1.2 <4.0.0'
|
||||||
|
@ -24,6 +24,7 @@ dependencies:
|
||||||
fluttertoast: ^8.2.3
|
fluttertoast: ^8.2.3
|
||||||
provider: ^6.1.1
|
provider: ^6.1.1
|
||||||
dynamic_color: ^1.4.0
|
dynamic_color: ^1.4.0
|
||||||
|
intl: ^0.19.0
|
||||||
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
|
|
Loading…
Reference in a new issue