laptop push
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<application
|
<application
|
||||||
android:label="bus_infotainment"
|
android:label="Bus Infotainment System"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
|
|||||||
@@ -241,7 +241,11 @@ class _timeComponentState extends State<_timeComponent> {
|
|||||||
|
|
||||||
String timeString = "${now.hour % 12}:${now.minute.toString().padLeft(2, "0")} ${now.hour < 12 ? "AM" : "PM"}";
|
String timeString = "${now.hour % 12}:${now.minute.toString().padLeft(2, "0")} ${now.hour < 12 ? "AM" : "PM"}";
|
||||||
|
|
||||||
|
if (timeString.startsWith("0:")){
|
||||||
timeString = timeString.replaceAll("0:", "12:");
|
timeString = timeString.replaceAll("0:", "12:");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return timeString;
|
return timeString;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,8 +109,9 @@ class _ArcDashboardState extends State<ArcDashboard> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
|
if (LiveInformation().inRoom)
|
||||||
ShadButton(
|
ShadButton(
|
||||||
text: Text("Rooom Information"),
|
text: Text("Room Information"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
showShadSheet(
|
showShadSheet(
|
||||||
@@ -152,7 +153,7 @@ class _ArcDashboardState extends State<ArcDashboard> {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
if (!multiMode)
|
if (!LiveInformation().inRoom)
|
||||||
ShadButton(
|
ShadButton(
|
||||||
text: Text("Return to route selection"),
|
text: Text("Return to route selection"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -465,6 +466,7 @@ class _ArcDashboardState extends State<ArcDashboard> {
|
|||||||
const ShadButton(
|
const ShadButton(
|
||||||
icon: Icon(Icons.stop),
|
icon: Icon(Icons.stop),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
enabled: false,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class _page2State extends State<_page2> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(
|
/*SizedBox(
|
||||||
width: 16,
|
width: 16,
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ class _page2State extends State<_page2> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -568,6 +568,8 @@ class _page3State extends State<_page3> {
|
|||||||
text: Text(text),
|
text: Text(text),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
|
||||||
|
LiveInformation().initTrackerModule();
|
||||||
|
|
||||||
showShadDialog(
|
showShadDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => ShadDialog.alert(
|
builder: (context) => ShadDialog.alert(
|
||||||
|
|||||||
@@ -254,8 +254,9 @@ Widget _getRouteCard(context, BusRoute route, {bool multiMode = false}) {
|
|||||||
for (BusRouteVariant variant in route.routeVariants.values) {
|
for (BusRouteVariant variant in route.routeVariants.values) {
|
||||||
variantWidgets.add(
|
variantWidgets.add(
|
||||||
ShadButton.outline(
|
ShadButton.outline(
|
||||||
text: SizedBox(
|
text: Container(
|
||||||
|
width: 274,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -173,62 +173,19 @@ class _HomePage_ReState extends State<HomePage_Re> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
|
|
||||||
ShadCard(
|
ShadButton(
|
||||||
title: const Text("Setup"),
|
text: Text("Re-setup"),
|
||||||
width: 300,
|
|
||||||
description: const Text(
|
|
||||||
"This button is only for debug mode. If you see this button in production, please contact support."
|
|
||||||
),
|
|
||||||
content: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
const SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
ShadButton.secondary(
|
|
||||||
onPressed: () async {
|
|
||||||
LiveInformation().announcementModule.setBundleBytes(null);
|
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
|
||||||
prefs.remove("AnnouncementsFileLocation");
|
|
||||||
Navigator.pushNamed(context, "/setup");
|
|
||||||
},
|
|
||||||
text: const Text("Continue"),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
ShadCard(
|
|
||||||
title: const Text("Websocket test"),
|
|
||||||
width: 300,
|
|
||||||
description: const Text(
|
|
||||||
"This button is only for debug mode. If you see this button in production, please contact support."
|
|
||||||
),
|
|
||||||
content: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
const SizedBox(
|
|
||||||
height: 4,
|
|
||||||
),
|
|
||||||
ShadButton.secondary(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pushNamed(context, "/websocket");
|
Navigator.popAndPushNamed(context, "/setup");
|
||||||
},
|
},
|
||||||
text: const Text("Continue"),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -1681,10 +1638,13 @@ class _MultiModeJoinState extends State<MultiModeJoin> {
|
|||||||
|
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.all(16),
|
padding: EdgeInsets.all(16),
|
||||||
|
width: double.infinity,
|
||||||
|
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
ShadCard(
|
ShadCard(
|
||||||
@@ -1738,8 +1698,70 @@ class _MultiModeJoinState extends State<MultiModeJoin> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
// ibus_display(),
|
|
||||||
// Expanded(child: _dash())
|
|
||||||
|
// todo: This is the new code, couldnt finish it on time so still using the old code
|
||||||
|
/*Text(
|
||||||
|
"Join a group",
|
||||||
|
style: ShadTheme.of(context).textTheme.h2,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
|
||||||
|
Container(
|
||||||
|
width: 150,
|
||||||
|
height: 150,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
|
||||||
|
},
|
||||||
|
// border radius
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
child: Text(
|
||||||
|
"Join from QR Code",
|
||||||
|
style: ShadTheme.of(context).textTheme.h4,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
width: 150,
|
||||||
|
height: 150,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
|
||||||
|
},
|
||||||
|
// border radius
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
child: Text(
|
||||||
|
"Join from Clipboard",
|
||||||
|
style: ShadTheme.of(context).textTheme.h4,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
],
|
||||||
|
)*/
|
||||||
|
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user