Skip to content

Commit fc1c6cd

Browse files
committed
[PARTIAL] Refactor feature modules and migrate models to features
1 parent 34c26cf commit fc1c6cd

File tree

95 files changed

+903
-1298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+903
-1298
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"cSpell.words": [
33
"ocms"
44
],
5-
"cmake.sourceDirectory": "/media/lc-022/Data/DNV/Documents/Github/OpenCMS/windows"
5+
"cmake.sourceDirectory": "D:/DNV/Documents/Github/OpenCMS/windows"
66
}

assets/langs/en-US.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
"physics": "Physics",
155155
"chemistry": "Chemistry",
156156
"biology": "Biology",
157-
"science": "Science",
158157
"mathematics": "Mathematics",
159158
"further_math": "Further Mathematics",
160159
"literature": "Literature",

assets/langs/zh-CN.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
"physics": "物理",
155155
"chemistry": "化学",
156156
"biology": "生物",
157-
"science": "科学",
158157
"mathematics": "数学",
159158
"further_math": "进阶数学",
160159
"literature": "文学",

lib/data/constants/api_endpoints.dart

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ class API {
99
static const Duration defaultTimeout = Duration(seconds: 30);
1010
static const Duration connectTimeout = Duration(seconds: 15);
1111
static const Duration solveCaptchaPollInterval = Duration(seconds: 1);
12-
static const int maxRetries = 2; // ~60s
12+
static const int maxRetries = 2;
13+
14+
static const String apiClientVersion = '1.0.7+1';
15+
static const String userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36';
16+
17+
// Headers
18+
static Map<String, String> defaultHeaders = {
19+
'Accept': 'application/json',
20+
'X-App-Version': apiClientVersion,
21+
'Referer': cmsReferer,
22+
'user-agent': userAgent,
23+
};
1324

1425
// Base API configuration
1526
static const String baseDomain =
@@ -53,8 +64,6 @@ class API {
5364
// Exam Timetable endpoint
5465
// parameters: year (calendar year)
5566
static const String examTimetableUrl = '/legacy/students/my/exam_timetable/';
56-
// Assembly Info endpoint
57-
static const String assemblyInfoUrl = '/legacy/students/my/assembly/';
5867
// Course Stats endpoint
5968
// parameters: year (academic year)
6069
static const String courseStatsUrl = '/legacy/students/my/course_stats/';
@@ -119,15 +128,4 @@ class API {
119128
'cms.$baseDomain': 'cms.$baseDomain',
120129
'www.$baseDomain': 'www.$baseDomain',
121130
};
122-
123-
static const String apiClientVersion = '1.0.7+1';
124-
static const String userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36';
125-
126-
// Headers
127-
static Map<String, String> defaultHeaders = {
128-
'Accept': 'application/json',
129-
'X-App-Version': apiClientVersion,
130-
'Referer': cmsReferer,
131-
'user-agent': userAgent,
132-
};
133131
}

lib/data/constants/subject_icons.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class SubjectIconConstants {
1010
'physics': Symbols.specific_gravity_rounded,
1111
'chemistry': Symbols.experiment_rounded,
1212
'biology': Symbols.biotech_rounded,
13-
'science': Symbols.science_rounded,
1413

1514
// Mathematics
1615
'mathematics': Symbols.calculate_rounded,
@@ -55,7 +54,6 @@ class SubjectIconConstants {
5554
'physics': 'physics',
5655
'chemistry': 'chemistry',
5756
'biology': 'biology',
58-
'science': 'science',
5957

6058
// Mathematics
6159
'mathematics': 'mathematics',
@@ -107,7 +105,6 @@ class SubjectIconConstants {
107105
'CHE': 'chemistry',
108106
'CHM': 'chemistry',
109107
'BIO': 'biology',
110-
'SCI': 'science',
111108

112109
// Mathematics
113110
'MAT': 'mathematics',

lib/data/models/assembly/assembly_event.dart

Lines changed: 0 additions & 77 deletions
This file was deleted.

lib/data/models/attendance/attendance_response.dart

Lines changed: 0 additions & 103 deletions
This file was deleted.

lib/data/models/profile/profile.dart

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:get_it/get_it.dart';
2-
import 'package:opencms/features/auth/login_state.dart';
2+
import 'package:opencms/features/auth/services/login_state.dart';
33
import 'package:opencms/features/auth/services/auto_captcha_service.dart';
44
import 'package:opencms/features/auth/services/token_refresh_service.dart';
55
import 'package:opencms/features/core/storage/cookie_storage.dart';

0 commit comments

Comments
 (0)