feat: deliver RSchedule service login exams and elastic glass navigation

This commit is contained in:
Codex
2026-10-13 17:06:50 +08:00
parent 9193fd8e43
commit 8f20a341c4
35 changed files with 1742 additions and 453 deletions
@@ -0,0 +1,34 @@
import 'school_navigation_policy.dart';
/// Only the authenticated graduate system may advance the service handshake.
class SchoolLoginFlow {
Uri? _target;
bool _requested = false;
void begin(Uri target) {
_target = target;
_requested = false;
}
void reset() {
_target = null;
_requested = false;
}
Uri? onLoaded(Uri uri, {required bool authenticated}) {
if (_target == null || !SchoolNavigationPolicy.isSchoolPage(uri)) {
return null;
}
if (uri.host == 'idas.uestc.edu.cn') {
_requested = false;
return null;
}
if (uri.path == _target!.path ||
_requested ||
!authenticated ||
!uri.path.startsWith('/pyxx/')) {
return null;
}
_requested = true;
return _target;
}
}