diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b02eddf..e7e721e 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ { 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; } diff --git a/lib/remaster/DashboardArc.dart b/lib/remaster/DashboardArc.dart index 3190f34..dbd471f 100644 --- a/lib/remaster/DashboardArc.dart +++ b/lib/remaster/DashboardArc.dart @@ -109,8 +109,9 @@ class _ArcDashboardState extends State { 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 { ) ), - if (!multiMode) + if (!LiveInformation().inRoom) ShadButton( text: Text("Return to route selection"), onPressed: () { @@ -465,6 +466,7 @@ class _ArcDashboardState extends State { const ShadButton( icon: Icon(Icons.stop), width: double.infinity, + enabled: false, borderRadius: BorderRadius.all(Radius.circular(10)), ), diff --git a/lib/remaster/InitialStartup.dart b/lib/remaster/InitialStartup.dart index e3fc045..e425665 100644 --- a/lib/remaster/InitialStartup.dart +++ b/lib/remaster/InitialStartup.dart @@ -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( diff --git a/lib/remaster/SearchArc.dart b/lib/remaster/SearchArc.dart index 1d6130b..26921b4 100644 --- a/lib/remaster/SearchArc.dart +++ b/lib/remaster/SearchArc.dart @@ -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: [ diff --git a/lib/remaster/dashboard.dart b/lib/remaster/dashboard.dart index 8ecad6f..7c67c4d 100644 --- a/lib/remaster/dashboard.dart +++ b/lib/remaster/dashboard.dart @@ -173,62 +173,19 @@ class _HomePage_ReState extends State { ], ), ), - - 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 { 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 { } } ) - // 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, + ), + + ), + ) + + ], + )*/ + ] ), ),