16 Commits

Author SHA1 Message Date
dependabot[bot]
f083936aad Bump certifi from 2022.12.7 to 2023.7.22
Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.12.7 to 2023.7.22.
- [Commits](https://github.com/certifi/python-certifi/compare/2022.12.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 21:11:56 +00:00
dependabot[bot]
bccbff8b33 Bump sqlparse from 0.4.3 to 0.4.4 (#93)
Bumps [sqlparse](https://github.com/andialbrecht/sqlparse) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/andialbrecht/sqlparse/releases)
- [Changelog](https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG)
- [Commits](https://github.com/andialbrecht/sqlparse/compare/0.4.3...0.4.4)

---
updated-dependencies:
- dependency-name: sqlparse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ajurna <ajurna@gmail.com>
2023-05-23 08:50:16 +01:00
dependabot[bot]
05e3db9e42 Bump django from 4.1.7 to 4.1.9 (#94)
Bumps [django](https://github.com/django/django) from 4.1.7 to 4.1.9.
- [Commits](https://github.com/django/django/compare/4.1.7...4.1.9)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ajurna <ajurna@gmail.com>
2023-05-23 08:48:02 +01:00
dependabot[bot]
a47153b917 Bump requests from 2.28.2 to 2.31.0 (#95)
Bumps [requests](https://github.com/psf/requests) from 2.28.2 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.2...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 08:45:45 +01:00
dependabot[bot]
df01235325 Bump webpack from 5.75.0 to 5.76.0 in /frontend (#92)
Bumps [webpack](https://github.com/webpack/webpack) from 5.75.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 15:54:34 +01:00
Peter Dwyer
7d20447526 library bumps
version bump.
2023-02-16 09:55:32 +00:00
Peter Dwyer
0dfe551b66 library bumps
version bump.
2023-02-16 09:36:50 +00:00
Peter Dwyer
94171ec548 library bumps
version bump.
2023-02-07 14:44:12 +00:00
Peter Dwyer
1fbe359448 library bumps
fix for LoginView.vue reloading instead of logging in.
improved errors for login failing
misc cleanup.
2023-02-07 14:39:26 +00:00
Peter Dwyer
84eec0c0bf library bumps 2022-11-16 10:02:20 +00:00
Peter Dwyer
ac83abaa97 library bumps 2022-11-16 09:58:37 +00:00
dependabot[bot]
ef03651ace Bump loader-utils from 1.4.0 to 1.4.1 in /frontend (#80)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 09:14:37 +00:00
Snyk bot
e39ae6847d fix: requirements.txt to reduce vulnerabilities (#81)
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-SETUPTOOLS-3113904
2022-11-16 09:14:25 +00:00
dependabot[bot]
970b56b126 Bump pillow from 9.2.0 to 9.3.0 (#82)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.2.0 to 9.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.2.0...9.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 09:14:10 +00:00
5ea87fe9b7 update pre-commit 2022-10-04 22:28:05 +01:00
a97abe4557 update pre-commit 2022-10-04 22:26:14 +01:00
10 changed files with 2770 additions and 11473 deletions

View File

@@ -9,11 +9,11 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/python-poetry/poetry
rev: '1.2.0rc1' # add version here
rev: '1.2.1' # add version here
hooks:
- id: poetry-check
- id: poetry-export
args: ["--without-hashes", "-f", "requirements.txt", "-o", "requirements.txt"]
args: ["--without-hashes", "-o", "requirements.txt"]
- repo: https://github.com/pycqa/flake8
rev: "5.0.4"
hooks:

View File

@@ -2,5 +2,5 @@
max-line-length=120
ignore-paths=.*/migrations
load-plugins = pylint_django
disable = missing-class-docstring,missing-function-docstring,abstract-method,missing-module-docstring,imported-auth-user
disable = missing-class-docstring,missing-function-docstring,abstract-method,missing-module-docstring,imported-auth-user,missing-docstring
good-names=pk

10686
frontend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
"vue-toast-notification": "3.0",
"vuejs-paginate-next": "^1.0.2",
"vuex": "^4.0.0",
"webpack": "^5.74.0"
"webpack": "^5.76.0"
},
"devDependencies": {
"@babel/core": "^7.12.16",

View File

@@ -8,7 +8,7 @@ async function get_access_token() {
let refresh = jwtDecode(store.state.jwt.refresh)
if (access.exp - Date.now()/1000 < 5) {
if (refresh.exp - Date.now()/1000 < 5) {
await router.push({name: 'login', params: { username: 'eduardo' }})
await router.push({name: 'login'})
return null
} else {
return store.dispatch('refreshToken').then(() => {return store.state.jwt.access})
@@ -22,9 +22,9 @@ const axios_jwt = axios.create();
axios_jwt.interceptors.request.use(async function (config) {
let access_token = await get_access_token().catch(() => {
if (router.currentRoute.value.fullPath.includes('login')){
router.push({name: 'login'})
router.push({name: 'login'})
}else {
router.push({name: 'login', query: { next: router.currentRoute.value.fullPath }})
router.push({name: 'login', query: { next: router.currentRoute.value.fullPath }})
}
})
@@ -32,9 +32,9 @@ axios_jwt.interceptors.request.use(async function (config) {
Authorization: "Bearer " + access_token
}
return config
}, function (error) {
}, function (error) {
// Do something with request error
return Promise.reject(error);
});
});
export default axios_jwt

View File

@@ -73,14 +73,22 @@ export default createStore({
if ('next' in router.currentRoute.value.query) {
router.push(router.currentRoute.value.query.next)
} else {
router.push('/')
router.push('browse')
}
})
.catch((error)=>{
// console.log(error);
const $toast = useToast();
$toast.error(error.response.data.detail, {position:'top'});
if (error.response.data.detail) {
$toast.error(error.response.data.detail, {position:'top'});
}
if (error.response.data.username) {
$toast.error("Username: " + error.response.data.username, {position:'top'});
}
if (error.response.data.password) {
$toast.error("Password: " + error.response.data.password, {position:'top'});
}
})
},
refreshToken(){

View File

@@ -3,7 +3,7 @@
<div class="row" v-if="!initialSetupRequired">
<div class="col col-lg-4" />
<div class="col col-lg-4" id="login-col">
<form @submit="login">
<form @submit="login" v-on:submit.prevent="onSubmit">
<label class="form-label" for="username">Username</label>
<input id="username" placeholder="username" aria-describedby="loginFormControlInputHelpInline" class="form-control" type="text" v-model="username" />
<div class="form-text" id="loginFormControlInputHelpInline">Please enter your username</div>

3436
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,14 +3,14 @@ line_length = 119
[tool.poetry]
name = "cbwebreader"
version = "1.1.1"
version = "1.1.5"
description = "CBR/Z Web Reader"
authors = ["ajurna <ajurna@gmail.com>"]
license = "Creative Commons Attribution-ShareAlike 4.0 International License"
[tool.poetry.dependencies]
python = "^3.10"
Django = "4.1.1"
Django = "^4.1"
gunicorn = "^20.0.4"
dj-database-url = "^1.0.0"
python-dotenv = "^0.21.0"
@@ -20,7 +20,7 @@ mysqlclient = "^2.0.1"
psycopg2 = "^2.8.6"
rarfile = "^4.0"
django-extensions = "^3.2.1"
Pillow = "^9.1.1"
Pillow = "^9.3.0"
django-imagekit = "^4.0.2"
PyMuPDF = "~1.20.2"
django-bootstrap4 = "^22.1"
@@ -35,16 +35,16 @@ djangorestframework-simplejwt = "^5.2.0"
django-webpack-loader = "^1.6.0"
drf-yasg = "^1.20.0"
drf-extensions = "^0.7.1"
flake8 = "^5.0.4"
flake8-annotations = "^2.9.1"
[tool.poetry.dev-dependencies]
mypy = "^0.971"
mypy = "^1.0.0"
Werkzeug = "^2.2"
pyOpenSSL = "^22.0.0"
ipython = "^8.4.0"
coverage = "^6.2"
pre-commit = "^2.20.0"
coverage = "^7.1.0"
pre-commit = "^3.0.4"
flake8 = "^6.0.0"
flake8-annotations = "^3.0.0"
[tool.poetry.group.dev.dependencies]
pylint = "^2.15.0"

View File

@@ -1,32 +1,29 @@
asgiref==3.5.2 ; python_version >= "3.10" and python_version < "4.0"
attrs==22.1.0 ; python_version >= "3.10" and python_version < "4.0"
autopep8==1.7.0 ; python_version >= "3.10" and python_version < "4.0"
beautifulsoup4==4.11.1 ; python_version >= "3.10" and python_version < "4.0"
certifi==2022.9.14 ; python_version >= "3.10" and python_version < "4"
charset-normalizer==2.1.1 ; python_version >= "3.10" and python_version < "4"
colorama==0.4.5 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
asgiref==3.6.0 ; python_version >= "3.10" and python_version < "4.0"
autopep8==2.0.1 ; python_version >= "3.10" and python_version < "4.0"
beautifulsoup4==4.11.2 ; python_version >= "3.10" and python_version < "4.0"
certifi==2022.12.7 ; python_version >= "3.10" and python_version < "4"
charset-normalizer==3.0.1 ; python_version >= "3.10" and python_version < "4"
colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
coreapi==2.3.3 ; python_version >= "3.10" and python_version < "4.0"
coreschema==0.0.4 ; python_version >= "3.10" and python_version < "4.0"
dj-database-url==1.0.0 ; python_version >= "3.10" and python_version < "4.0"
dj-database-url==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
django-appconf==1.0.5 ; python_version >= "3.10" and python_version < "4.0"
django-boost==2.1 ; python_version >= "3.10" and python_version < "4.0"
django-bootstrap4==22.2 ; python_version >= "3.10" and python_version < "4.0"
django-bootstrap4==22.3 ; python_version >= "3.10" and python_version < "4.0"
django-cors-headers==3.13.0 ; python_version >= "3.10" and python_version < "4.0"
django-csp==3.7 ; python_version >= "3.10" and python_version < "4.0"
django-extensions==3.2.1 ; python_version >= "3.10" and python_version < "4.0"
django-filter==22.1 ; python_version >= "3.10" and python_version < "4.0"
django-imagekit==4.1.0 ; python_version >= "3.10" and python_version < "4.0"
django-permissions-policy==4.13.0 ; python_version >= "3.10" and python_version < "4.0"
django-silk==5.0.1 ; python_version >= "3.10" and python_version < "4.0"
django-permissions-policy==4.14.0 ; python_version >= "3.10" and python_version < "4.0"
django-silk==5.0.3 ; python_version >= "3.10" and python_version < "4.0"
django-sri==0.5.0 ; python_version >= "3.10" and python_version < "4.0"
django-webpack-loader==1.6.0 ; python_version >= "3.10" and python_version < "4.0"
django==4.1.1 ; python_version >= "3.10" and python_version < "4.0"
djangorestframework-simplejwt==5.2.0 ; python_version >= "3.10" and python_version < "4.0"
djangorestframework==3.13.1 ; python_version >= "3.10" and python_version < "4.0"
django-webpack-loader==1.8.1 ; python_version >= "3.10" and python_version < "4.0"
django==4.1.7 ; python_version >= "3.10" and python_version < "4.0"
djangorestframework-simplejwt==5.2.2 ; python_version >= "3.10" and python_version < "4.0"
djangorestframework==3.14.0 ; python_version >= "3.10" and python_version < "4.0"
drf-extensions==0.7.1 ; python_version >= "3.10" and python_version < "4.0"
drf-yasg==1.21.3 ; python_version >= "3.10" and python_version < "4.0"
flake8-annotations==2.9.1 ; python_version >= "3.10" and python_version < "4.0"
flake8==5.0.4 ; python_version >= "3.10" and python_version < "4.0"
drf-yasg==1.21.5 ; python_version >= "3.10" and python_version < "4.0"
gprof2dot==2022.7.29 ; python_version >= "3.10" and python_version < "4.0"
gunicorn==20.1.0 ; python_version >= "3.10" and python_version < "4.0"
idna==3.4 ; python_version >= "3.10" and python_version < "4"
@@ -34,33 +31,29 @@ inflection==0.5.1 ; python_version >= "3.10" and python_version < "4.0"
itypes==1.2.0 ; python_version >= "3.10" and python_version < "4.0"
jinja2==3.1.2 ; python_version >= "3.10" and python_version < "4.0"
loguru==0.6.0 ; python_version >= "3.10" and python_version < "4.0"
markupsafe==2.1.1 ; python_version >= "3.10" and python_version < "4.0"
mccabe==0.7.0 ; python_version >= "3.10" and python_version < "4.0"
markupsafe==2.1.2 ; python_version >= "3.10" and python_version < "4.0"
mysqlclient==2.1.1 ; python_version >= "3.10" and python_version < "4.0"
packaging==21.3 ; python_version >= "3.10" and python_version < "4.0"
packaging==23.0 ; python_version >= "3.10" and python_version < "4.0"
pilkit==2.0 ; python_version >= "3.10" and python_version < "4.0"
pillow==9.2.0 ; python_version >= "3.10" and python_version < "4.0"
psycopg2==2.9.3 ; python_version >= "3.10" and python_version < "4.0"
pycodestyle==2.9.1 ; python_version >= "3.10" and python_version < "4.0"
pyflakes==2.5.0 ; python_version >= "3.10" and python_version < "4.0"
pyjwt==2.4.0 ; python_version >= "3.10" and python_version < "4.0"
pillow==9.4.0 ; python_version >= "3.10" and python_version < "4.0"
psycopg2==2.9.5 ; python_version >= "3.10" and python_version < "4.0"
pycodestyle==2.10.0 ; python_version >= "3.10" and python_version < "4.0"
pyjwt==2.6.0 ; python_version >= "3.10" and python_version < "4.0"
pymupdf==1.20.2 ; python_version >= "3.10" and python_version < "4.0"
pyparsing==3.0.9 ; python_version >= "3.10" and python_version < "4.0"
python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0"
python-dotenv==0.21.0 ; python_version >= "3.10" and python_version < "4.0"
pytz==2022.2.1 ; python_version >= "3.10" and python_version < "4.0"
python-dotenv==0.21.1 ; python_version >= "3.10" and python_version < "4.0"
pytz==2022.7.1 ; python_version >= "3.10" and python_version < "4.0"
rarfile==4.0 ; python_version >= "3.10" and python_version < "4.0"
requests==2.28.1 ; python_version >= "3.10" and python_version < "4"
ruamel-yaml-clib==0.2.6 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.10"
requests==2.28.2 ; python_version >= "3.10" and python_version < "4"
ruamel-yaml-clib==0.2.7 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.10"
ruamel-yaml==0.17.21 ; python_version >= "3.10" and python_version < "4.0"
setuptools==65.3.0 ; python_version >= "3.10" and python_version < "4.0"
setuptools==67.3.2 ; python_version >= "3.10" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.10" and python_version < "4.0"
soupsieve==2.3.2.post1 ; python_version >= "3.10" and python_version < "4.0"
sqlparse==0.4.2 ; python_version >= "3.10" and python_version < "4.0"
toml==0.10.2 ; python_version >= "3.10" and python_version < "4.0"
tzdata==2022.2 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
soupsieve==2.4 ; python_version >= "3.10" and python_version < "4.0"
sqlparse==0.4.3 ; python_version >= "3.10" and python_version < "4.0"
tomli==2.0.1 ; python_version >= "3.10" and python_version < "3.11"
tzdata==2022.7 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"
ua-parser==0.16.1 ; python_version >= "3.10" and python_version < "4.0"
uritemplate==4.1.1 ; python_version >= "3.10" and python_version < "4.0"
urllib3==1.26.12 ; python_version >= "3.10" and python_version < "4"
urllib3==1.26.14 ; python_version >= "3.10" and python_version < "4"
user-agents==2.2.0 ; python_version >= "3.10" and python_version < "4.0"
win32-setctime==1.1.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32"