diff --git a/client/package.json b/client/package.json index 433ab715..6ab172f1 100644 --- a/client/package.json +++ b/client/package.json @@ -12,47 +12,43 @@ "tailwind": "tailwindcss -i tailwind.css -o ../server/vbv_lernwelt/static/css/tailwind.css --watch" }, "dependencies": { - "@headlessui/vue": "^1.6.4", + "@headlessui/vue": "^1.6.7", "axios": "^0.26.1", - "d3": "^7.4.4", + "d3": "^7.6.1", "loglevel": "^1.8.0", - "pinia": "^2.0.13", - "underscore": "^1.13.4", - "vue": "^3.2.31", - "vue-i18n": "^9.1.9", - "vue-router": "^4.0.14" + "pinia": "^2.0.21", + "vue": "^3.2.38", + "vue-i18n": "^9.2.2", + "vue-router": "^4.1.5" }, "devDependencies": { - "@intlify/vite-plugin-vue-i18n": "^3.4.0", "@rollup/plugin-alias": "^3.1.9", - "@rushstack/eslint-patch": "^1.1.0", + "@rushstack/eslint-patch": "^1.1.4", "@tailwindcss/forms": "^0.5.2", "@tailwindcss/typography": "^0.5.4", - "@testing-library/vue": "^6.6.0", + "@testing-library/vue": "^6.6.1", "@types/d3": "^7.4.0", - "@types/jsdom": "^16.2.14", - "@types/node": "^16.11.26", - "@vitejs/plugin-vue": "^2.3.1", + "@types/jsdom": "^20.0.0", + "@types/node": "^18.7.14", + "@vitejs/plugin-vue": "^3.0.3", "@vue/eslint-config-prettier": "^7.0.0", - "@vue/eslint-config-typescript": "^10.0.0", - "@vue/test-utils": "^2.0.0-rc.18", + "@vue/eslint-config-typescript": "^11.0.0", + "@vue/test-utils": "^2.0.2", "@vue/tsconfig": "^0.1.3", - "autoprefixer": "^10.4.7", - "cypress": "^9.5.3", - "eslint": "^8.5.0", - "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-vue": "^8.2.0", - "happy-dom": "^5.3.1", + "autoprefixer": "^10.4.8", + "eslint": "^8.23.0", + "eslint-plugin-vue": "^9.4.0", + "jsdom": "^20.0.0", "postcss": "^8.4.14", "postcss-import": "^14.1.0", - "prettier": "^2.5.1", - "sass": "^1.50.1", + "prettier": "^2.7.1", + "sass": "^1.54.6", "sass-loader": "^12.6.0", "start-server-and-test": "^1.14.0", - "tailwindcss": "^3.1.4", - "typescript": "~4.6.3", - "vite": "^2.9.1", - "vitest": "^0.15.1", - "vue-tsc": "^0.33.9" + "tailwindcss": "^3.1.8", + "typescript": "^4.8.2", + "vite": "^3.0.9", + "vitest": "^0.22.1", + "vue-tsc": "^0.40.4" } } diff --git a/client/src/components/circle/CircleDiagram.vue b/client/src/components/circle/CircleDiagram.vue index f9d4b8b5..49e80cba 100644 --- a/client/src/components/circle/CircleDiagram.vue +++ b/client/src/components/circle/CircleDiagram.vue @@ -36,8 +36,8 @@ const pieData = computed(() => { if (circle) { console.log('initial of compute pie data ', circle) - let pieWeights = new Array(Math.max(circle.learningSequences.length, 1)).fill(1) - let pieGenerator = d3.pie() + const pieWeights = new Array(Math.max(circle.learningSequences.length, 1)).fill(1) + const pieGenerator = d3.pie() let angles = pieGenerator(pieWeights) _.forEach(angles, (pie) => { const thisLearningSequence = circle.learningSequences[parseInt(pie.index)] @@ -214,7 +214,7 @@ function render() { // remove last arrow d3.selection.prototype.last = function () { - let last = this.size() - 1; + const last = this.size() - 1; return d3.select(this.nodes()[last]); }; diff --git a/client/src/components/circle/LearningPathDiagram.vue b/client/src/components/circle/LearningPathDiagram.vue index 9d70576f..8f83ed31 100644 --- a/client/src/components/circle/LearningPathDiagram.vue +++ b/client/src/components/circle/LearningPathDiagram.vue @@ -49,11 +49,11 @@ export default { } if (this.learningPathStore.learningPath) { - let internalCircles = [] + const internalCircles = [] this.learningPathStore.learningPath.circles.forEach((circle) => { const pieWeights = new Array(Math.max(circle.learningSequences.length, 1)).fill(1) const pieGenerator = d3.pie() - let pieData = pieGenerator(pieWeights) + const pieData = pieGenerator(pieWeights) pieData.forEach((pie) => { const thisLearningSequence = circle.learningSequences[parseInt(pie.index)] pie.startAngle = pie.startAngle + Math.PI @@ -62,7 +62,7 @@ export default { pie.someFinished = someFinished(circle, thisLearningSequence) pie.allFinished = allFinished(circle, thisLearningSequence) }); - let newCircle = {} + const newCircle = {} newCircle.pieData = pieData.reverse() newCircle.title = circle.title newCircle.slug = circle.slug @@ -109,7 +109,7 @@ export default { return color } - let vueRouter = this.$router + const vueRouter = this.$router // Create append pie charts to the main svg @@ -201,7 +201,7 @@ export default { let pos = topicHeightOffset for (let index = 0; index < i; index++) { - let topic = topics[index] + const topic = topics[index] if (topic.is_visible) { pos += topicHeight } @@ -218,7 +218,7 @@ export default { y += topicHeight } for (let circle_index = 0; circle_index < topic.circles.length; circle_index++) { - let circle = topic.circles[circle_index] + const circle = topic.circles[circle_index] if (circle.id === d.id) { return y } @@ -283,7 +283,7 @@ export default { } else { circle_groups .attr('transform', (d, i) => { - let x_coord = (i + 1) * circleWidth - radius + const x_coord = (i + 1) * circleWidth - radius return 'translate(' + x_coord + ', 200)' }) diff --git a/env_secrets/local_chrigu.env b/env_secrets/local_chrigu.env index 2e103689..5012ac7d 100644 Binary files a/env_secrets/local_chrigu.env and b/env_secrets/local_chrigu.env differ diff --git a/env_secrets/local_daniel.env b/env_secrets/local_daniel.env index 2cbf413e..4127d960 100644 Binary files a/env_secrets/local_daniel.env and b/env_secrets/local_daniel.env differ diff --git a/env_secrets/local_lorenz.env b/env_secrets/local_lorenz.env index 4104dedb..f51a1170 100644 Binary files a/env_secrets/local_lorenz.env and b/env_secrets/local_lorenz.env differ diff --git a/server/config/settings/base.py b/server/config/settings/base.py index e6b7b7da..8be507d0 100644 --- a/server/config/settings/base.py +++ b/server/config/settings/base.py @@ -133,7 +133,7 @@ AUTH_USER_MODEL = "core.User" LOGIN_URL = "/login" LOGIN_REDIRECT_URL = "/" -ALLOW_LOCAL_LOGIN = env.bool("IT_ALLOW_LOCAL_LOGIN", default=False) +ALLOW_LOCAL_LOGIN = env.bool("IT_ALLOW_LOCAL_LOGIN", default=DEBUG) # PASSWORDS # ------------------------------------------------------------------------------ @@ -200,7 +200,7 @@ MEDIA_ROOT = str(APPS_DIR / "media") MEDIA_URL = "/media/" IT_SERVE_VUE = env.bool("IT_SERVE_VUE", DEBUG) -IT_SERVE_VUE_URL = env("IT_SERVE_VUE_URL", 'http://localhost:3000') +IT_SERVE_VUE_URL = env("IT_SERVE_VUE_URL", 'http://localhost:5173') # WAGTAIL # ------------------------------------------------------------------------------ @@ -454,7 +454,7 @@ REST_FRAMEWORK = { CORS_URLS_REGEX = r"^/api/.*$" # django-csp -CSP_DEFAULT_SRC = ("'self'", "'unsafe-inline'", 'ws://localhost:3000', 'localhost:8000', 'blob:', 'data:', 'http://*') +CSP_DEFAULT_SRC = ("'self'", "'unsafe-inline'", 'ws://localhost:5173', 'localhost:8000', 'blob:', 'data:', 'http://*') CSP_FRAME_ANCESTORS = ("'self'",) # By Default swagger ui is available only to admin user. You can change permission classs to change that