Merge pull request 'copy contact JWT URL; add project ID to URL' (#85) from more-small2 into master

Reviewed-on: #85
This commit was merged in pull request #85.
This commit is contained in:
2023-11-27 20:39:12 -05:00
6 changed files with 80 additions and 45 deletions

View File

@@ -1,14 +1,13 @@
tasks: tasks:
- on project view screen, 'contributions' to & from shouldn't fall to next line (eg. Alpha Barbados Beach Cleanup Test)
- in endorser-push-server - mount folder for persistent sqlite DB outside of container - in endorser-push-server - mount folder for persistent sqlite DB outside of container
- 40 notifications : - 40 notifications :
- push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew - push, where we trigger a ServiceWorker(?) in the app to reach out and check for new data assignee:matthew
- .5 add project ID to the URL of the project-view, to make a project publicly-accessible - .3 on DiscoverView QuickSearch, the 'keyup.enter' only runs searchAll, so do the right thing for searchLocal
- .5 add link to further project / people when a project pays ahead
- .5 show checkbox on "gave" modal to say that user is recipient (so it could be uncheked for someone unspecified)
- .5 allow to manage their notifications even without an identity - .5 allow to manage their notifications even without an identity
- .5 bug - on the discover page, enter a search term and search and see a duplicate project show at the end of the list - .5 bug - on the discover page, enter a search term and search and see a duplicate project show at the end of the list
- 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s) - 01 Ensure each action sent to the server has a confirmation - eg registration (ie a toast something that dismisses after 5-10s)
@@ -32,8 +31,10 @@ tasks:
- .5 Display a more appealing confirmation on the map when erasing the marker - .5 Display a more appealing confirmation on the map when erasing the marker
- .5 make a VC details page, or link to endorser.ch - .5 make a VC details page, or link to endorser.ch
- .1 Add units or different icon to the coins (to distinguish $, BTC, hours, etc) - .1 Add units or different icon to the coins (to distinguish $, BTC, hours, etc)
- .5 include the hash of the latest commit on help page next to version - .5 include the hash of the latest commit on help page next to version (maybe Trent's git-hash branch)
- .5 remove references to localStorage for projectId (now that it's pulling from the path) - .5 remove references to localStorage for projectId (now that it's pulling from the path)
- bug (that is hard to reproduce) - on the second 'give' recorded on prod it showed me as the agent
- make identicons for contacts into more-memorable faces (and maybe change project identicons, too)
- contacts v+ : - contacts v+ :
- 01 Import all the non-sensitive data (ie. contacts & settings). - 01 Import all the non-sensitive data (ie. contacts & settings).
@@ -49,6 +50,7 @@ tasks:
- 08 convert to cleaner implementation (maybe Drie -- https://github.com/janvorisek/drie) - 08 convert to cleaner implementation (maybe Drie -- https://github.com/janvorisek/drie)
- Release Minimum Viable Product : - Release Minimum Viable Product :
- .5 deploy endorser.ch server above v 3.4.3 (to get plan searches by names as well as descriptions)
- 08 thorough testing for errors & edge cases - 08 thorough testing for errors & edge cases
- 01 ensure ability to recover server remotely, and add redundant access - 01 ensure ability to recover server remotely, and add redundant access
- Turn off stats-world or ensure it's usable (eg. cannot zoom out too far and lose world, cannot screenshot). - Turn off stats-world or ensure it's usable (eg. cannot zoom out too far and lose world, cannot screenshot).

View File

@@ -81,7 +81,7 @@ export default class GiftedDialog extends Vue {
activeDid = ""; activeDid = "";
apiServer = ""; apiServer = "";
giver?: GiverInputInfo; giver?: GiverInputInfo; // undefined means no identified giver agent
description = ""; description = "";
givenToUser = false; givenToUser = false;
hours = "0"; hours = "0";

View File

@@ -20,16 +20,18 @@
</h1> </h1>
</div> </div>
<!-- <div @click="onCopyToClipboard()">
Play with display options: https://qr-code-styling.com/ <!--
See docs: https://www.npmjs.com/package/qr-code-generator-vue3 Play with display options: https://qr-code-styling.com/
--> See docs: https://www.npmjs.com/package/qr-code-generator-vue3
<QRCodeVue3 -->
:value="this.qrValue" <QRCodeVue3
:cornersSquareOptions="{ type: 'extra-rounded' }" :value="this.qrValue"
:dotsOptions="{ type: 'square' }" :cornersSquareOptions="{ type: 'extra-rounded' }"
class="flex justify-center" :dotsOptions="{ type: 'square' }"
/> class="flex justify-center"
/>
</div>
<h1 class="text-4xl text-center font-light pt-4">Scan Contact Info</h1> <h1 class="text-4xl text-center font-light pt-4">Scan Contact Info</h1>
<qrcode-stream @detect="onScanDetect" @error="onScanError" /> <qrcode-stream @detect="onScanDetect" @error="onScanError" />
@@ -40,6 +42,7 @@
import QRCodeVue3 from "qr-code-generator-vue3"; import QRCodeVue3 from "qr-code-generator-vue3";
import { Component, Vue } from "vue-facing-decorator"; import { Component, Vue } from "vue-facing-decorator";
import { QrcodeStream } from "vue-qrcode-reader"; import { QrcodeStream } from "vue-qrcode-reader";
import { useClipboard } from "@vueuse/core";
import { accountsDB, db } from "@/db/index"; import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
@@ -179,5 +182,22 @@ export default class ContactQRScanShow extends Vue {
-1, -1,
); );
} }
onCopyToClipboard() {
useClipboard()
.copy(this.qrValue)
.then(() => {
console.log("Contact URL:", this.qrValue);
this.$notify(
{
group: "alert",
type: "toast",
title: "Copied",
text: "Contact URL was copied to clipboard.",
},
2000,
);
});
}
} }
</script> </script>

View File

@@ -213,6 +213,11 @@ export default class DiscoverView extends Vue {
} }
public async searchAll(beforeId?: string) { public async searchAll(beforeId?: string) {
if (!beforeId) {
// this was an initial search so clear any previous results
this.projects = [];
}
let queryParams = "claimContents=" + encodeURIComponent(this.searchTerms); let queryParams = "claimContents=" + encodeURIComponent(this.searchTerms);
if (beforeId) { if (beforeId) {
@@ -280,8 +285,14 @@ export default class DiscoverView extends Vue {
return; return;
} }
if (!beforeId) {
// this was an initial search so clear any previous results
this.projects = [];
}
const claimContents = const claimContents =
"claimContents=" + encodeURIComponent(this.searchTerms); "claimContents=" + encodeURIComponent(this.searchTerms);
let queryParams = [ let queryParams = [
claimContents, claimContents,
"minLocLat=" + this.searchBox.bbox.minLat, "minLocLat=" + this.searchBox.bbox.minLat,
@@ -376,7 +387,7 @@ export default class DiscoverView extends Vue {
onClickLoadProject(id: string) { onClickLoadProject(id: string) {
localStorage.setItem("projectId", id); localStorage.setItem("projectId", id);
const route = { const route = {
name: "project", path: "/project/" + encodeURIComponent(id),
}; };
this.$router.push(route); this.$router.push(route);
} }

View File

@@ -210,35 +210,37 @@
</ul> </ul>
</div> </div>
<div v-if="fulfilledByThis" class="bg-slate-100 px-4 py-3 rounded-md"> <div class="grid items-start grid-cols-1 gap-4">
<h3 class="text-sm uppercase font-semibold mb-3"> <div
Contributions By This Project v-if="fulfillersToThis.length > 0"
</h3> class="bg-slate-100 px-4 py-3 rounded-md"
<button
@click="onClickLoadProject(fulfilledByThis.handleId)"
class="text-blue-500"
> >
{{ fulfilledByThis.name }} <h3 class="text-sm uppercase font-semibold mb-3">
</button> Contributions To This Project
</div> </h3>
<ul>
<li v-for="plan in fulfillersToThis" :key="plan.handleId">
<button
@click="onClickLoadProject(plan.handleId)"
class="text-blue-500"
>
{{ plan.name }}
</button>
</li>
</ul>
</div>
<div <div v-if="fulfilledByThis" class="bg-slate-100 px-4 py-3 rounded-md">
v-if="fulfillersToThis.length > 0" <h3 class="text-sm uppercase font-semibold mb-3">
class="bg-slate-100 px-4 py-3 rounded-md" Contributions By This Project
> </h3>
<h3 class="text-sm uppercase font-semibold mb-3"> <button
Contributions To This Project @click="onClickLoadProject(fulfilledByThis.handleId)"
</h3> class="text-blue-500"
<ul> >
<li v-for="plan in fulfillersToThis" :key="plan.handleId"> {{ fulfilledByThis.name }}
<button </button>
@click="onClickLoadProject(plan.handleId)" </div>
class="text-blue-500"
>
{{ plan.name }}
</button>
</li>
</ul>
</div> </div>
</div> </div>

View File

@@ -174,7 +174,7 @@ export default class ProjectsView extends Vue {
onClickLoadProject(id: string) { onClickLoadProject(id: string) {
localStorage.setItem("projectId", id); localStorage.setItem("projectId", id);
const route = { const route = {
name: "project", path: "/project/" + encodeURIComponent(id),
}; };
this.$router.push(route); this.$router.push(route);
} }