From c49c55d3943ec3bd0b8ee1fbf5425dfcd5b54654 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 18 Mar 2024 22:20:02 -0600 Subject: [PATCH 1/5] change the photo ratios to fix all but portrait-orientation on mobile-emulation --- CHANGELOG.md | 2 +- README.md | 2 +- package-lock.json | 4 +- package.json | 2 +- project.task.yaml | 2 + src/components/GiftedPhotoDialog.vue | 105 +++++++++++++++++++++++++-- 6 files changed, 107 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 173594a..c0e1cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Nothing -## [0.3.2] - 2024.03.17 +## [0.3.3] - 2024.03.18 ### Added - Photo on gift record ### Fixed diff --git a/README.md b/README.md index 3f61d47..d1f9390 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ npm run lint ``` # (See .env.development for more details.) # The test BVC_MEETUPS_PROJECT_CLAIM_ID does not resolve as a URL because it's only in the test DB and the prod redirect won't redirect there. -APP_TITLE="TimeSafari_Test" VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK VUE_APP_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch VUE_APP_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app npm run build +TIME_SAFARI_APP_TITLE="TimeSafari_Test" VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK VUE_APP_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch VUE_APP_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app npm run build ``` * Production diff --git a/package-lock.json b/package-lock.json index 127407d..660e9ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.2", + "version": "0.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.2", + "version": "0.3.3", "dependencies": { "@dicebear/collection": "^5.3.5", "@dicebear/core": "^5.3.5", diff --git a/package.json b/package.json index e118d37..3a6602d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.2", + "version": "0.3.3", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/project.task.yaml b/project.task.yaml index 7fbfd55..abce2b1 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -1,6 +1,8 @@ tasks : +- bug - landscape doesn't show full camera +- but - portrait stretches pic - bug maybe - a new give remembers the previous project - alert & stop if give amount < 0 - onboarding video diff --git a/src/components/GiftedPhotoDialog.vue b/src/components/GiftedPhotoDialog.vue index 3278787..bb2e555 100644 --- a/src/components/GiftedPhotoDialog.vue +++ b/src/components/GiftedPhotoDialog.vue @@ -13,7 +13,7 @@ -

+

Uploading... Look Good? Say "Cheese"! @@ -30,6 +30,7 @@ > Upload + - +
+ +
-
- +
+ + + + + async cameraClicked() { + console.log("camera_button clicked"); + const video = document.querySelector("#video"); + const stream = await navigator.mediaDevices.getUserMedia({ + video: true, + audio: false, + }); + if (video instanceof HTMLVideoElement) { + video.srcObject = stream; + } + } + photoSnapped() { + const video = document.querySelector("#video"); + const canvas = document.querySelector("#canvas"); + console.log("snap_photo clicked"); + if ( + canvas instanceof HTMLCanvasElement && + video instanceof HTMLVideoElement + ) { + canvas + ?.getContext("2d") + ?.drawImage(video, 0, 0, canvas.width, canvas.height); + const image_data_url = canvas?.toDataURL("image/jpeg"); + + // data url of the image + console.log(image_data_url); + } + } + ****/ + async uploadImage() { this.uploading = true; const identifier = await getIdentity(this.activeDid); From a230506d963ac7fe32f7788ddf163efd7f3d5f24 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 19 Mar 2024 21:02:57 -0600 Subject: [PATCH 2/5] change the X and picture button so that landscape is all functional (if not great-looking) --- project.task.yaml | 4 ++- src/components/GiftedPhotoDialog.vue | 48 ++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/project.task.yaml b/project.task.yaml index abce2b1..a3167c4 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -3,6 +3,7 @@ tasks : - bug - landscape doesn't show full camera - but - portrait stretches pic +- add to readme - check version, close tabs & restart phone if necessary - bug maybe - a new give remembers the previous project - alert & stop if give amount < 0 - onboarding video @@ -57,7 +58,7 @@ tasks : - .1 hide project-create button on project page if not registered - .1 hide offer & give buttons on project list page if not registered - .1 add cursor-pointer on the icons for giving on the project page, and on the list of projects on the discover page -- .2 record when InfiniteScroll hits the end of the list and don't trigger any more loads +- .2 record when InfiniteScroll hits the end of the list and don't trigger any more loads (feed, project list, give & offer lists) - bug - turning notifications on from the help screen did not stay, though account screen toggle did stay (From Jason on iPhone.) - refactor - supply the projectId to the OfferDialog just like we do with the GiftedDialog offerId (in the "open" method, maybe as well as an attribute) @@ -121,6 +122,7 @@ tasks : - .5 show seed phrase in a QR code for transfer to another device - .5 on DiscoverView, switch to a filter UI (eg. just from friend - .5 don't show "Offer" on project screen if they aren't registered +- 01 especially for iOS, check for new version & update, eg. https://stackoverflow.com/questions/52221805/any-way-yet-to-auto-update-or-just-clear-the-cache-on-a-pwa-on-ios - 24 Move to Vite - 32 accept images for projects diff --git a/src/components/GiftedPhotoDialog.vue b/src/components/GiftedPhotoDialog.vue index bb2e555..b712c68 100644 --- a/src/components/GiftedPhotoDialog.vue +++ b/src/components/GiftedPhotoDialog.vue @@ -1,15 +1,13 @@