Browse Source

update tasks; enhance an error message & some typescripts

starred-projects
Trent Larson 9 months ago
parent
commit
6aee93ca6c
  1. 7
      project.task.yaml
  2. 5
      src/views/AccountViewView.vue
  3. 10
      src/views/NewEditProjectView.vue

7
project.task.yaml

@ -1,9 +1,10 @@
tasks:
- fix timeSafari.org cert renewals
- anchor hash into BTC
- add more detail on TimeSafari.org
- .5 fix timeSafari.org cert renewals
- .2 anchor hash into BTC
- 04 allow backup of localStorage key
- .5 add more detail on TimeSafari.org
- .1 show better error when user with no ID goes to the "My Project" page
- add button to front page to prompt for ideas for gratitude
- show previous on "Your" screen

5
src/views/AccountViewView.vue

@ -688,7 +688,7 @@ export default class AccountViewView extends Vue {
) {
this.publicHex = identity.keys[0].publicKeyHex;
this.publicBase64 = Buffer.from(this.publicHex, "hex").toString("base64");
this.derivationPath = identity.keys[0].meta.derivationPath as string;
this.derivationPath = identity.keys[0].meta?.derivationPath as string;
db.settings.update(MASTER_SETTINGS_KEY, {
activeDid: identity.did,
@ -974,7 +974,8 @@ export default class AccountViewView extends Vue {
if (identity) {
this.checkLimitsFor(identity);
} else {
this.limitsMessage = "You have no identifier.";
this.limitsMessage =
"You have no identifier, or your data has been corrupted.";
}
}

10
src/views/NewEditProjectView.vue

@ -188,7 +188,7 @@ export default class NewEditProjectView extends Vue {
.where("did")
.equals(activeDid)
.first();
const identity = JSON.parse(account?.identity || "null");
const identity = JSON.parse((account?.identity as string) || "null");
if (!identity) {
throw new Error(
@ -210,8 +210,8 @@ export default class NewEditProjectView extends Vue {
async created() {
await db.open();
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
this.activeDid = settings?.activeDid || "";
this.apiServer = settings?.apiServer || "";
this.activeDid = (settings?.activeDid as string) || "";
this.apiServer = (settings?.apiServer as string) || "";
if (this.projectId) {
if (this.numAccounts === 0) {
@ -341,7 +341,9 @@ export default class NewEditProjectView extends Vue {
if (serverError) {
console.error("Got error from server", serverError);
if (Object.prototype.hasOwnProperty.call(serverError, "message")) {
userMessage = serverError.response?.data?.error?.message || ""; // This is info for the user.
userMessage =
(serverError.response?.data?.error?.message as string) ||
userMessage; // This is info for the user.
this.$notify(
{
group: "alert",

Loading…
Cancel
Save