feat: add two-tab timetable UI and glass dock

This commit is contained in:
Codex
2026-10-12 23:33:33 +08:00
parent 808af007a2
commit 8a98d49d12
17 changed files with 1912 additions and 9 deletions
+2 -1
View File
@@ -79,8 +79,9 @@ class AppSnapshot {
}
final s = Map<String, dynamic>.from(json['settings'] as Map);
final minutes = s['reminderMinutes'] as int;
if (![5, 10, 15, 30, 60].contains(minutes))
if (![5, 10, 15, 30, 60].contains(minutes)) {
throw const FormatException('提醒时间无效');
}
final color = s['singleColorArgb'] as int;
if (color < 0 || color > 0xFFFFFFFF) throw const FormatException('颜色无效');
final sem = s['semester'];
+2 -1
View File
@@ -49,8 +49,9 @@ class Course {
}
final rawWeeks = json['weeks'];
if (rawWeeks is! List || rawWeeks.any((w) => w is! int))
if (rawWeeks is! List || rawWeeks.any((w) => w is! int)) {
throw const FormatException('周次必须是整数数组');
}
return Course(
id: text('id'),
name: text('name'),