diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue
index 3f6c83d..f6c3d9a 100644
--- a/src/views/AccountViewView.vue
+++ b/src/views/AccountViewView.vue
@@ -562,7 +562,7 @@
@@ -451,12 +451,25 @@ export default class NewEditProjectView extends Vue {
}
}
- public maybeEraseLatLong() {
- if (window.confirm("Are you sure you don't want to mark a location?")) {
- this.latitude = 0;
- this.longitude = 0;
- this.includeLocation = false;
- }
+ confirmEraseLatLong() {
+ this.$notify(
+ {
+ group: "modal",
+ type: "confirm",
+ title: "Erase Marker",
+ text: "Are you sure you don't want to mark a location? This will erase the current location.",
+ onYes: async () => {
+ this.eraseLatLong();
+ },
+ },
+ -1,
+ );
+ }
+
+ public eraseLatLong() {
+ this.latitude = 0;
+ this.longitude = 0;
+ this.includeLocation = false;
}
public onCancelClick() {
diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue
index 6734da7..064fff9 100644
--- a/src/views/ProjectViewView.vue
+++ b/src/views/ProjectViewView.vue
@@ -69,8 +69,9 @@
@@ -289,7 +290,7 @@
-
+
@@ -787,55 +788,68 @@ export default class ProjectViewView extends Vue {
return libsUtil.isGiveRecordTheUserCanConfirm(giveDetails, this.activeDid);
}
+ confirmConfirmClaim(give: GiveSummaryRecord) {
+ this.$notify(
+ {
+ group: "modal",
+ type: "confirm",
+ title: "Confirm",
+ text: "Do you personally confirm that this is true?",
+ onYes: async () => {
+ await this.confirmClaim(give);
+ },
+ },
+ -1,
+ );
+ }
+
// similar code is found in ClaimView
async confirmClaim(give: GiveSummaryRecord) {
- if (confirm("Do you personally confirm that this is true?")) {
- // similar logic is found in endorser-mobile
- const goodClaim = serverUtil.removeSchemaContext(
- serverUtil.removeVisibleToDids(
- serverUtil.addLastClaimOrHandleAsIdIfMissing(
- give.fullClaim,
- give.jwtId,
- give.handleId,
- ),
+ // similar logic is found in endorser-mobile
+ const goodClaim = serverUtil.removeSchemaContext(
+ serverUtil.removeVisibleToDids(
+ serverUtil.addLastClaimOrHandleAsIdIfMissing(
+ give.fullClaim,
+ give.jwtId,
+ give.handleId,
),
+ ),
+ );
+ const confirmationClaim: serverUtil.GenericVerifiableCredential = {
+ "@context": "https://schema.org",
+ "@type": "AgreeAction",
+ object: goodClaim,
+ };
+ const result = await serverUtil.createAndSubmitClaim(
+ confirmationClaim,
+ await this.getIdentity(this.activeDid),
+ this.apiServer,
+ this.axios,
+ );
+ if (result.type === "success") {
+ this.$notify(
+ {
+ group: "alert",
+ type: "success",
+ title: "Success",
+ text: "Confirmation submitted.",
+ },
+ 5000,
);
- const confirmationClaim: serverUtil.GenericVerifiableCredential = {
- "@context": "https://schema.org",
- "@type": "AgreeAction",
- object: goodClaim,
- };
- const result = await serverUtil.createAndSubmitClaim(
- confirmationClaim,
- await this.getIdentity(this.activeDid),
- this.apiServer,
- this.axios,
+ } else {
+ console.error("Got error submitting the confirmation:", result);
+ const message =
+ (result.error?.error as string) ||
+ "There was a problem submitting the confirmation. See logs for more info.";
+ this.$notify(
+ {
+ group: "alert",
+ type: "danger",
+ title: "Error",
+ text: message,
+ },
+ -1,
);
- if (result.type === "success") {
- this.$notify(
- {
- group: "alert",
- type: "success",
- title: "Success",
- text: "Confirmation submitted.",
- },
- 5000,
- );
- } else {
- console.error("Got error submitting the confirmation:", result);
- const message =
- (result.error?.error as string) ||
- "There was a problem submitting the confirmation. See logs for more info.";
- this.$notify(
- {
- group: "alert",
- type: "danger",
- title: "Error",
- text: message,
- },
- -1,
- );
- }
}
}
}