add marker in feed to show where they've seen claims, plus other small clean-up

This commit is contained in:
2023-06-23 20:17:54 -06:00
parent 639f630436
commit 5747404fd6
12 changed files with 119 additions and 38 deletions

View File

@@ -289,10 +289,10 @@
</div>
<div>
<button class="text-blue-500 px-2">
<button class="text-blue-500">
<router-link
:to="{ name: 'statistics' }"
class="block text-center py-3 px-1"
class="block text-center py-3"
>
See Achievements & Statistics
</router-link>
@@ -427,7 +427,10 @@ export default class AccountViewView extends Vue {
const accounts = await accountsDB.accounts.toArray();
const account = R.find((acc) => acc.did === this.activeDid, accounts);
const identity = JSON.parse(account?.identity || "undefined");
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("No identity found.");
}
this.publicHex = identity.keys[0].publicKeyHex;
this.publicBase64 = Buffer.from(this.publicHex, "hex").toString("base64");
this.derivationPath = identity.keys[0].meta.derivationPath;
@@ -437,8 +440,8 @@ export default class AccountViewView extends Vue {
});
} catch (err) {
this.alertMessage =
"Clear your cache and start over (after data backup). See console log for more info.";
console.error("Telling user to clear cache because:", err);
"Clear your cache and start over (after data backup).";
console.error("Telling user to clear cache at page create because:", err);
this.alertTitle = "Error Creating Account";
this.isAlertVisible = true;
}
@@ -452,9 +455,12 @@ export default class AccountViewView extends Vue {
});
} catch (err) {
this.alertMessage =
"Clear your cache and start over (after data backup). See console log for more info.";
console.error("Telling user to clear cache because:", err);
this.alertTitle = "Error Creating Account";
"Clear your cache and start over (after data backup).";
console.error(
"Telling user to clear cache after contact setting update because:",
err
);
this.alertTitle = "Error Updating Contact Setting";
this.isAlertVisible = true;
}
}
@@ -487,7 +493,10 @@ export default class AccountViewView extends Vue {
await accountsDB.open();
const accounts = await accountsDB.accounts.toArray();
const account = R.find((acc) => acc.did === this.activeDid, accounts);
const identity = JSON.parse(account?.identity || "undefined");
const identity = JSON.parse(account?.identity || "null");
if (!identity) {
throw new Error("No identity found.");
}
const token = await accessToken(identity);
const headers = {
"Content-Type": "application/json",