diff --git a/README.md b/README.md index 86e9546..1fbbbbc 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The app does not store data locally, due to the way android permissions function # Implementation +- [ ] Application Icon for mobile and web favicon - [x] Basic UI - [x] Permissions - [x] Automatic updates @@ -32,10 +33,11 @@ The app does not store data locally, due to the way android permissions function - [x] Track driving hours - [x] Track trips - [x] Track stops/deliveries -- [x] Track trip base pay - - [x] Track each delivery's tips -- [ ] Map marker for each stop/delivery with text saying "Trip #X/DropOff #X\nBase Pay: $$$; Tip: $$$" -- [ ] Basic version of the app in readonly mode when deployed on a web server. -- [ ] Backend server - - [ ] PHP? - - [ ] Dart based? +- [x] ~~Track trip base pay~~ + - [x] ~~Track each delivery's tips~~ +- [x] Track total pay +- [x] Map marker for each stop/delivery with text saying "Trip #X/DropOff #X ~~\nBase Pay: [amount]; Tip: [amount]~~ +- [x] Basic version of the app in readonly mode when deployed on a web server. +- [x] Backend server + - [x] PHP + - [ ] ~~Dart based?~~ diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 04073ea..886c45b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -13,7 +13,7 @@ "https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php"; - static const VERSION = "1.0.0-beta.9"; + static const VERSION = "1.0.0-beta.10"; static bool UPDATE_AVAILABLE = false; static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta; diff --git a/lib/data.dart b/lib/data.dart index bba5652..196d5db 100644 --- a/lib/data.dart +++ b/lib/data.dart @@ -247,13 +247,15 @@ class SessionData { StartTime = DateTime.parse(jsMap['start'] as String); } - if (jsMap.containsKey("end")) + if (jsMap.containsKey("end")) { EndTime = DateTime.parse(jsMap["end"] as String); + } - if (jsMap.containsKey("totalPay")) + if (jsMap.containsKey("totalPay")) { TotalPay = jsMap["totalPay"] as double; - else + } else { TotalPay = null; + } IsReadOnly = true; diff --git a/lib/pages/HomePage.dart b/lib/pages/HomePage.dart index 2fae2b2..3f1a585 100644 --- a/lib/pages/HomePage.dart +++ b/lib/pages/HomePage.dart @@ -4,6 +4,7 @@ import 'package:libacflutter/Constants.dart'; import 'package:libacflutter/Prompt.dart'; import 'package:timetrack/consts.dart'; import 'package:timetrack/data.dart'; +import 'package:url_launcher/url_launcher.dart'; class HomePage extends StatefulWidget { const HomePage({super.key}); @@ -91,6 +92,19 @@ class _HomePageState extends State { setState(() {}); }, ), + ListTile( + title: Text("Source Code"), + subtitle: Text("Licensed under the GPLv3"), + leading: Icon(Icons.code_rounded), + onTap: () async { + final Uri url = Uri.parse( + 'https://git.zontreck.com/AriasCreations/TimeTracker', + ); + if (!await launchUrl(url)) { + throw Exception('Could not launch $url'); + } + }, + ), /* ListTile( title: Text("RESET APP SESSION"), diff --git a/lib/pages/WebMainPage.dart b/lib/pages/WebMainPage.dart index 3f71db7..9d18e5f 100644 --- a/lib/pages/WebMainPage.dart +++ b/lib/pages/WebMainPage.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:libacflutter/Constants.dart'; import 'package:timetrack/consts.dart'; import 'package:timetrack/data.dart'; +import 'package:url_launcher/url_launcher.dart'; class WebMain extends StatefulWidget { const WebMain({super.key}); @@ -66,6 +67,35 @@ class _WebMain extends State { setState(() {}); }, ), + + ListTile( + title: Text("Source Code"), + subtitle: Text("Licensed under the GPLv3"), + leading: Icon(Icons.code_rounded), + onTap: () async { + final Uri url = Uri.parse( + 'https://git.zontreck.com/AriasCreations/TimeTracker', + ); + if (!await launchUrl(url)) { + throw Exception('Could not launch $url'); + } + }, + ), + ListTile( + title: Text("Download Mobile App"), + subtitle: Text( + "Click to go to the download page, from there you will want the APK file.", + ), + leading: Icon(Icons.download), + onTap: () async { + final Uri url = Uri.parse( + "https://ci.zontreck.com/job/Projects/job/Dart/job/Time%20Tracker/", + ); + if (!await launchUrl(url)) { + throw Exception("Could not launch $url"); + } + }, + ), ], ), ), diff --git a/linux/runner/my_application.cc b/linux/runner/my_application.cc index f3c3739..bb71fca 100644 --- a/linux/runner/my_application.cc +++ b/linux/runner/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "timetrack"); + gtk_header_bar_set_title(header_bar, "Time Tracker"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "timetrack"); + gtk_window_set_title(window, "Time Tracker"); } gtk_window_set_default_size(window, 1280, 720); diff --git a/pubspec.yaml b/pubspec.yaml index 02a786a..4db087f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0-beta.9 +version: 1.0.0-beta.10 environment: sdk: ^3.7.2 @@ -46,6 +46,7 @@ dependencies: flutter_map: ^8.1.1 latlong2: ^0.9.1 flutter_map_tile_caching: ^10.1.1 + url_launcher: ^6.3.1 dev_dependencies: flutter_test: diff --git a/web/index.html b/web/index.html index f47cfa6..bc3ac1e 100644 --- a/web/index.html +++ b/web/index.html @@ -18,7 +18,7 @@ - + diff --git a/web/manifest.json b/web/manifest.json index bf5852d..572f0ba 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,35 +1,35 @@ { - "name": "timetrack", - "short_name": "timetrack", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] + "name": "Time Tracker", + "short_name": "timetrack", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A simple, yet effective GPS, time, and mile tracker", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] }