fix: show a "project changed" entry if the server reports something
This commit is contained in:
@@ -57,7 +57,12 @@ export interface OfferToPlanSummaryRecord extends OfferSummaryRecord {
|
|||||||
planName: string;
|
planName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// a summary record; the VC is not currently part of this record
|
/**
|
||||||
|
* A summary record
|
||||||
|
* The VC is not currently part of this record.
|
||||||
|
*
|
||||||
|
* If you change this, you may want to update NewActivityView.vue to handle differences correctly.
|
||||||
|
*/
|
||||||
export interface PlanSummaryRecord {
|
export interface PlanSummaryRecord {
|
||||||
agentDid?: string;
|
agentDid?: string;
|
||||||
description: string;
|
description: string;
|
||||||
@@ -76,7 +81,9 @@ export interface PlanSummaryRecord {
|
|||||||
|
|
||||||
export interface PlanSummaryAndPreviousClaim {
|
export interface PlanSummaryAndPreviousClaim {
|
||||||
plan: PlanSummaryRecord;
|
plan: PlanSummaryRecord;
|
||||||
wrappedClaimBefore: GenericCredWrapper<PlanActionClaim>;
|
// This can be undefined, eg. if a project is starred after the stored last-seen-change-jwt ID.
|
||||||
|
// The endorser-ch test code shows some cases.
|
||||||
|
wrappedClaimBefore?: GenericCredWrapper<PlanActionClaim>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -284,7 +284,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>The changes did not affect essential project data.</div>
|
<div v-else>
|
||||||
|
The changes are not important, like it was saved by accident or
|
||||||
|
you've seen it all before.
|
||||||
|
</div>
|
||||||
<!-- New line that appears on hover -->
|
<!-- New line that appears on hover -->
|
||||||
<div
|
<div
|
||||||
class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center"
|
class="absolute left-0 w-full text-left text-gray-500 text-sm hidden group-hover:flex cursor-pointer items-center"
|
||||||
@@ -589,13 +592,13 @@ export default class NewActivityView extends Vue {
|
|||||||
|
|
||||||
for (const planChange of planChanges) {
|
for (const planChange of planChanges) {
|
||||||
const currentPlan: PlanSummaryRecord = planChange.plan;
|
const currentPlan: PlanSummaryRecord = planChange.plan;
|
||||||
const wrappedClaim: GenericCredWrapper<PlanActionClaim> =
|
const wrappedClaim: GenericCredWrapper<PlanActionClaim> | undefined =
|
||||||
planChange.wrappedClaimBefore;
|
planChange.wrappedClaimBefore;
|
||||||
|
|
||||||
// Extract the actual claim from the wrapped claim
|
// Extract the actual claim from the wrapped claim
|
||||||
let previousClaim: PlanActionClaim;
|
let previousClaim: PlanActionClaim | undefined;
|
||||||
|
|
||||||
const embeddedClaim: PlanActionClaim = wrappedClaim.claim;
|
const embeddedClaim: PlanActionClaim | undefined = wrappedClaim?.claim;
|
||||||
if (
|
if (
|
||||||
embeddedClaim &&
|
embeddedClaim &&
|
||||||
typeof embeddedClaim === "object" &&
|
typeof embeddedClaim === "object" &&
|
||||||
@@ -609,7 +612,9 @@ export default class NewActivityView extends Vue {
|
|||||||
previousClaim = embeddedClaim;
|
previousClaim = embeddedClaim;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!previousClaim || !currentPlan.handleId) {
|
if (!previousClaim) {
|
||||||
|
// Can happen when a project is starred after the stored last-seen-change-jwt ID
|
||||||
|
// so we'll just leave the message saying there are no important differences.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,9 @@
|
|||||||
<button :class="sqlLinkClasses" @click="setAccountsQuery">
|
<button :class="sqlLinkClasses" @click="setAccountsQuery">
|
||||||
Accounts
|
Accounts
|
||||||
</button>
|
</button>
|
||||||
|
<button :class="sqlLinkClasses" @click="setActiveIdentityQuery">
|
||||||
|
Active DID
|
||||||
|
</button>
|
||||||
<button :class="sqlLinkClasses" @click="setContactsQuery">
|
<button :class="sqlLinkClasses" @click="setContactsQuery">
|
||||||
Contacts
|
Contacts
|
||||||
</button>
|
</button>
|
||||||
@@ -525,6 +528,11 @@ export default class Help extends Vue {
|
|||||||
this.executeSql();
|
this.executeSql();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setActiveIdentityQuery() {
|
||||||
|
this.sqlQuery = "SELECT * FROM active_identity;";
|
||||||
|
this.executeSql();
|
||||||
|
}
|
||||||
|
|
||||||
setContactsQuery() {
|
setContactsQuery() {
|
||||||
this.sqlQuery = "SELECT * FROM contacts;";
|
this.sqlQuery = "SELECT * FROM contacts;";
|
||||||
this.executeSql();
|
this.executeSql();
|
||||||
|
|||||||
Reference in New Issue
Block a user