copy contact JWT URL; add project ID to URL #85

Merged
trentlarson merged 5 commits from more-small2 into master 10 months ago
  1. 12
      project.task.yaml
  2. 2
      src/components/GiftedDialog.vue
  3. 20
      src/views/ContactQRScanShowView.vue
  4. 13
      src/views/DiscoverView.vue
  5. 26
      src/views/ProjectViewView.vue
  6. 2
      src/views/ProjectsView.vue

12
project.task.yaml

@ -1,14 +1,13 @@
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
- 40 notifications :
- 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
- .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)
- .3 on DiscoverView QuickSearch, the 'keyup.enter' only runs searchAll, so do the right thing for searchLocal
- .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
- 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 make a VC details page, or link to endorser.ch
- .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)
- 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+ :
- 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)
- 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
- 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).

2
src/components/GiftedDialog.vue

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

20
src/views/ContactQRScanShowView.vue

@ -20,6 +20,7 @@
</h1>
</div>
<div @click="onCopyToClipboard()">
<!--
Play with display options: https://qr-code-styling.com/
See docs: https://www.npmjs.com/package/qr-code-generator-vue3
@ -30,6 +31,7 @@
:dotsOptions="{ type: 'square' }"
class="flex justify-center"
/>
</div>
<h1 class="text-4xl text-center font-light pt-4">Scan Contact Info</h1>
<qrcode-stream @detect="onScanDetect" @error="onScanError" />
@ -40,6 +42,7 @@
import QRCodeVue3 from "qr-code-generator-vue3";
import { Component, Vue } from "vue-facing-decorator";
import { QrcodeStream } from "vue-qrcode-reader";
import { useClipboard } from "@vueuse/core";
import { accountsDB, db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
@ -179,5 +182,22 @@ export default class ContactQRScanShow extends Vue {
-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>

13
src/views/DiscoverView.vue

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

26
src/views/ProjectViewView.vue

@ -210,18 +210,7 @@
</ul>
</div>
<div v-if="fulfilledByThis" class="bg-slate-100 px-4 py-3 rounded-md">
<h3 class="text-sm uppercase font-semibold mb-3">
Contributions By This Project
</h3>
<button
@click="onClickLoadProject(fulfilledByThis.handleId)"
class="text-blue-500"
>
{{ fulfilledByThis.name }}
</button>
</div>
<div class="grid items-start grid-cols-1 gap-4">
<div
v-if="fulfillersToThis.length > 0"
class="bg-slate-100 px-4 py-3 rounded-md"
@ -240,6 +229,19 @@
</li>
</ul>
</div>
<div v-if="fulfilledByThis" class="bg-slate-100 px-4 py-3 rounded-md">
<h3 class="text-sm uppercase font-semibold mb-3">
Contributions By This Project
</h3>
<button
@click="onClickLoadProject(fulfilledByThis.handleId)"
class="text-blue-500"
>
{{ fulfilledByThis.name }}
</button>
</div>
</div>
</div>
<GiftedDialog

2
src/views/ProjectsView.vue

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

Loading…
Cancel
Save