feat: enhance textbook reader with anchor text support and improve knowledge point management

This commit is contained in:
SpecialX
2026-01-16 10:22:16 +08:00
parent 9bfc621d3f
commit bb4555f611
44 changed files with 6284 additions and 2090 deletions

View File

@@ -1,5 +1,34 @@
# Work Log
## 2026-01-15
### 1. Schedule Module Optimization
* **Visual Overhaul (`schedule-view.tsx`)**:
* Refactored the schedule grid to match the exact design of the `ClassScheduleGrid` widget.
* Implemented a clean, borderless layout with no grid lines for a modern look.
* **Time-Based Positioning**: Replaced grid-row logic with absolute positioning based on time (8:00 - 18:00 range) using percentage calculations (`getPositionStyle`).
* **Color Coding**: Added `getSubjectColor` to auto-assign thematic colors (blue for Math, purple for Physics, etc.) based on course names.
* **Card Design**: Refined course cards with vertical centering, better spacing, and removed unnecessary UI elements (like the "+" button in headers).
* **Filter Bar Refinement (`schedule-filters.tsx`)**:
* **Minimalist Design**: Removed borders and shadows from the class selector and buttons to integrate seamlessly with the background.
* **Center Label**: Added a dynamic, absolute-centered text label that updates based on selection:
* Shows "All Classes" when no filter is active.
* Shows "{Class Name}" when a specific class is selected.
* **Simplified Controls**: Removed the "Reset" button (X icon) entirely for a cleaner interface.
* **Ghost Buttons**: Styled the "Add Event" button as a ghost variant with muted colors.
### 2. Architecture & Cleanup
* **Insights Module Removal**:
* Deleted the entire `src/app/(dashboard)/teacher/classes/insights` directory as the feature was deemed redundant.
* Removed `insights-filters.tsx` component.
* Updated `navigation.ts` to remove the "Insights" link from the sidebar.
* *Note*: Preserved `getClassHomeworkInsights` in `data-access.ts` as it's still used by the Class Detail dashboard widgets.
### 3. Verification
* **Type Safety**: Ran `npm run typecheck` multiple times during refactoring to ensure no regressions (Passed).
* **Build**: Attempted to clear build cache to resolve a chunk loading error (Windows permission issue encountered but workaround applied).
## 2026-01-14
### 1. Class Management Refactoring (Role Separation)