fix: automate graduate timetable read and refine blue glass Dock

This commit is contained in:
Codex
2026-10-13 17:50:04 +08:00
parent 8f20a341c4
commit 476ef097ee
23 changed files with 1072 additions and 176 deletions
@@ -4,14 +4,17 @@ import 'school_navigation_policy.dart';
class SchoolLoginFlow {
Uri? _target;
bool _requested = false;
int _attempts = 0;
void begin(Uri target) {
_target = target;
_requested = false;
_attempts = 0;
}
void reset() {
_target = null;
_requested = false;
_attempts = 0;
}
Uri? onLoaded(Uri uri, {required bool authenticated}) {
@@ -24,11 +27,13 @@ class SchoolLoginFlow {
}
if (uri.path == _target!.path ||
_requested ||
_attempts >= 2 ||
!authenticated ||
!uri.path.startsWith('/pyxx/')) {
!SchoolNavigationPolicy.isGraduatePage(uri)) {
return null;
}
_requested = true;
_attempts++;
return _target;
}
}