laptop push
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="bus_infotainment"
|
||||
android:label="Bus Infotainment System"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
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"}";
|
||||
|
||||
timeString = timeString.replaceAll("0:", "12:");
|
||||
if (timeString.startsWith("0:")){
|
||||
timeString = timeString.replaceAll("0:", "12:");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return timeString;
|
||||
}
|
||||
|
||||
@@ -109,8 +109,9 @@ class _ArcDashboardState extends State<ArcDashboard> {
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
if (LiveInformation().inRoom)
|
||||
ShadButton(
|
||||
text: Text("Rooom Information"),
|
||||
text: Text("Room Information"),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
showShadSheet(
|
||||
@@ -152,7 +153,7 @@ class _ArcDashboardState extends State<ArcDashboard> {
|
||||
)
|
||||
),
|
||||
|
||||
if (!multiMode)
|
||||
if (!LiveInformation().inRoom)
|
||||
ShadButton(
|
||||
text: Text("Return to route selection"),
|
||||
onPressed: () {
|
||||
@@ -465,6 +466,7 @@ class _ArcDashboardState extends State<ArcDashboard> {
|
||||
const ShadButton(
|
||||
icon: Icon(Icons.stop),
|
||||
width: double.infinity,
|
||||
enabled: false,
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
),
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ class _page2State extends State<_page2> {
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
/*SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
|
||||
@@ -338,7 +338,7 @@ class _page2State extends State<_page2> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),*/
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -568,6 +568,8 @@ class _page3State extends State<_page3> {
|
||||
text: Text(text),
|
||||
onPressed: () async {
|
||||
|
||||
LiveInformation().initTrackerModule();
|
||||
|
||||
showShadDialog(
|
||||
context: context,
|
||||
builder: (context) => ShadDialog.alert(
|
||||
|
||||
@@ -254,8 +254,9 @@ Widget _getRouteCard(context, BusRoute route, {bool multiMode = false}) {
|
||||
for (BusRouteVariant variant in route.routeVariants.values) {
|
||||
variantWidgets.add(
|
||||
ShadButton.outline(
|
||||
text: SizedBox(
|
||||
|
||||
text: Container(
|
||||
width: 274,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
@@ -173,62 +173,19 @@ class _HomePage_ReState extends State<HomePage_Re> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
|
||||
ShadCard(
|
||||
title: const Text("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: () {
|
||||
Navigator.pushNamed(context, "/websocket");
|
||||
},
|
||||
text: const Text("Continue"),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
|
||||
ShadButton(
|
||||
text: Text("Re-setup"),
|
||||
onPressed: () {
|
||||
Navigator.popAndPushNamed(context, "/setup");
|
||||
},
|
||||
)
|
||||
|
||||
],
|
||||
@@ -1681,10 +1638,13 @@ class _MultiModeJoinState extends State<MultiModeJoin> {
|
||||
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.all(16),
|
||||
width: double.infinity,
|
||||
|
||||
child: Column(
|
||||
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
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