Compare commits

...

7 Commits
0.2.2 ... 0.2.4

10 changed files with 82 additions and 44 deletions

View File

@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.4] - 2024.01.09
### Added
- Mark for a trade as opposed to a donation
### Changed
- Library security updates
## [0.2.2] - 2024.01.05
### Added
- Check for notification capability on front screen

View File

@@ -38,6 +38,8 @@ If you are deploying in a subdirectory, add it to `publicPath` in vue.config.js,
... to copy the contents of the `sw_scripts` folder to the `dist` folder - except additional_scripts.js.
* Get on the server and back up the time-safari folder.
* `rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntutest@test.timesafari.app:time-safari`
* Revert src/constants/app.ts and package.json (if that was prod), edit package.json to increment version & add "-beta", `npm install`, and commit. Also record what version is on production.

40
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "TimeSafari_Test",
"version": "0.2.2",
"version": "0.2.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "TimeSafari_Test",
"version": "0.2.2",
"version": "0.2.4",
"dependencies": {
"@ethersproject/hdnode": "^5.7.0",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
@@ -40,7 +40,7 @@
"js-yaml": "^4.1.0",
"localstorage-slim": "^2.5.0",
"luxon": "^3.4.3",
"merkletreejs": "^0.3.10",
"merkletreejs": "^0.3.11",
"moment": "^2.29.4",
"notiwind": "^2.0.2",
"papaparse": "^5.4.1",
@@ -10453,9 +10453,9 @@
},
"node_modules/@vue/vue-loader-v15": {
"name": "vue-loader",
"version": "15.10.2",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.2.tgz",
"integrity": "sha512-ndeSe/8KQc/nlA7TJ+OBhv2qalmj1s+uBs7yHDRFaAXscFTApBzY9F1jES3bautmgWjDlDct0fw8rPuySDLwxw==",
"version": "15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"dependencies": {
"@vue/component-compiler-utils": "^3.1.0",
@@ -11274,11 +11274,11 @@
}
},
"node_modules/axios": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz",
"integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==",
"version": "1.6.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz",
"integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==",
"dependencies": {
"follow-redirects": "^1.15.0",
"follow-redirects": "^1.15.4",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
@@ -12954,9 +12954,9 @@
}
},
"node_modules/crypto-js": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz",
"integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q=="
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"node_modules/crypto-ld": {
"version": "7.0.0",
@@ -15882,9 +15882,9 @@
}
},
"node_modules/follow-redirects": {
"version": "1.15.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
"integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
"funding": [
{
"type": "individual",
@@ -20070,13 +20070,13 @@
}
},
"node_modules/merkletreejs": {
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.3.10.tgz",
"integrity": "sha512-lin42tKfRdkW+6iE5pjtQ9BnH+1Hk3sJ5Fn9hUUSjcXRcJbSISHgPCfYvMNEXiNqZPhz/TyRPEV30qgnujsQ7A==",
"version": "0.3.11",
"resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.3.11.tgz",
"integrity": "sha512-LJKTl4iVNTndhL+3Uz/tfkjD0klIWsHlUzgtuNnNrsf7bAlXR30m+xYB7lHr5Z/l6e/yAIsr26Dabx6Buo4VGQ==",
"dependencies": {
"bignumber.js": "^9.0.1",
"buffer-reverse": "^1.0.1",
"crypto-js": "^3.1.9-1",
"crypto-js": "^4.2.0",
"treeify": "^1.1.0",
"web3-utils": "^1.3.4"
},

View File

@@ -1,6 +1,6 @@
{
"name": "TimeSafari_Test",
"version": "0.2.2",
"version": "0.2.4",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -40,7 +40,7 @@
"js-yaml": "^4.1.0",
"localstorage-slim": "^2.5.0",
"luxon": "^3.4.3",
"merkletreejs": "^0.3.10",
"merkletreejs": "^0.3.11",
"moment": "^2.29.4",
"notiwind": "^2.0.2",
"papaparse": "^5.4.1",

View File

@@ -1,19 +1,32 @@
tasks:
- add registration step to onboard help
- update dependencies, especially Veramo
- record donations vs gives
- deploy & migrate
- in mobile - change give & fulfills to array of objects?
- update docs
- show VC details... somehow:
- 01 show my VCs - most interesting, or via search
- 04 allow user to download chains of VCs, mine + ones I can see about me from others
- add VC confirmation
- 04 allow user to download & prove chains of VCs, mine + ones I can see about me from others
- on gives feed - link to project
- show feed of offers, new projects, etc -- maybe limited to my search area
- revenue
- copy button for seed
- .5 If notifications are not enabled, add message to front page with link/button to enable
- record donations vs gives
- make server endpoint for full English description of limits
- make identicons for contacts into more-memorable faces (and maybe change project identicons, too)
- create a help-desk document & add screenshots
- 01 server - show all claim details when issued by the issuer
- .1 update "offer" units to have same functionality as "give" units
- on home page, prompt for install check in addition to "supports notifications" check (since they won't get notified if Chrome is closed)
- 01 on Mac (& Windows?) desktop, add a help blurb so that they can find it again (since it doesn't show in Application list)
- bug - got error adding on Firefox user #0 as contact for themselves
- bug (that is hard to reproduce) - back-and-forth on discovery & project pages led to "You need an identity to load your projects." error on product page when I had an identity
@@ -21,12 +34,10 @@ tasks:
- bug (that is hard to reproduce) - on the second 'give' recorded on prod it showed me as the agent
- 01 send visibility signal as a VC and store it
- 04 remove 'rowid' references (that are sqlite-specific); may involve server
- 04 look at other examples for better UI friend.tech
- 01 make the prod build copy the sw_scripts
- .5 Add start date to project
- 04 look at other examples for better UI, eg friend.tech
- .5 Add inactive flag / end date, start date to project
- .3 check that Android shows "back" buttons on screens without bottom tray
- .1 Make give description text box into something that expands as they type?
- .5 customize favicon assignee-group:ui
- .2 Show a warning if both giver and recipient are the same (but still allow?)
- 01 Would it look better to shrink the buttons on many pages so they don't expand to the width of the screen? assignee-group:ui
- .5 Display a more appealing confirmation on the map when erasing the marker
@@ -34,11 +45,11 @@ tasks:
- switch some checks for activeDid to check for isRegistered
- .2 in SeedBackupView, don't load the mnemonic and keep it in memory; only load it when they click "show"
- .5 fix cert generation on server (since it didn't happen automatically for Nov 30)
- .1 remove 2 second setTimeout in NewEditProjectView.vue
- warn if they're using the web (android only?)
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getInstalledRelatedApps
https://web.dev/articles/get-installed-related-apps
- 04 fix lack of initial notification in Firefox (on MacOS, maybe others)
- .5 fix masked icon (because some of the top-right of the binoculars is cut off)
- contacts v+ :
- 01 Import all the non-sensitive data (ie. contacts & settings).

View File

@@ -36,9 +36,15 @@
<fa icon="chevron-right" />
</div>
</div>
<div v-if="showGivenToUser" class="mt-2 text-right">
<input type="checkbox" class="mr-2" v-model="givenToUser" />
<label class="text-sm">Given to you</label>
<div class="mt-2 text-right">
<span v-if="showGivenToUser" class="mt-2 mr-16">
<input type="checkbox" class="mr-2" v-model="givenToUser" />
<label class="text-sm">Given to you</label>
</span>
<span class="mt-2">
<input type="checkbox" class="mr-2" v-model="isTrade" />
<label class="text-sm">Trade (not a gift)</label>
</span>
</div>
<p class="text-center mb-2 mt-6 italic">
Sign & Send to publish to the world
@@ -88,6 +94,7 @@ export default class GiftedDialog extends Vue {
giver?: GiverInputInfo; // undefined means no identified giver agent
description = "";
givenToUser = false;
isTrade = false;
unitCode = "HUR";
visible = false;
@@ -264,6 +271,7 @@ export default class GiftedDialog extends Vue {
amountInput,
unitCode,
this.projectId,
this.isTrade,
);
if (
@@ -287,7 +295,7 @@ export default class GiftedDialog extends Vue {
group: "alert",
type: "success",
title: "Success",
text: "That gift was recorded.",
text: `That ${this.isTrade ? "trade" : "gift"} was recorded.`,
},
7000,
);

View File

@@ -88,7 +88,7 @@ export interface GiveVerifiableCredential {
"@type": "GiveAction";
agent?: { identifier: string };
description?: string;
fulfills?: { "@type": string; identifier?: string; lastClaimId?: string };
fulfills?: { "@type": string; identifier?: string; lastClaimId?: string }[];
identifier?: string;
object?: { amountOfThisGood: number; unitCode: string };
recipient?: { identifier: string };
@@ -312,6 +312,7 @@ export async function createAndSubmitGive(
hours?: number,
unitCode?: string,
fulfillsProjectHandleId?: string,
isTrade: boolean = false,
): Promise<CreateAndSubmitClaimResult> {
const vcClaim: GiveVerifiableCredential = {
"@context": "https://schema.org",
@@ -322,10 +323,15 @@ export async function createAndSubmitGive(
object: hours
? { amountOfThisGood: hours, unitCode: unitCode || "HUR" }
: undefined,
fulfills: fulfillsProjectHandleId
? { "@type": "PlanAction", identifier: fulfillsProjectHandleId }
: undefined,
fulfills: [{ "@type": isTrade ? "TradeAction" : "DonateAction" }],
};
if (fulfillsProjectHandleId) {
vcClaim.fulfills = vcClaim.fulfills || []; // weird that it won't typecheck without this
vcClaim.fulfills.push({
"@type": "PlanAction",
identifier: fulfillsProjectHandleId,
});
}
return createAndSubmitClaim(
vcClaim as GenericServerRecord,
identity,

View File

@@ -16,7 +16,7 @@ export const isGlobalUri = (uri: string) => {
// If you edit this, check that the numbers still line up on the side in the alert (on mobile, too),
// and make sure they can take all actions while the notification shows.
export const ONBOARD_MESSAGE =
"1) Check that they've entered their name. 2) Go to the scanning page: use the Contacts page and click on the QR icon at the top, and then scan and register them. 3) Have them go to that page and scan you.";
"1) Check that they have entered their name on the profile page in their device. 2) Add them to your Contacts by scanning with the QR icon that is by the input box. 3) Click the person icon to register them. 4) Have them go to their Contact page and scan your QR to add you to their list.";
export const sendTestThroughPushServer = async (
subscription: PushSubscription,

View File

@@ -385,7 +385,9 @@ export default class HomeView extends Vue {
public async retrieveGives(endorserApiServer: string, beforeId?: string) {
const beforeQuery = beforeId == null ? "" : "&beforeId=" + beforeId;
const response = await fetch(
endorserApiServer + "/api/v2/report/gives?" + beforeQuery,
endorserApiServer +
"/api/v2/report/gives?giftNotTrade=true&" +
beforeQuery,
{
method: "GET",
headers: await this.buildHeaders(),

View File

@@ -162,7 +162,7 @@
</h3>
<div v-if="offersToThis.length === 0">
(None yet. Record one above.)
(None yet. Wanna offer something if others join you?)
</div>
<ul v-else class="text-sm border-t border-slate-300">
@@ -197,7 +197,9 @@
<div class="bg-slate-100 px-4 py-3 rounded-md">
<h3 class="text-sm uppercase font-semibold mb-3">Given To This Idea</h3>
<div v-if="givesToThis.length === 0">(None yet. Record one above.)</div>
<div v-if="givesToThis.length === 0">
(None yet. You can be the first.)
</div>
<ul v-else class="text-sm border-t border-slate-300">
<li
@@ -471,7 +473,7 @@ export default class ProjectViewView extends Vue {
const givesInUrl =
this.apiServer +
"/api/v2/report/givesForPlans?planIds=" +
"/api/v2/report/givesToPlans?planIds=" +
encodeURIComponent(JSON.stringify([projectId]));
try {
const resp = await this.axios.get(givesInUrl, { headers });