feat: add Next Lesson widget and enhance existing widgets
- Implemented a new Next Lesson widget to display the upcoming lesson details on the home screen. - Updated Today widget to dynamically adjust the number of lessons displayed based on available space. - Enhanced the Settings screen to allow users to manage hidden lessons more effectively. - Introduced harmonized color palettes for better visual consistency across themes. - Updated the timetable API to support a new range parameter for semester-based queries. - Added tests to ensure the new semester range functionality works as expected. - Refactored widget styling for improved appearance on devices with different Android versions.
This commit is contained in:
@@ -29,8 +29,8 @@ app.use("/api", (_req, res, next) => {
|
||||
next();
|
||||
});
|
||||
// Raised whenever an endpoint is added or changed, so a deployment is easy to verify:
|
||||
// 2 — /api/timetable for the Android client.
|
||||
const API_VERSION = 2;
|
||||
// 2 — /api/timetable for the Android client; 3 — its range=semester.
|
||||
const API_VERSION = 3;
|
||||
|
||||
// Liveness plus what the server currently reads from the university, without network calls.
|
||||
app.get("/api/health", async (_req, res) => {
|
||||
@@ -110,6 +110,8 @@ app.get("/api/timetable", async (req, res, next) => {
|
||||
group,
|
||||
from,
|
||||
days: req.query.days,
|
||||
range: req.query.range === "semester" ? "semester" : undefined,
|
||||
today: todayIso(),
|
||||
}),
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user