forked from jsnbuchanan/crowd-funder-for-time-pwa
add more error handling and messaging when there are bad DB errors
This commit is contained in:
@@ -32,6 +32,13 @@
|
||||
size="128"
|
||||
></font-awesome>
|
||||
</div>
|
||||
<div v-else-if="hitError">
|
||||
<span class="text-xl">Error Creating Identity</span>
|
||||
<font-awesome icon="exclamation-triangle" class="fa-fw text-red-500 ml-2"></font-awesome>
|
||||
<p class="text-sm text-gray-500">
|
||||
Try fully restarting the app. If that doesn't work, back up all data (identities and other data) and reinstall the app.
|
||||
</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="text-xl">Created!</span>
|
||||
<font-awesome
|
||||
@@ -62,14 +69,24 @@ import QuickNav from "../components/QuickNav.vue";
|
||||
@Component({ components: { QuickNav } })
|
||||
export default class NewIdentifierView extends Vue {
|
||||
loading = true;
|
||||
hitError = false;
|
||||
$router!: Router;
|
||||
|
||||
async mounted() {
|
||||
await generateSaveAndActivateIdentity();
|
||||
this.loading = false;
|
||||
setTimeout(() => {
|
||||
this.$router.push({ name: "home" });
|
||||
}, 1000);
|
||||
this.loading = true;
|
||||
this.hitError = false;
|
||||
generateSaveAndActivateIdentity()
|
||||
.then(() => {
|
||||
this.loading = false;
|
||||
setTimeout(() => {
|
||||
this.$router.push({ name: "home" });
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.loading = false;
|
||||
this.hitError = true;
|
||||
console.error('Failed to generate identity:', error);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user