Skip to content

Commit 7165940

Browse files
committed
new changes! more! better!
1 parent 3ef9206 commit 7165940

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

lib/edit_lessons_page.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ class _EditLessonsPageState extends State<EditLessonsPage> {
9595
}
9696
try {
9797
if (int.tryParse(time) == null) {
98-
throw "Invalid time format - Time must be in 24hr time as 4 digits, with no colon. For example 2:15PM would be \"1415.\"";
98+
throw "Invalid time format - Time must be in 24hr time as 4 digits, with no colon. For example 2:15PM would be \"1415\".";
9999
}
100100
if (time.length != 4) {
101-
throw "Invalid time format - Time must be in 24hr time as 4 digits, with no colon. For example 2:15PM would be \"1415.\"";
101+
throw "Invalid time format - Time must be in 24hr time as 4 digits, with no colon. For example 2:15PM would be \"1415\".";
102102
}
103103

104104
final body = <String, dynamic>{
@@ -263,6 +263,14 @@ class _LessonCardState extends State<LessonCard> {
263263
child: const Text("Cancel")),
264264
TextButton(
265265
onPressed: () async {
266+
newLessonTime = newLessonTime.trim();
267+
newLessonTime = newLessonTime.replaceAll(":", "");
268+
newLessonTime = newLessonTime.replaceAll(" ", "");
269+
newLessonTime = newLessonTime.replaceAll("AM", "");
270+
newLessonTime = newLessonTime.replaceAll("am", "");
271+
if (newLessonTime.length == 3) {
272+
newLessonTime = "0$newLessonTime"; // Add leading zero if needed
273+
}
266274
try {
267275
if (int.tryParse(newLessonTime) == null) {
268276
throw "Only numbers are allowed";

lib/globals.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:pocketbase/pocketbase.dart';
22

33
final pb = PocketBase('https://gtest2.shcmusiclessonrolls.com/');
44

5-
const version = "v6.1.4";
5+
const version = "v6.1.5";
66
//Also change this value in pubspec.yaml
77
//If I knew that the proper way to do this was in pubspec.yaml i would have done that
88
//But now its difficult to retroactively fix

lib/home_page.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,20 @@ class _MyHomePageState extends State<MyHomePage> {
9090
"You are using an outdated version of the website. You may need to restart your web browser for it to update.\n\nYour website version: $version\nLatest version: $latestVersion"),
9191
actions: [kIsWeb? const SizedBox(): TextButton(onPressed: (){
9292
launchUrl(Uri.parse("https://github.com/Austin-540/Austin-Scholarship-2023/releases/download/latest/Latest${getPlatform()}.zip"));
93-
}, child: Text("Download latest ${getPlatform()} release"))],
93+
}, child: Text("Download latest ${getPlatform()} release")),
94+
95+
TextButton(onPressed: () {
96+
if (Navigator.canPop(context)) {
97+
Navigator.pop(context);
98+
}
99+
}, child: Text("Ignore")),
100+
101+
TextButton(
102+
onPressed: () {
103+
launchUrl(Uri.parse("https://app.shcmusiclessonrolls.com/",), webOnlyWindowName: "_self");
104+
},
105+
child: Text("Try force update (not always successful)"),)
106+
],
94107
));
95108
} else {
96109
if (fssVersion != version) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 6.1.4
19+
version: 6.1.5
2020

2121
environment:
2222
sdk: '>=3.0.0 <4.0.0'

0 commit comments

Comments
 (0)