Updates to contacts UI. Sweep for buildIdentity and buildHeaders #35
Merged
anomalist
merged 7 commits from contacts-identity
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'contacts-identity'
Deleting a branch is permanent. It CANNOT be undone. Continue?
@trentlarson I added a case to Contacts to show a message when no contacts. Also added a (no name) to the Home page since the buttons didn't cover that case.
Rest of this commit is a partial cleanup of identity and header creations. There's an edge case where it's checking for accounts which I didn't cover just yet.
await accountsDB.open();
const accounts = await accountsDB.accounts.toArray();
this.numAccounts = accounts.length;
This cuts some extra code: in this case the "this.numAccounts" isn't set and so the "Switch Identifier" section does not show. (I looked for others and didn't see anything obvious but it's worth another look.)
@trentlarson going to push something after this message. I did a little thinking and approach this in a different way.
if (!identity) {
throw new Error(
"Attempted to load Give records with no identity available.",
Note that this message doesn't really apply on this page. The original has the more generic: "An ID is chosen but there are no keys for it so it cannot be used to talk with the service." Recommend making some more generic message for all these cases if you want to keep the same error message for them all.
this.limitsMessage = data?.error?.message || "Bad server response.";
if (
error.message ===
"Attempted to load Give records with no identity available."
Someday we can have a specific error type, rather than relying on a message string check. Not critical now.
if (!identity) {
throw new Error(
"Attempted to load Give records with no identity available.",
Here's another case where the message about "Give records" is not appropriate for this screen.
}
}
createAndSubmitGive(
Thanks for cutting out this moved stuff!
81dd6eb595
into master 1 year agoReviewers
81dd6eb595
.