mirror of
https://github.com/seigler/dash-platform-console
synced 2025-07-26 01:06:10 +00:00
Add account disconnection on init error
This commit is contained in:
parent
6c1dccdeb4
commit
8db5bb1728
2 changed files with 18 additions and 6 deletions
|
@ -108,6 +108,7 @@ export default new Vuex.Store({
|
|||
console.error(e);
|
||||
commit('setError', e);
|
||||
commit('setSyncing', false);
|
||||
demoSDK.account.disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -122,10 +123,11 @@ export default new Vuex.Store({
|
|||
getters: {
|
||||
identityLists(state) {
|
||||
const { identities } = state;
|
||||
return Object.keys(identityTypes).map(typeName => ({
|
||||
const lists = Object.keys(identityTypes).map(typeName => ({
|
||||
type: identityTypes[typeName],
|
||||
items: identities[typeName],
|
||||
}));
|
||||
return lists;
|
||||
},
|
||||
userIdentitiesWithNames(state) {
|
||||
const { user } = state.identities;
|
||||
|
@ -141,6 +143,15 @@ export default new Vuex.Store({
|
|||
contract: state.contracts[identity.id],
|
||||
}));
|
||||
},
|
||||
errorDetails(state) {
|
||||
return state.errorDetails;
|
||||
},
|
||||
isSyncing(state) {
|
||||
return state.isSyncing;
|
||||
},
|
||||
isError(state) {
|
||||
return state.isError;
|
||||
},
|
||||
},
|
||||
plugins: [createPersistedState()],
|
||||
});
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<template>
|
||||
<v-container>
|
||||
|
||||
<v-row>
|
||||
<v-row v-show="isError">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
Error occurred
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
Text is here
|
||||
{{errorDetails ? errorDetails.message : ''}}
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-card>
|
||||
<v-row v-show="isSyncing">
|
||||
<v-card loading="primary">
|
||||
<v-card-title>
|
||||
Wallet is syncing
|
||||
</v-card-title>
|
||||
|
@ -23,7 +23,8 @@
|
|||
</v-card>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-row v-show="!isSyncing && !isError">
|
||||
{{identityLists}}
|
||||
<v-col
|
||||
v-for="list in identityLists"
|
||||
:key="list.type.value"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue