Browse Source

tweak messages for missing identifier

kb/add-usage-guide
Trent Larson 8 months ago
parent
commit
2e164dfeff
  1. 6
      README.md
  2. 29
      src/views/AccountViewView.vue

6
README.md

@ -30,7 +30,7 @@ npm run lint
... though maybe you do that after testing and release, since that isn't used in the build (and you often increment a lot during testing).
* If production, change src/constants/app.ts DEFAULT_*_SERVER to be "PROD" and package.json to remove "_Test". Also record what version is on production.
* If production: change src/constants/app.ts DEFAULT_*_SERVER to be "PROD" and package.json to remove "_Test". Also record what version is on production.
* `npm run build`
@ -77,10 +77,10 @@ To add an icon, add to main.ts and reference with `fa` element and `icon` attrib
### Manual walk-through test
- If there were any DB changes, check that you're on the old version and reload the page and ensure you can still act.
- Check that the version is updated.
- Use a mobile user as well as a desktop user.
- Backup seed & data & get a CSV dump from Endorser Mobile.
- Clear the browser data & Time Safari contacts and then CSV contacts.
- Check that the version is updated.
- Clear the browser data & import Time Safari contacts and then CSV contacts.
- Clear the browser data again. (See "Reset" below.) Make sure that it's using the test API (under Identity in 'Advanced').
- Go to the account page before visiting the home page to see that there is no ID.
- On the home page:

29
src/views/AccountViewView.vue

@ -527,14 +527,13 @@ export default class AccountViewView extends Vue {
isRegistered = false;
isSubscribed = false;
notificationMaybeChanged = false;
numAccounts = 0;
publicHex = "";
publicBase64 = "";
webPushServer = "";
webPushServerInput = "";
limits: RateLimits | null = null;
limitsMessage = "";
loadingLimits = true; // might as well now that we do it on mount, to avoid flashing the registration message
loadingLimits = false;
showContactGives = false;
showDidCopy = false;
showDerCopy = false;
@ -545,11 +544,6 @@ export default class AccountViewView extends Vue {
warnIfProdServer = false;
warnIfTestServer = false;
async beforeCreate() {
await accountsDB.open();
this.numAccounts = await accountsDB.accounts.count();
}
/**
* Async function executed when the component is created.
* Initializes the component's state with values from the database,
@ -741,18 +735,17 @@ export default class AccountViewView extends Vue {
"Attempted to load account records with no identifier available."
) {
this.limitsMessage = "No identifier.";
this.loadingLimits = false;
} else {
console.error("Telling user to clear cache at page create because:", err);
this.$notify(
{
group: "alert",
type: "danger",
title: "Error Creating Account",
title: "Error Loading Account",
text: "Clear your cache and start over (after data backup).",
},
-1,
);
console.error("Telling user to clear cache at page create because:", err);
}
}
@ -961,6 +954,18 @@ export default class AccountViewView extends Vue {
console.log(
`Import progress: ${progress.completedRows} of ${progress.totalRows} rows completed.`,
);
if (progress.done) {
console.log(`Imported ${progress.completedTables} tables.`);
this.$notify(
{
group: "alert",
type: "success",
title: "Import Complete",
text: "",
},
5000,
);
}
return true;
}
@ -968,6 +973,8 @@ export default class AccountViewView extends Vue {
const identity = await this.getIdentity(this.activeDid);
if (identity) {
this.checkLimitsFor(identity);
} else {
this.limitsMessage = "You have no identifier.";
}
}
@ -1044,7 +1051,7 @@ export default class AccountViewView extends Vue {
error.message ===
"Attempted to load Give records with no identifier available."
) {
this.limitsMessage = "No identifier.";
this.limitsMessage = "You have no identifier.";
} else {
// Handle other unknown errors
}

Loading…
Cancel
Save