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
This commit is contained in:
Ferdinand Thiessen 2020-11-16 13:36:55 +01:00
parent 939dde3651
commit 1471f1a660
4 changed files with 6 additions and 11 deletions

11
package-lock.json generated
View File

@ -2009,9 +2009,9 @@
} }
}, },
"@types/webpack": { "@types/webpack": {
"version": "4.41.24", "version": "4.41.25",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.24.tgz", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.25.tgz",
"integrity": "sha512-1A0MXPwZiMOD3DPMuOKUKcpkdPo8Lq33UGggZ7xio6wJ/jV1dAu5cXDrOfGDnldUroPIRLsr/DT43/GqOA4RFQ==", "integrity": "sha512-cr6kZ+4m9lp86ytQc1jPOJXgINQyz3kLLunZ57jznW+WIAL0JqZbGubQk4GlD42MuQL5JGOABrxdpqqWeovlVQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/anymatch": "*", "@types/anymatch": "*",
@ -4407,11 +4407,6 @@
"randomfill": "^1.0.3" "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": { "css": {
"version": "2.2.4", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz",

View File

@ -15,14 +15,13 @@
"@vue/composition-api": "^0.6.4", "@vue/composition-api": "^0.6.4",
"axios": "^0.18.1", "axios": "^0.18.1",
"core-js": "^3.7.0", "core-js": "^3.7.0",
"crypto-js": "^4.0.0",
"quasar": "^1.14.3", "quasar": "^1.14.3",
"vue-router": "3.3.2" "vue-router": "3.3.2"
}, },
"devDependencies": { "devDependencies": {
"@quasar/app": "^2.1.6", "@quasar/app": "^2.1.6",
"@types/node": "^10.17.44", "@types/node": "^10.17.44",
"@types/webpack": "^4.41.24", "@types/webpack": "^4.41.25",
"@types/webpack-env": "^1.15.3", "@types/webpack-env": "^1.15.3",
"@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0", "@typescript-eslint/parser": "^3.3.0",

View File

@ -28,7 +28,6 @@ import {
} from '@vue/composition-api'; } from '@vue/composition-api';
import { Store } from 'vuex'; import { Store } from 'vuex';
import { StateInterface } from 'src/store'; import { StateInterface } from 'src/store';
import MD5 from 'crypto-js/md5';
export default defineComponent({ export default defineComponent({
name: 'Greeting', name: 'Greeting',

View File

@ -64,6 +64,8 @@
filled filled
label="Avatar" label="Avatar"
accept=".jpg, image/*" accept=".jpg, image/*"
max-file-size="204800"
hint="Bilddateien, max. 200 KiB"
@rejected="onAvatarRejected" @rejected="onAvatarRejected"
> >
<template v-slot:append> <template v-slot:append>