From b11cf81bf98943fe841b00c6e2990afe3714f138 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Thu, 18 Apr 2024 20:27:43 -0600 Subject: [PATCH] crop the image and store online and in settings --- package-lock.json | 45 ++++++++++++++++++++++ package.json | 3 +- src/components/GiftedPhotoDialog.vue | 56 ++++++++++++++++++++++------ src/views/AccountViewView.vue | 13 +++++-- 4 files changed, 101 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index ca08fc893..ee6df906d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,6 +59,7 @@ "vue": "^3.4.21", "vue-axios": "^3.5.2", "vue-facing-decorator": "^3.0.4", + "vue-picture-cropper": "^0.7.0", "vue-qrcode-reader": "^5.5.3", "vue-router": "^4.3.0", "web-did-resolver": "^2.0.27" @@ -2369,6 +2370,14 @@ "node": ">=6.9.0" } }, + "node_modules/@bassist/utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@bassist/utils/-/utils-0.4.0.tgz", + "integrity": "sha512-aoFTl0jUjm8/tDZodP41wnEkvB+C5O9NFCuYN/ztL6jSUSsuBkXq90/1ifBm1XhV/zySHgLYlU1+tgo3XtQ+nA==", + "dependencies": { + "@withtypes/mime": "^0.1.2" + } + }, "node_modules/@bitauth/libauth": { "version": "1.19.1", "license": "MIT", @@ -9696,6 +9705,25 @@ } } }, + "node_modules/@withtypes/mime": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@withtypes/mime/-/mime-0.1.2.tgz", + "integrity": "sha512-PB9BfZGzwblUONJY0LiOwsHCA6uV3DIPj/w9ReekdHxPOl0VdUFgI5s4avKycuuq9Gf5Nz2ZPA2O36GAUzlMPA==", + "dependencies": { + "mime": "^3.0.0" + } + }, + "node_modules/@withtypes/mime/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@xmldom/xmldom": { "version": "0.7.13", "license": "MIT", @@ -11439,6 +11467,11 @@ "license": "SEE LICENSE IN LICENSE.md", "optional": true }, + "node_modules/cropperjs": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.6.1.tgz", + "integrity": "sha512-F4wsi+XkDHCOMrHMYjrTEE4QBOrsHHN5/2VsVAaRq8P7E5z7xQpT75S+f/9WikmBEailas3+yo+6zPIomW+NOA==" + }, "node_modules/cross-fetch": { "version": "4.0.0", "license": "MIT", @@ -21419,6 +21452,18 @@ "vue": "^3.0.0" } }, + "node_modules/vue-picture-cropper": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/vue-picture-cropper/-/vue-picture-cropper-0.7.0.tgz", + "integrity": "sha512-NF7+Dgso6d0GB16E5d/BbrcTIHm1VWz8dS3IjLhoBl+ZeC+yDA46CyJphQuO32SisaPmrKHN8VbiE2LgAfhnkQ==", + "dependencies": { + "@bassist/utils": "^0.4.0", + "cropperjs": "^1.6.1" + }, + "peerDependencies": { + "vue": ">=3.2.13" + } + }, "node_modules/vue-qrcode-reader": { "version": "5.5.3", "license": "MIT", diff --git a/package.json b/package.json index e0af68f28..b5b5a6ae5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "vite", "serve": "vite preview", "build": "VITE_GIT_HASH=`git log -1 --pretty=format:%h` vite build", - "lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src", + "lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src", "lint-fix": "eslint --ext .js,.ts,.vue --ignore-path .gitignore --fix src", "prebuild": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src && node sw_combine.js" }, @@ -62,6 +62,7 @@ "vue": "^3.4.21", "vue-axios": "^3.5.2", "vue-facing-decorator": "^3.0.4", + "vue-picture-cropper": "^0.7.0", "vue-qrcode-reader": "^5.5.3", "vue-router": "^4.3.0", "web-did-resolver": "^2.0.27" diff --git a/src/components/GiftedPhotoDialog.vue b/src/components/GiftedPhotoDialog.vue index 8fb17bf1d..6c388fd73 100644 --- a/src/components/GiftedPhotoDialog.vue +++ b/src/components/GiftedPhotoDialog.vue @@ -20,28 +20,54 @@
- +
-
+
+ + +
+
+
+ +
+
+
+
+
-
- -