Considerable cleanup. I think I also found the issue from the other day with values not loading from settings.

This commit is contained in:
Matthew Raymer
2023-07-06 18:12:21 +08:00
parent e3f58bd593
commit 754bced2a9
20 changed files with 657 additions and 79 deletions

View File

@@ -256,7 +256,7 @@ export default class ContactsView extends Vue {
const allContacts = await db.contacts.toArray();
this.contacts = R.sort(
(a: Contact, b) => (a.name || "").localeCompare(b.name || ""),
allContacts
allContacts,
);
}
@@ -268,7 +268,7 @@ export default class ContactsView extends Vue {
if (!identity) {
console.error(
"Attempted to load Give records with no identity available."
"Attempted to load Give records with no identity available.",
);
return;
}
@@ -315,7 +315,7 @@ export default class ContactsView extends Vue {
console.error(
"Got bad response status & data of",
resp.status,
resp.data
resp.data,
);
this.alertTitle = "Error With Server";
this.alertMessage =
@@ -367,7 +367,7 @@ export default class ContactsView extends Vue {
console.error(
"Got bad response status & data of",
resp.status,
resp.data
resp.data,
);
this.alertTitle = "Error With Server";
this.alertMessage =
@@ -402,7 +402,7 @@ export default class ContactsView extends Vue {
const allContacts = this.contacts.concat([newContact]);
this.contacts = R.sort(
(a: Contact, b) => (a.name || "").localeCompare(b.name || ""),
allContacts
allContacts,
);
}
@@ -413,7 +413,7 @@ export default class ContactsView extends Vue {
this.nameForDid(this.contacts, contact.did) +
" with DID " +
contact.did +
" ?"
" ?",
)
) {
await db.open();
@@ -427,7 +427,7 @@ export default class ContactsView extends Vue {
confirm(
"Are you sure you want to use one of your registrations for " +
this.nameForDid(this.contacts, contact.did) +
"?"
"?",
)
) {
await accountsDB.open();
@@ -630,7 +630,7 @@ export default class ContactsView extends Vue {
"There are " +
this.givenToMeUnconfirmed[fromDid] +
" unconfirmed hours from them." +
" Would you like to confirm some of those hours?"
" Would you like to confirm some of those hours?",
)
) {
this.$router.push({
@@ -670,7 +670,7 @@ export default class ContactsView extends Vue {
" hours " +
toFrom +
description +
"?"
"?",
)
) {
this.createAndSubmitGive(
@@ -678,7 +678,7 @@ export default class ContactsView extends Vue {
fromDid,
toDid,
parseFloat(this.hourInput),
this.hourDescriptionInput
this.hourDescriptionInput,
);
}
}
@@ -689,7 +689,7 @@ export default class ContactsView extends Vue {
fromDid: string,
toDid: string,
amount: number,
description: string
description: string,
): Promise<void> {
// Make a claim
const vcClaim: GiveVerifiableCredential = {