From be010f77771365a54c6a29a965182a7f80a85234 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 12 Jan 2025 16:57:20 -0700 Subject: [PATCH 01/18] show warning about using nostr, and show errors if location was enabled but data is missing --- src/views/NewEditProjectView.vue | 95 +++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 27 deletions(-) diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index ee0fe46..0cb1593 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -152,11 +152,13 @@
+
@@ -408,13 +410,26 @@ export default class NewEditProjectView extends Vue { delete vcClaim.image; } if (this.includeLocation) { - vcClaim.location = { - geo: { - "@type": "GeoCoordinates", - latitude: this.latitude, - longitude: this.longitude, - }, - }; + if (!this.latitude || !this.longitude) { + this.$notify( + { + group: "alert", + type: "danger", + title: "Location Error", + text: "The location was invalid so it was not set.", + }, + 5000, + ); + delete vcClaim.location; + } else { + vcClaim.location = { + geo: { + "@type": "GeoCoordinates", + latitude: this.latitude, + longitude: this.longitude, + }, + }; + } } else { delete vcClaim.location; } @@ -431,7 +446,7 @@ export default class NewEditProjectView extends Vue { { group: "alert", type: "danger", - title: "Error", + title: "Date Error", text: "The date was invalid so it was not set.", }, 5000, @@ -455,26 +470,40 @@ export default class NewEditProjectView extends Vue { const projectPath = encodeURIComponent(resp.data.success.handleId); - let signedPayload: VerifiedEvent | undefined; // sign something to prove ownership of pubkey - if (this.sendToTrustroots) { - signedPayload = await this.signPayload(); - this.sendToNostrPartner( - "NOSTR-EVENT-TRUSTROOTS", - "Trustroots", - resp.data.success.claimId, - signedPayload, - ); - } - if (this.sendToTripHopping) { - if (!signedPayload) { - signedPayload = await this.signPayload(); + if (this.sendToTrustroots || this.sendToTripHopping) { + if (this.latitude && this.longitude) { + let signedPayload: VerifiedEvent | undefined; // sign something to prove ownership of pubkey + if (this.sendToTrustroots) { + signedPayload = await this.signPayload(); + this.sendToNostrPartner( + "NOSTR-EVENT-TRUSTROOTS", + "Trustroots", + resp.data.success.claimId, + signedPayload, + ); + } + if (this.sendToTripHopping) { + if (!signedPayload) { + signedPayload = await this.signPayload(); + } + this.sendToNostrPartner( + "NOSTR-EVENT-TRIPHOPPING", + "TripHopping", + resp.data.success.claimId, + signedPayload, + ); + } + } else { + this.$notify( + { + group: "alert", + type: "danger", + title: "Partner Error", + text: "A partner was selected but the location was not set, so it was not sent to any partner.", + }, + 5000, + ); } - this.sendToNostrPartner( - "NOSTR-EVENT-TRIPHOPPING", - "TripHopping", - resp.data.success.claimId, - signedPayload, - ); } (this.$router as Router).push({ path: "/project/" + projectPath }); @@ -689,5 +718,17 @@ export default class NewEditProjectView extends Vue { public onCancelClick() { (this.$router as Router).back(); } + + public showNostrPartnerInfo() { + this.$notify( + { + group: "alert", + type: "info", + title: "About Nostr Events", + text: "This will cause a submission to a partner on the nostr network. It will contain your public key data which may allow correlation, so don't allow this if you're not comfortable with that.", + }, + 7000, + ); + } } From 881c5d287d298b8fae5749340dca7108b63d8cba Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 12 Jan 2025 17:01:03 -0700 Subject: [PATCH 02/18] fix linting --- src/views/NewEditProjectView.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index 0cb1593..e7c3c77 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -152,7 +152,11 @@
- +
+
+
+ Loading + profile... +
+
+ Public Profile + +
+ + +
+
From 0e52f4806f34e48e759b067dd5a6c05709248263 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 13 Jan 2025 19:02:50 -0700 Subject: [PATCH 04/18] fix linting --- src/views/AccountViewView.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 5003366..5248a09 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -264,9 +264,7 @@
-
+
Loading profile... @@ -1582,15 +1580,12 @@ export default class AccountViewView extends Vue { "Got 400 or 404 response retrieving limits which probably means they're not registered:", error, ); - this.limitsMessage = "No limits found, so no actions are allowed."; + this.limitsMessage = "No limits were found, so no actions are allowed."; } else { const data = error.response?.data as ErrorResponse; this.limitsMessage = (data?.error?.message as string) || "Bad server response."; - console.log( - "Got bad response retrieving limits:", - error, - ); + console.error("Got bad response retrieving limits:", error); } } else { this.limitsMessage = "Got an error retrieving limits."; From 8eb8b746d724370108646358da4d79ba8bcdb80c Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 13 Jan 2025 19:27:17 -0700 Subject: [PATCH 05/18] add map and location for user profile --- src/views/AccountViewView.vue | 105 ++++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 6 deletions(-) diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 5248a09..7b88132 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -278,12 +278,54 @@ />
+ +
+ + +
+
+

+ For your security, choose a location nearby but not exactly at your + place. +

+ + + + + +
+ + + +
@@ -344,7 +330,7 @@
- +

- If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: click to send them this infoclick to send them this page info - and see if they are willing to make an introduction. They are surely - connected to someone; if you don't know who to ask, you might try the - person who registered you. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. - If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: share this page with themclick to copy this page info - and see if they are willing to make an introduction. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. @@ -425,18 +413,17 @@ {{ didInfo(visDid) }} - + + + , found at  - + {{ veriClaim.publicUrls[visDid].substring( veriClaim.publicUrls[visDid].indexOf("//") + 2, @@ -452,7 +439,7 @@ - This record is an edited version. The latest version is here. + This record is an edited version. The latest version is shown.
@@ -963,9 +950,10 @@ export default class ClaimView extends Vue { } onClickShareClaim() { + this.copyToClipboard("A link to this page", this.windowLocation); window.navigator.share({ title: "Help Connect Me", - text: "I'm trying to find the full details of this claim. Can you help me?", + text: "I'm trying to find the people who recorded this. Can you help me?", url: this.windowLocation, }); } diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index fb7059b..eb449ac 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -254,7 +254,7 @@ - +

- If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: click to send them this infoclick to send them this page info - and see if they are willing to make an introduction. They are surely - connected to someone; if you don't know who to ask, you might try - the person who registered you. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. - If you'd like to ask any of your contacts to take a look and see if - their contacts can see more details, + You can ask one of your contacts to take a look and see if their + contacts can see more details: share this page with themclick to copy this page info - and see if they are willing to make an introduction. + and see if they can make an introduction. Someone is connected to + people closer to them; if you don't know who to ask, try the person + who registered you. @@ -309,7 +311,7 @@ If you'd like an introduction, share this page with them and ask if they'll tell you more about @@ -448,7 +450,7 @@ export default class ClaimView extends Vue { veriClaim = serverUtil.BLANK_GENERIC_SERVER_RECORD; veriClaimDump = ""; veriClaimDidsVisible = {}; - windowLocation = window.location; + windowLocation = window.location.href; R = R; yaml = yaml; @@ -856,10 +858,11 @@ export default class ClaimView extends Vue { } onClickShareClaim() { + this.copyToClipboard("A link to this page", this.windowLocation); window.navigator.share({ title: "Help Connect Me", text: "I'm trying to find the full details of this claim. Can you help me?", - url: this.windowLocation.href, + url: this.windowLocation, }); } } diff --git a/src/views/ImportDerivedAccountView.vue b/src/views/ImportDerivedAccountView.vue index 9f54b14..78fd0b3 100644 --- a/src/views/ImportDerivedAccountView.vue +++ b/src/views/ImportDerivedAccountView.vue @@ -33,7 +33,7 @@
@@ -76,14 +68,14 @@ Map View - +
+ + From 920d3f4d25b14a95689c10d9fb95f607f6b2edac Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Wed, 29 Jan 2025 21:36:27 -0700 Subject: [PATCH 16/18] fix linting, add to the 10-project timeout --- src/components/HiddenDidDialog.vue | 24 ++++++++----- src/views/ClaimView.vue | 18 ++++++++-- src/views/ConfirmGiftView.vue | 4 +-- src/views/ProjectViewView.vue | 34 +++++++++++++++---- test-playwright/25-create-project-x10.spec.ts | 2 ++ 5 files changed, 61 insertions(+), 21 deletions(-) diff --git a/src/components/HiddenDidDialog.vue b/src/components/HiddenDidDialog.vue index 10bb0ea..fc9f884 100644 --- a/src/components/HiddenDidDialog.vue +++ b/src/components/HiddenDidDialog.vue @@ -19,9 +19,7 @@ The {{ roleName }} is not visible to you or any of your contacts. - - The {{ roleName }} is not visible to you. - + The {{ roleName }} is not visible to you.

@@ -50,7 +48,11 @@ {{ didInfo(visDid) }} - + @@ -74,8 +76,8 @@ click here to copy this page, paste it into a message, and ask - if they'll tell you more about the {{ roleName }}.click here to copy this page, paste it into a message, and ask if + they'll tell you more about the {{ roleName }}.
@@ -124,7 +126,13 @@ export default class HiddenDidDialog extends Vue { this.canShare = !!navigator.share; } - open(roleName: string, visibleToDids: string[], allContacts: Array, activeDid: string, allMyDids: Array) { + open( + roleName: string, + visibleToDids: string[], + allContacts: Array, + activeDid: string, + allMyDids: Array, + ) { this.roleName = roleName; this.visibleToDids = visibleToDids; this.allContacts = allContacts; @@ -171,4 +179,4 @@ export default class HiddenDidDialog extends Vue { }); } } - \ No newline at end of file + diff --git a/src/views/ClaimView.vue b/src/views/ClaimView.vue index db888d9..e45d777 100644 --- a/src/views/ClaimView.vue +++ b/src/views/ClaimView.vue @@ -270,7 +270,11 @@
{{ didInfo(confirmerId) }} - + @@ -304,7 +308,11 @@
{{ didInfo(confsVisibleTo) }} - + @@ -413,7 +421,11 @@ {{ didInfo(visDid) }} - + diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue index eb449ac..d22423b 100644 --- a/src/views/ConfirmGiftView.vue +++ b/src/views/ConfirmGiftView.vue @@ -310,9 +310,7 @@ If you'd like an introduction, share this page with them and ask if they'll tell you more about about the participants. {{ issuerInfoObject?.displayName }} - + - +
@@ -70,12 +78,19 @@ target="_blank" class="underline text-blue-500" >Map View - +
- + {{ domainForWebsite(this.url) }} @@ -537,7 +552,11 @@ export default class ProjectViewView extends Vue { imageUrl = ""; isRegistered = false; issuer = ""; - issuerInfoObject: { known: boolean; displayName: string; profileImageUrl?: string } | null = null; + issuerInfoObject: { + known: boolean; + displayName: string; + profileImageUrl?: string; + } | null = null; issuerVisibleToDids: Array = []; latitude = 0; longitude = 0; @@ -623,7 +642,8 @@ export default class ProjectViewView extends Vue { startDateTime.toLocaleTimeString(); } this.agentDid = resp.data.claim?.agent?.identifier; - this.agentDidVisibleToDids = resp.data.claim?.agent?.identifierVisibleToDids || []; + this.agentDidVisibleToDids = + resp.data.claim?.agent?.identifierVisibleToDids || []; this.imageUrl = resp.data.claim?.image; this.issuer = resp.data.issuer; this.issuerInfoObject = serverUtil.didInfoObject( @@ -1171,7 +1191,7 @@ export default class ProjectViewView extends Vue { this.issuerVisibleToDids, this.allContacts, this.activeDid, - this.allMyDids + this.allMyDids, ); } } diff --git a/test-playwright/25-create-project-x10.spec.ts b/test-playwright/25-create-project-x10.spec.ts index c846a1b..0d8094b 100644 --- a/test-playwright/25-create-project-x10.spec.ts +++ b/test-playwright/25-create-project-x10.spec.ts @@ -2,6 +2,8 @@ import { test, expect } from '@playwright/test'; import { importUser, createUniqueStringsArray } from './testUtils'; test('Create 10 new projects', async ({ page }) => { + test.setTimeout(40000); // Set timeout longer since it often fails at 30 seconds + const projectCount = 10; // Standard texts From 30552916a24deaaad1e03cab219058cb8d12b4a8 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Thu, 30 Jan 2025 08:39:14 -0700 Subject: [PATCH 17/18] bump version to 0.3.53 --- CHANGELOG.md | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4310d7..c983e4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.53] - 2025.01.30 +### Added +- Hints for contacting the creator of a project + + ## [0.3.52] - 2025.01.22 ### Fixed - User profile endpoint server for map was broken. diff --git a/package-lock.json b/package-lock.json index 918cead..1d4d35a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.52", + "version": "0.3.53", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.52", + "version": "0.3.53", "dependencies": { "@capacitor/android": "^6.1.2", "@capacitor/cli": "^6.1.2", diff --git a/package.json b/package.json index cfa0d8b..ba3f2a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.52", + "version": "0.3.53", "scripts": { "dev": "vite", "serve": "vite preview", From 65cc13977df97f94c895d8fb932aa04e66f1cd05 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Thu, 30 Jan 2025 08:53:28 -0700 Subject: [PATCH 18/18] bump version and add "-beta" --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d77f1bc..d5a0682 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ TIME_SAFARI_APP_TITLE="TimeSafari_Test" VITE_APP_SERVER=https://test.timesafari. (The plain `npm run build` uses the .env.production file.) -* Back up the time-safari/dist folder, then `mv time-safari/dist time-safari-dist-prev.0` && `mv crowd-funder-for-time-pwa/dist time-safari/` +* Back up the time-safari/dist folder, then `mv time-safari/dist time-safari-dist-prev.0 && mv crowd-funder-for-time-pwa/dist time-safari/` * Record the new hash in the changelog. Edit package.json to increment version & add "-beta", `npm install`, and commit. Also record what version is on production. diff --git a/package-lock.json b/package-lock.json index 1d4d35a..3d170c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.53", + "version": "0.3.54-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.53", + "version": "0.3.54-beta", "dependencies": { "@capacitor/android": "^6.1.2", "@capacitor/cli": "^6.1.2", diff --git a/package.json b/package.json index ba3f2a9..b90d387 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.53", + "version": "0.3.54-beta", "scripts": { "dev": "vite", "serve": "vite preview",