Commit Graph
407 Commits
Author SHA1 Message Date
ajurna ce809ed1a9 **Refactor directory scanning and add scan task support**
- Added a new `scan_directory` task to enable folder scans as asynchronous tasks while maintaining compatibility with the immediate backend.
- Introduced the `reconcile` function, replacing `generate_directory` for improved separation of concerns between database writes and read operations.
- Established a unique constraint on `Directory` (`one_directory_name_per_parent`) to prevent duplicate directories under the same parent.
- Added a "Scan" button to the frontend for re-reading folders from disk, along with new task invocation endpoints in the API.
- Updated tests across modules to validate the new `scan_directory` task, unique constraints, and database indexing logic.
- Improved cleanup logic for stale files, directories, and thumbnails to handle concurrent operations efficiently.
- Simplified `scan_comics` management command by removing user dependency and aligning it with the new `reconcile` function.
- Enhanced frontend components (`TheComicReader`, `TheComicList`, and others) to include lifecycle method cleanups, prevent memory leaks, and handle task-based scans.
2026-10-13 15:58:06 +01:00
ajurna 4d0ba750ad Upgrade frontend dependencies and switch ESLint to a flat config
- Runtime majors: vue-router 5, reveal.js 6, fontawesome 7. Checked against the
  code that uses them: no change needed for reveal.js (the default export is
  still a callable factory and every method/option used is still present) or
  fontawesome (all seven registered icons still resolve).
- frontend/src/router/index.js: guards return the redirect instead of calling the
  deprecated next() callback, which works on vue-router 4 and 5.
- Add frontend/eslint.config.mjs because eslint 10 requires a flat config; the
  lint script now runs eslint directly instead of vue-cli-service.
- Drop tooling nothing in the webpack configs uses (@vue/cli-*, jshint,
  html-webpack-plugin, webpack-bundle-analyzer, @babel/core) and delete the dead
  vue.config.js. npm audit 35 -> 5 (all dev-only), --omit=dev is 0.
- frontend/src/views/UserView.vue: the $route watcher no longer declares unused
  params.
2026-10-13 15:57:40 +01:00
ajurna 6bcdf89fdc Remove unused files and dependencies
- Delete empty modules (comic/views.py, comic/urls.py, comic/forms.py), the
  empty mypy.ini, .readthedocs.yaml (no docs/ directory, pins Python 3.8) and
  setup.py (distutils is gone in Python 3.12+ and it still listed the deleted
  comic_auth; packaging is handled by pyproject.toml).
- Untrack the base64 PDF blob 'data' and the manual-only test_comics fixtures;
  the suite builds archives in tmp_path via comic/tests/factories.py. UnRAR.exe
  stays on disk for manual rarfile testing but is not in git.
- Drop unused dependencies: django-bootstrap4, django-sri, drf-extensions,
  mysqlclient, setuptools.
- build-test.ps1 no longer uses poetry.
- Ignore .venv/, .mypy_cache/, .ruff_cache/.
2026-10-13 15:57:40 +01:00
ajurna 79c0647cc4 Implement cookie-based JWT authentication
- Introduced `CookieJWTAuthentication` for authentication via HttpOnly cookies, enabling browser-initiated requests without `Authorization` headers.
- Added authentication views (`CookieTokenObtainPairView`, `CookieTokenRefreshView`, `CookieTokenBlacklistView`) to replace default SimpleJWT views.
- Updated Vuex store and frontend logic to handle sessions using HttpOnly cookies instead of localStorage.
- Enhanced backend and frontend configurations (Django settings, router, Vuex, and API service) to fully support cookie-based authentication.
- Updated authentication tests to ensure correct cookie handling and authentication flows.
2026-10-13 13:38:48 +01:00
ajurna a7e9bd0743 **Replace Flake8 with Ruff, refactor type hints, and enhance archive processing logic**
- Removed `flake8` and `flake8-annotations` from dependencies, replaced by `ruff` for linting.
- Introduced cleaner type hinting and modern Python annotations (PEP 604 style) across multiple modules.
- Moved archive processing to a dedicated helper (`comic.archives`) for improved maintainability.
- Updated and simplified logic for archive file retrieval, directory cleaning, and user access validation.
- Improved error handling and added support for user classification restrictions in API responses.
2026-10-13 12:07:47 +01:00
ajurna 1148f4072b **Replace Flake8 with Ruff, refactor type hints, and enhance archive processing logic**
- Removed `flake8` and `flake8-annotations` from dependencies, replaced by `ruff` for linting.
- Introduced cleaner type hinting and modern Python annotations (PEP 604 style) across multiple modules.
- Moved archive processing to a dedicated helper (`comic.archives`) for improved maintainability.
- Updated and simplified logic for archive file retrieval, directory cleaning, and user access validation.
- Improved error handling and added support for user classification restrictions in API responses.
2026-10-13 11:36:28 +01:00
ajurna 147a3a54ef **Refactor Docker and Compose for enhanced compatibility and efficiency**
- Restructured `Dockerfile` to include a dedicated frontend build stage and improved runtime configurations.
- Added new health checks and adjusted environment variables for better container management.
- Updated cron job configurations to leverage `/opt/venv` and align with new paths.
- Refined `docker-compose` files for multi-service setups, including better volume and environment variable handling.
- Migrated `cbwebreader-cron` service setup and improved restart policies across the board.
- Enhanced `.gitea` CI workflow to use updated tools (`uv`), streamline buildx processes, and ensure proper version extraction from metadata.
2026-10-13 10:25:07 +01:00
ajurna 9b9db755e6 Handle unreadable archives and adjust cron job configuration
- Skip page count assignment for corrupt or incompatible archives in comic processing.
- Update `Dockerfile` to append crontab entries to `/etc/crontab` instead of `/etc/cron.daily/cbreader`.
- Modify crontab entry to use the virtual environment's Python binary and include the `root` user for execution.
2026-10-13 09:46:26 +01:00
ajurna 1bbe0071a0 **Update dependencies to their latest versions**
Upgrade various Python package dependencies in `uv.lock`. Includes updates to critical packages such as Django (6.0.5 → 6.1.2), DRF (3.17.1 → 3.18.3), and others. Also adds new packages: `jsonschema`, `jsonschema-specifications`, and `importlib-resources`.
2026-10-13 09:43:09 +01:00
ajurna 91729f91dc Improve type hinting for ComicBook in generate_thumbnail method 2026-06-02 15:41:15 +01:00
ajurna 67b2d9756a updating deps 2026-05-11 13:53:20 +01:00
ajurna 3ac2f8698c updating deps 2026-05-11 13:30:56 +01:00
ajurna 9aaa0f1c9f updating deps
Build and push image / deploy (push) Has been cancelled
2026-01-15 09:56:39 +00:00
ajurna 65dbe8e18d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	.pre-commit-config.yaml
#	.python-version
#	Dockerfile
#	build.ps1
#	comic/migrations/0008_auto_20160331_1140.py
#	entrypoint.sh
#	frontend/package-lock.json
#	pyproject.toml
#	requirements.txt
#	uv.lock
2026-01-14 17:01:52 +00:00
ajurna 08a3c74a31 updating deps 2026-01-14 16:59:53 +00:00
ajurna e5086ec653 Add authentication and session management improvements
Build and push image / deploy (push) Has been cancelled
Introduce navigation guards for authentication and admin access within routes. Replace localStorage usage with secure token storage via httpOnly cookies, and add token blacklisting upon logout. Enhance token refresh mechanism and session expiration handling to improve security and user experience.
2025-05-21 22:53:29 +01:00
ajurna dd5817419b Remove ThePdfReader.vue and migrate PDF handling to pymupdf
This commit removes the frontend component ThePdfReader.vue and replaces its functionality with a backend implementation based on pymupdf. Also includes package updates, refactors PDF archive handling, and adjusts security settings to support development on localhost.
2025-05-21 22:30:34 +01:00
ajurna b01eb60eeb security fixes
Build and push image / deploy (push) Has been cancelled
2025-04-04 08:35:10 +01:00
ajurna 306b237b01 security fixes 2025-04-04 08:21:10 +01:00
ajurna a7cb857c00 security fixes 2025-04-04 08:20:24 +01:00
ajurna 0adfba1275 fixes
Build and push image / deploy (push) Has been cancelled
2025-04-02 13:29:32 +01:00
ajurna 708df71220 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	.pre-commit-config.yaml
#	Dockerfile
#	frontend/package-lock.json
#	frontend/package.json
#	poetry.lock
#	pyproject.toml
2025-04-02 11:35:56 +01:00
ajurna 871f930727 update libs 2025-04-02 11:32:47 +01:00
ajurna f7c698cd64 updating deps 2024-05-03 15:45:47 +01:00
ajurna 9e514354c8 updating deps 2024-05-03 15:45:36 +01:00
ajurna 3ae5b6b23b updating deps
Build and push image / deploy (push) Has been cancelled
2024-04-15 16:23:56 +01:00
ajurna 50d46ab835 updating deps
Build and push image / deploy (push) Has been cancelled
2023-10-13 10:17:44 +01:00
Peter Dwyer 40bd6f7e7f fixing build
Build and push image / deploy (push) Successful in 3m30s
2023-08-29 11:54:46 +01:00
Peter Dwyer d46517745e fixing build 2023-08-29 11:43:54 +01:00
Peter Dwyer a7206bb7f8 fixing build
Build and push image / deploy (push) Successful in 26m40s
2023-08-29 10:56:58 +01:00
Peter Dwyer df0caf709e updating deps
Build and push image / deploy (push) Failing after 19m14s
2023-08-29 08:53:37 +01:00
Peter Dwyer 7049f3fa3b updating deps
Build and push image / deploy (push) Failing after 19m14s
2023-08-28 16:22:37 +01:00
Peter Dwyer a540cb7efd updating deps
Build and push image / deploy (push) Failing after 3m15s
2023-08-28 15:54:11 +01:00
Peter Dwyer 7531e5b1fc updating deps 2023-08-28 15:53:50 +01:00
Peter Dwyer 8e5654db11 updating deps
Build and push image / deploy (push) Failing after 4m46s
2023-08-28 15:42:25 +01:00
Peter Dwyer 4e45374365 updating deps
Build and push image / deploy (push) Has been cancelled
2023-08-28 15:33:45 +01:00
Peter Dwyer c303bca9d5 updating deps 2023-08-28 15:33:26 +01:00
Peter Dwyer 4d20e6042a updating deps 2023-08-28 15:32:27 +01:00
Peter Dwyer 3a3fd3c560 updating deps 2023-08-28 15:26:17 +01:00
Peter Dwyer 53e75ae660 working on builds
Build and push image / deploy (push) Successful in 24m14s
2023-08-28 14:40:10 +01:00
Peter Dwyer c3f2cb94aa working on builds
Build and push image / deploy (push) Successful in 1m3s
2023-08-28 14:36:56 +01:00
Peter Dwyer dad9c78344 working on builds
Build and push image / deploy (push) Successful in 1m21s
2023-08-28 14:34:56 +01:00
Peter Dwyer 9e361381ba working on builds
Build and push image / deploy (push) Successful in 1m7s
2023-08-28 14:27:48 +01:00
Peter Dwyer be293bf90f working on builds
Build and push image / deploy (push) Failing after 4m33s
2023-08-28 14:09:09 +01:00
Peter Dwyer bfa768405b working on builds
Build and push image / deploy (push) Failing after 4m0s
2023-08-28 14:02:42 +01:00
Peter Dwyer 95f3900089 working on builds
Build and push image / deploy (push) Failing after 4m8s
2023-08-28 13:55:14 +01:00
Peter Dwyer cd5ac1ce56 working on builds
Build and push image / deploy (push) Failing after 3m19s
2023-08-28 13:46:34 +01:00
Peter Dwyer d71a4e6f8d working on builds
Build and push image / deploy (push) Failing after 36s
2023-08-28 13:44:49 +01:00
Peter Dwyer b39342f751 working on builds
Build and push image / deploy (push) Failing after 3m32s
2023-08-28 13:40:00 +01:00
Peter Dwyer c115d0bb82 working on builds
Build and push image / deploy (push) Failing after 7s
2023-08-28 13:39:25 +01:00