From 1471f1a660eafe003fe119ede2da8bd812bad1f0 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 16 Nov 2020 13:36:55 +0100 Subject: [PATCH] Limit avatar size and cleanup dependencies * Limit avatar size to 200 KiB (really no body needs 4K resolution avatars * Dropped cryptojs dependency as we do not use gravatar anymore --- package-lock.json | 11 +++-------- package.json | 3 +-- src/plugins/user/components/Widget.vue | 1 - .../user/components/settings/MainUserSettings.vue | 2 ++ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7940094..0ff236a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2009,9 +2009,9 @@ } }, "@types/webpack": { - "version": "4.41.24", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.24.tgz", - "integrity": "sha512-1A0MXPwZiMOD3DPMuOKUKcpkdPo8Lq33UGggZ7xio6wJ/jV1dAu5cXDrOfGDnldUroPIRLsr/DT43/GqOA4RFQ==", + "version": "4.41.25", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz", + "integrity": "sha512-cr6kZ+4m9lp86ytQc1jPOJXgINQyz3kLLunZ57jznW+WIAL0JqZbGubQk4GlD42MuQL5JGOABrxdpqqWeovlVQ==", "dev": true, "requires": { "@types/anymatch": "*", @@ -4407,11 +4407,6 @@ "randomfill": "^1.0.3" } }, - "crypto-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", - "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" - }, "css": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", diff --git a/package.json b/package.json index 37033b5..af9affb 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,13 @@ "@vue/composition-api": "^0.6.4", "axios": "^0.18.1", "core-js": "^3.7.0", - "crypto-js": "^4.0.0", "quasar": "^1.14.3", "vue-router": "3.3.2" }, "devDependencies": { "@quasar/app": "^2.1.6", "@types/node": "^10.17.44", - "@types/webpack": "^4.41.24", + "@types/webpack": "^4.41.25", "@types/webpack-env": "^1.15.3", "@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/parser": "^3.3.0", diff --git a/src/plugins/user/components/Widget.vue b/src/plugins/user/components/Widget.vue index 6d32f87..ffd68a5 100644 --- a/src/plugins/user/components/Widget.vue +++ b/src/plugins/user/components/Widget.vue @@ -28,7 +28,6 @@ import { } from '@vue/composition-api'; import { Store } from 'vuex'; import { StateInterface } from 'src/store'; -import MD5 from 'crypto-js/md5'; export default defineComponent({ name: 'Greeting', diff --git a/src/plugins/user/components/settings/MainUserSettings.vue b/src/plugins/user/components/settings/MainUserSettings.vue index a6fe1fe..d386e48 100644 --- a/src/plugins/user/components/settings/MainUserSettings.vue +++ b/src/plugins/user/components/settings/MainUserSettings.vue @@ -64,6 +64,8 @@ filled label="Avatar" accept=".jpg, image/*" + max-file-size="204800" + hint="Bilddateien, max. 200 KiB" @rejected="onAvatarRejected" >