From 251986d2bce4987f21269222ea634964416f4a69 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Thu, 14 Mar 2024 19:44:11 -0600 Subject: [PATCH] make the photo show in a pop-up dialog --- .env.development | 1 + project.task.yaml | 10 +- src/components/GiftedDialog.vue | 2 +- .../GiftedPhotoDialog.vue} | 121 +++++++++++------- src/router/index.ts | 6 - src/views/GiftedDetails.vue | 35 +++-- 6 files changed, 106 insertions(+), 69 deletions(-) rename src/{views/GiftedPhoto.vue => components/GiftedPhotoDialog.vue} (61%) diff --git a/.env.development b/.env.development index 9f3db16..1b16ad6 100644 --- a/.env.development +++ b/.env.development @@ -2,4 +2,5 @@ # this won't resolve as a URL on production; it's a URN only found in the test system VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK +VUE_APP_DEFAULT_ENDORSER_API_SERVER=http://localhost:3000 VUE_APP_DEFAULT_IMAGE_API_SERVER=http://localhost:3001 diff --git a/project.task.yaml b/project.task.yaml index 4d3115b..fff66e0 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -14,12 +14,10 @@ tasks : - .2 list the "show more" contacts alphabetically - 32 image on give : - - send image type (eg. portrait, give, project) - - upload to a public readable place at correct hosting location - - remove previous image when editing - - on gift details, if project then show, otherwise mark "gift for you" - - ping endpoint - - limits endpoint + - ping endpoint + - limits endpoint + - upload a photo from elsewhere + - go-live - create cert for new image domain, set up haproxy redirect - 08 image on profile diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index ed40fa3..c3da28e 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -25,7 +25,7 @@
- -
+
-
+

- +

@@ -19,46 +18,46 @@ Look Good? Say "Cheese"! -
-
- -
-
-
- - +
+
- -
-
- - -
- +
+
+
- + +
+
+ + +
+ + +
+
+
-
+
+ + diff --git a/src/router/index.ts b/src/router/index.ts index c817516..4f3e9fe 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -92,12 +92,6 @@ const routes: Array = [ /* webpackChunkName: "gifted-details" */ "../views/GiftedDetails.vue" ), }, - { - path: "/gifted-photo", - name: "gifted-photo", - component: () => - import(/* webpackChunkName: "gifted-photo" */ "../views/GiftedPhoto.vue"), - }, { path: "/help", name: "help", diff --git a/src/views/GiftedDetails.vue b/src/views/GiftedDetails.vue index f7c2fc7..570d411 100644 --- a/src/views/GiftedDetails.vue +++ b/src/views/GiftedDetails.vue @@ -40,7 +40,7 @@
This is given to a project
-
- - Includes Image: - View +
+ + + + - - - +
+
@@ -114,9 +115,13 @@ import { MASTER_SETTINGS_KEY, Settings } from "@/db/tables/settings"; import { createAndSubmitGive } from "@/libs/endorserServer"; import * as libsUtil from "@/libs/util"; import { accessToken } from "@/libs/crypto"; +import GiftedDialog from "@/components/GiftedDialog.vue"; +import GiftedPhotoDialog from "@/components/GiftedPhotoDialog.vue"; @Component({ components: { + GiftedDialog, + GiftedPhotoDialog, QuickNav, TopMessage, }, @@ -198,6 +203,12 @@ export default class GiftedDetails extends Vue { this.$router.back(); } + openPhotoDialog() { + (this.$refs.photoDialog as GiftedPhotoDialog).open((imgUrl) => { + this.imageUrl = imgUrl; + }); + } + confirmDeleteImage() { this.$notify( {