forked from trent_larson/crowd-funder-for-time-pwa
tweak messages for missing identifier
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user