* feat: Add custom font support for EPUB reader This commit introduces the ability to manage and use custom fonts in the EPUB reader. Key changes include: **Backend:** - Added `CustomFontService` for handling custom font operations. - Introduced `CustomFontController` for API endpoints. - Created `CustomFontEntity` and `CustomFontRepository` for database interactions. - Added `CustomFontMapper` and `CustomFontDto` for data transformation. - Updated `SecurityConfig` to include JWT filter for custom fonts. - Enhanced `GlobalExceptionHandler` to handle custom font-related exceptions. - Added database migrations: - `V83__Create_Custom_Font_Table.sql` for creating the custom font table. - `V84__Add_Custom_Font_To_Epub_Preferences.sql` for integrating custom fonts with EPUB preferences. **Frontend:** - Added `CustomFontsComponent` and `FontUploadDialogComponent` for managing custom fonts in the settings UI. - Updated `EpubReaderPreferencesComponent` to include custom font options. - Introduced `CustomFontService` and `CustomFontModel` for frontend logic and data handling. - Enhanced `SettingsComponent` to integrate custom font management. **Other Changes:** - Updated `EpubViewerPreferences` and `EpubViewerPreferencesEntity` to support custom fonts. - Modified existing components and services to accommodate the new feature. This feature enhances the user experience by allowing personalized font choices for EPUB reading. * fix: custom font does not apply after page layout changed * fix: duplicate API call when change EPUB global settings * fix: some code review items, extract shared filter logic and improve UX - Extract AbstractQueryParameterJwtFilter base class to reduce code duplication between CoverJwtFilter and CustomFontJwtFilter - Remove cssIdentifier and fontUrl fields from CustomFont model (no longer needed) - Add font name sanitization to prevent XSS and ensure data integrity - Improve error handling in CustomFontService with proper APIException usage - Replace RuntimeException handler with specific IllegalStateException and UnsupportedOperationException handlers in GlobalExceptionHandler - Add skeleton loading states for font previews and font dropdowns - Improve font loading state management in epub-reader component - Create shared custom-font.util.ts for dropdown population logic - Use reactive font$ subscription for real-time font updates in preferences - Make DB migrations idempotent with IF NOT EXISTS clauses - Optimize font file validation to read only header bytes instead of entire file * chore: re-version migration scripts * Fix: Kobo sync missing book covers (v1.16.4) (#2147) Co-authored-by: acx10 <acx10@users.noreply.github.com> * Fix: correctly update book cover hash on metadata refresh (#2149) Co-authored-by: acx10 <acx10@users.noreply.github.com> * Introduce Vitest as the frontend Angular testing framework for Booklore (#2150) Co-authored-by: acx10 <acx10@users.noreply.github.com> * Add Vitest frontend tests to CI with JUnit reporting and coverage (#2151) Co-authored-by: acx10 <acx10@users.noreply.github.com> * Update PR template to capture frontend test details * Add instructions for running Angular frontend tests --------- Co-authored-by: ACX <8075870+acx10@users.noreply.github.com> Co-authored-by: acx10 <acx10@users.noreply.github.com>
BookLore
This project was generated using Angular CLI version 19.0.2.
Development server
To start a local development server, run:
ng serve
Once the server is running, open your browser and navigate to http://localhost:4200/. The application will automatically reload whenever you modify any of the source files.
Code scaffolding
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
ng generate component component-name
For a complete list of available schematics (such as components, directives, or pipes), run:
ng generate --help
Building
To build the project run:
ng build
This will compile your project and store the build artifacts in the dist/ directory. By default, the production build optimizes your application for performance and speed.
Running unit tests
To execute unit tests with the Karma test runner, use the following command:
ng test
Running end-to-end tests
For end-to-end (e2e) testing, run:
ng e2e
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
Additional Resources
For more information on using the Angular CLI, including detailed command references, visit the Angular CLI Overview and Command Reference page.